@DebugProxy public final class DebugResourceProxy<L extends Listener> extends DebugRegistrableProxy implements DebugResource<L>
Modifier and Type | Method and Description |
---|---|
Resource<L> |
delegate() |
java.lang.String |
getName()
Returns a fully qualified name of this resource.
|
void |
register(L listener)
Registers a listener to this resource.
|
<U extends Listener> |
registered(java.lang.Class<U> type)
Returns all registered listeners assignable to the specified
listener type.
|
boolean |
registered(Listener listener)
Determines whether the specified listener
is registered to this resource.
|
void |
unregister(L listener)
Unregisters a listener from this resource.
|
static <L extends Listener> |
unwrap(Resource<L> resource) |
static <L extends Listener> |
wrap(Resource<L> resource) |
static <L extends Listener> |
wrap(Resource<L> resource,
DebugConsole console) |
postRegister, postUnregister, preRegister, preUnregister
equals, hashCode, toString
error, getDebugConsole, notice, notice, print, print, put, put, tab, untab, warning, warning
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
getDebugConsole
postRegister, postUnregister, preRegister, preUnregister
public static <L extends Listener> DebugResourceProxy<L> wrap(Resource<L> resource)
public static <L extends Listener> DebugResourceProxy<L> wrap(Resource<L> resource, DebugConsole console)
public Resource<L> delegate()
delegate
in class DebugRegistrableProxy
public void register(L listener)
Resource
Warning: Does not invoke listener registration hooks.
Only ListenerManager.register(Listener)
is responsible
for proper hook method invocation during the registration process.
public void unregister(L listener)
Resource
Warning: Does not invoke listener unregistration hooks.
Only ListenerManager.unregister(Listener)
is responsible
for proper hook method invocation during the unregistration process.
unregister
in interface Resource<L extends Listener>
listener
- the listener to be unregistered, not null
public <U extends Listener> java.util.Collection<U> registered(java.lang.Class<U> type)
Resource
registered
in interface Resource<L extends Listener>
type
- the listener type of the registered listeners,
not null
public boolean registered(Listener listener)
Resource
registered
in interface Resource<L extends Listener>
listener
- the listener to be checked, not null
true
if the specified listener is registered
to this resource, false
otherwise