public abstract class ForwardingResourceProvider extends ForwardingProvider implements ResourceProvider
Note that this class does not forward the equals
and hashCode
methods through to the backing object. See
ForwardingObject
for more details.
ResourceProvider.Builder
Modifier | Constructor and Description |
---|---|
protected |
ForwardingResourceProvider()
Constructor for use by subclasses.
|
Modifier and Type | Method and Description |
---|---|
protected abstract ResourceProvider |
delegate() |
Resource<?> |
forName(java.lang.String name)
Returns a resource with the specified name.
|
<L extends Listener> |
forType(java.lang.Class<L> type)
Returns a set of resources supporting the specified listener type.
|
java.util.Set<java.lang.String> |
names()
Returns names of all provided resources.
|
ResourceProvider |
parent()
Returns the provider's parent or
null if there is no parent. |
java.util.Set<java.lang.Class<? extends Listener>> |
types()
Returns listener types supported by provided resources.
|
getName
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
equals, hashCode
protected ForwardingResourceProvider()
protected abstract ResourceProvider delegate()
delegate
in class ForwardingProvider
public Resource<?> forName(java.lang.String name)
ResourceProvider
This method is guaranteed to return the same resource instance for the specified resource name every time it is invoked.
forName
in interface ResourceProvider
name
- the resource name, not an empty string or null
Resource
objectpublic <L extends Listener> java.util.Set<Resource<L>> forType(java.lang.Class<L> type)
ResourceProvider
forType
in interface ResourceProvider
type
- the listener type, not null
public java.util.Set<java.lang.String> names()
ResourceProvider
names
in interface ResourceProvider
public java.util.Set<java.lang.Class<? extends Listener>> types()
ResourceProvider
types
in interface ResourceProvider
public ResourceProvider parent()
Provider
null
if there is no parent.parent
in interface Provider
parent
in interface ResourceProvider
parent
in class ForwardingProvider
ResourceProviders.superResourceProvider()