public final class DebugResourceProviderProxy extends DebugNameableProxy implements DebugResourceProvider
ResourceProvider.Builder
Modifier and Type | Method and Description |
---|---|
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.
|
static ResourceProvider |
unwrap(ResourceProvider provider) |
static DebugResourceProviderProxy |
wrap(ResourceProvider provider) |
static DebugResourceProviderProxy |
wrap(ResourceProvider provider,
DebugConsole console) |
getName
equals, hashCode, toString
error, getDebugConsole, notice, notice, print, print, put, put, tab, untab, warning, warning
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDebugConsole
equals, hashCode
public static DebugResourceProviderProxy wrap(ResourceProvider provider)
public static DebugResourceProviderProxy wrap(ResourceProvider provider, DebugConsole console)
public static ResourceProvider unwrap(ResourceProvider provider)
public ResourceProvider delegate()
delegate
in class DebugNameableProxy
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
ResourceProviders.superResourceProvider()