Package org.eclipse.e4.ui.css.core.resources

# Class AbstractResourcesRegistry

java.lang.Object
org.eclipse.e4.ui.css.core.resources.AbstractResourcesRegistry

All Implemented Interfaces:
  `IResourcesRegistry`

Direct Known Subclasses:
  `SWTResourcesRegistry`

public abstract class AbstractResourcesRegistry extends Object implements IResourcesRegistry
Abstract class resources registry which implement basic cache with Map.

Version:
  1.0.0
Author:
  Angelo ZERR

## Constructor Summary

Constructors
Constructor
Description
`AbstractResourcesRegistry()`

## Method Summary

Modifier and Type
Method
Description
`void`
`dispose()`
Dispose all resources stored into cache.
`abstract void`
`disposeResource(Object type, Object key, Object resource)`
`protected Map<Object,Object>`
`getCacheByType(Object type)`
`Object`
`getResource(Object type, Object key)`
Return resource type of `type` stored into cache with `key`.
`Object`
`getResourceType(Object resource)`
`void`
`registerResource(Object type, Object key, Object resource)`
Register into cache the resource `resource` type of `type` with key `key`.
`void`
`unregisterResource(Object resource)`
`void`
`unregisterResource(Object type, Object key)`
Unregister from cache the resource `resource` type of `type` with key `key`.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### AbstractResourcesRegistry

public AbstractResourcesRegistry()

## Method Details

### getResource

public Object getResource(Object type, Object key)
Description copied from interface: `IResourcesRegistry`
Return resource type of `type` stored into cache with `key`.

Specified by:
  `getResource` in interface `IResourcesRegistry`
Parameters:
  `type` - Resource type like Font, Color, Cursor, Image

### registerResource

public void registerResource(Object type, Object key, Object resource)
Description copied from interface: `IResourcesRegistry`
Register into cache the resource `resource` type of `type` with key `key`.

Specified by:
  `registerResource` in interface `IResourcesRegistry`
Parameters:
  `type` - Resource type like Font, Color, Cursor, Image

### getCacheByType

protected Map<Object,Object> getCacheByType(Object type)

### unregisterResource

public void unregisterResource(Object type, Object key)
Description copied from interface: `IResourcesRegistry`
Unregister from cache the resource `resource` type of `type` with key `key`.

Specified by:
  `unregisterResource` in interface `IResourcesRegistry`

### unregisterResource

public void unregisterResource(Object resource)

### getResourceType

public Object getResourceType(Object resource)

### dispose

public void dispose()
Description copied from interface: `IResourcesRegistry`
Dispose all resources stored into cache.

Specified by:
  `dispose` in interface `IResourcesRegistry`

### disposeResource

public abstract void disposeResource(Object type, Object key, Object resource)