|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.perfectjpattern.core.extras.delegate.AbstractDelegator.DelegateProxy
protected class AbstractDelegator.DelegateProxy
![]() |
![]() |
| Constructor Summary | |
|---|---|
AbstractDelegator.DelegateProxy(Object aTarget,
Class aTargetClass,
String aMethodName,
AbstractDelegator aTemplate)
Constructs a DelegateProxy supplying a Class passing in types not template. |
|
| Method Summary | |
|---|---|
protected Method |
getMethod()
Returns the method. |
protected Object |
getTarget()
Returns the target Object. |
Object |
invoke(Object... anArguments)
Returns the Result of the target call; primitive types are wrapped; may return void result. |
Object |
invoke(Object aProxy,
Method aMethod,
Object[] anArguments)
|
protected void |
validateArgs(Object[] anArguments,
Class[] anExpectedArguments)
Validate actual arguments to match those expected from the Delegate type. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AbstractDelegator.DelegateProxy(Object aTarget,
Class aTargetClass,
String aMethodName,
AbstractDelegator aTemplate)
throws UnsupportedOperationException
aTarget - aTargetClass - aMethodName - aTemplate -
UnsupportedOperationException| Method Detail |
|---|
public Object invoke(Object aProxy,
Method aMethod,
Object[] anArguments)
invoke in interface InvocationHandler
public Object invoke(Object... anArguments)
throws IllegalArgumentException,
UnsupportedOperationException
invoke in interface IDelegateanArguments - List of input arguments.
IllegalArgumentException
UnsupportedOperationException
protected void validateArgs(Object[] anArguments,
Class[] anExpectedArguments)
throws IllegalArgumentException
anArguments - Arguments to validateanExpectedArguments - Expected arguments signature
IllegalArgumentException - 'anExpectedArguments' must not be
null
IllegalArgumentException - Delegator required 'N' arguments
IllegalArgumentException - Argument 'i' must be of type 'X'protected Method getMethod()
protected Object getTarget()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||