|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectch.elca.el4j.util.socketstatistics.ReflectiveDelegator
public class ReflectiveDelegator
Delegator for the use of SocketImpl using reflection. Inspired by http://www.javaspecialists.eu/archive/Issue168.html
Nested Class Summary | |
---|---|
class |
ReflectiveDelegator.DelegatorMethodFinder
Internal class for explicitly defined method calls using delegateTo. |
Constructor Summary | |
---|---|
ReflectiveDelegator(Object source,
Class superclass,
Object delegate)
Constructor. |
|
ReflectiveDelegator(Object source,
Class superclass,
String delegateClassName)
Constructor. |
Method Summary | ||
---|---|---|
ReflectiveDelegator.DelegatorMethodFinder |
delegateTo(String methodName,
Class<?>... parameters)
Method for explicit delegation of method call. |
|
|
invoke(Object... args)
Method for invocation on delegated class. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ReflectiveDelegator(Object source, Class superclass, Object delegate)
source
- source class for reflectionsuperclass
- class used for delegationdelegate
- reference to class for delegated method callspublic ReflectiveDelegator(Object source, Class superclass, String delegateClassName)
source
- source class for reflectionsuperclass
- class used for delegationdelegateClassName
- name of the class for delegated method callsMethod Detail |
---|
public final <T> T invoke(Object... args)
T
- generic return typeargs
- arguments to be passed to the original method
public ReflectiveDelegator.DelegatorMethodFinder delegateTo(String methodName, Class<?>... parameters)
methodName
- name of method to be calledparameters
- parameters to be passed to called method
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |