public final class DebugResourceManagerProxy extends DebugNameableProxy implements DebugResourceManager
| Modifier and Type | Method and Description |
|---|---|
<L extends Listener> |
assignables(java.lang.Class<L> type)
Returns a set of resources assignable to the specified listener type.
|
ResourceManager |
delegate() |
<L extends Listener> |
register(java.lang.Class<L> type,
Resource<? super L> resource)
Registers a resource with the given listener type.
|
boolean |
registered(java.lang.Class<? extends Listener> type,
Resource<?> resource)
Determines whether the specified resource is registered
with the specified listener type by this resource manager.
|
<L extends Listener> |
registrables(java.lang.Class<L> type)
Returns a set of resources registrable with the specified listener type.
|
com.google.common.collect.SetMultimap<java.lang.Class<? extends Listener>,Resource<?>> |
registrations()
Returns a set multimap of listener types to all registered resources.
|
<L extends Listener> |
unregister(java.lang.Class<L> type,
Resource<? super L> resource)
Unregisters a resource with the given listener type.
|
<L extends Listener> |
unregisterAll(java.lang.Class<L> type)
Unregisters all resources assignable to the specified listener type.
|
static ResourceManager |
unwrap(ResourceManager manager) |
static DebugResourceManagerProxy |
wrap(ResourceManager manager) |
static DebugResourceManagerProxy |
wrap(ResourceManager manager,
DebugConsole console) |
getNameequals, hashCode, toStringerror, getDebugConsole, notice, notice, print, print, put, put, tab, untab, warning, warningclone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetDebugConsoleequals, hashCodepublic static DebugResourceManagerProxy wrap(ResourceManager manager)
public static DebugResourceManagerProxy wrap(ResourceManager manager, DebugConsole console)
public static ResourceManager unwrap(ResourceManager manager)
public ResourceManager delegate()
delegate in class DebugNameableProxypublic <L extends Listener> void register(java.lang.Class<L> type, Resource<? super L> resource)
ResourceManagerNote that this method propagates any exception
thrown by the specified resource as a cause of a
ResourceRegistrationException instance.
register in interface ResourceManagertype - the listener type with which the specified
resource is to be registered, not nullresource - the resource to be registered with the specified
listener type, not nullpublic <L extends Listener> void unregister(java.lang.Class<L> type, Resource<? super L> resource)
ResourceManagerNote that this method propagates any exception
thrown by the specified resource as a cause of a
ResourceUnregistrationException instance.
unregister in interface ResourceManagertype - the listener type with which the specified
resource is to be unregistered, not nullresource - the resource to be unregistered from the specified
listener type, not nullpublic <L extends Listener> void unregisterAll(java.lang.Class<L> type)
ResourceManagerNote that this method collects all exceptions thrown by resources
during the unregistration process and propagates them as suppressed
exceptions of a ResourceUnregistrationException instance.
unregisterAll in interface ResourceManagertype - the listener type to which the assignable resources
are going be unregistered, not nullpublic <L extends Listener> java.util.Set<Resource<? extends L>> assignables(java.lang.Class<L> type)
ResourceManagerA resource is assignable to a given listener type if the listener type supported by the resource is assignable to the given listener type.
assignables in interface ResourceManagerpublic <L extends Listener> java.util.Set<Resource<? super L>> registrables(java.lang.Class<L> type)
ResourceManagerA resource is registrable with a given listener type if the listener type supported by the resource is equal to the given listener type or one of its superinterfaces.
registrables in interface ResourceManagerpublic com.google.common.collect.SetMultimap<java.lang.Class<? extends Listener>,Resource<?>> registrations()
ResourceManagerregistrations in interface ResourceManagerpublic boolean registered(java.lang.Class<? extends Listener> type, Resource<?> resource)
ResourceManagerregistered in interface ResourceManagertype - the listener type to be checked, not nullresource - the resource to be checked, not nulltrue if the specified resource is registered
with the specified listener type by this resource manager,
false otherwise