public final class ProxyTarget
extends java.lang.Object
proxy
implementations.Constructor and Description |
---|
ProxyTarget() |
Modifier and Type | Method and Description |
---|---|
static java.lang.Object |
argument(int index)
Inserts value of method argument specified by 1-based index.
|
static int |
argumentsCount()
Inserts total number of method's arguments.
|
static java.lang.Class |
argumentType(int index)
Inserts type of method argument specified by 1-based index.
|
static java.lang.Object[] |
createArgumentsArray()
Creates array of arguments values.
|
static java.lang.Class[] |
createArgumentsClassArray()
Creates array of arguments types.
|
static ProxyTargetInfo |
info()
Inserts populated
ProxyTargetInfo instance. |
static java.lang.Object |
invoke()
Inserts the invocation of target method and getting the invocation results.
|
static java.lang.Class |
returnType()
Inserts return type of target method.
|
static java.lang.Object |
returnValue(java.lang.Object value)
Prepares return value.
|
static void |
setArgument(java.lang.Object value,
int index)
Assigns new value for an argument specified by 1-based index.
|
static java.lang.Object |
target()
Inserts proxy (i.e. target) instance.
|
static java.lang.Class |
targetClass()
Inserts target class.
|
static java.lang.Object |
targetClassAnnotation(java.lang.String annotationClassName,
java.lang.String element)
Inserts targets class annotation value.
|
static java.lang.Object |
targetMethodAnnotation(java.lang.String annotationClassName,
java.lang.String element)
Inserts targets method annotation value.
|
static java.lang.String |
targetMethodDescription()
Inserts target method description, bytecode alike, without method name.
|
static java.lang.String |
targetMethodName()
Inserts target method name.
|
static java.lang.String |
targetMethodSignature()
Inserts target method signature, java alike, including the method name.
|
public static java.lang.Object invoke()
void
,
null
is used for return value.public static int argumentsCount()
public static java.lang.Class argumentType(int index)
null
argument values.createArgumentsClassArray()
public static java.lang.Object argument(int index)
createArgumentsArray()
public static void setArgument(java.lang.Object value, int index)
public static java.lang.Object[] createArgumentsArray()
new Object[] {arg1, arg2,...}
createArgumentsClassArray()
,
argument(int)
public static java.lang.Class[] createArgumentsClassArray()
null
argument values.
Equals to: new Class[] {Arg1Type.class, Arg2Type.class...}
createArgumentsArray()
,
argumentType(int)
public static java.lang.Class returnType()
null
is used for void.public static java.lang.Object returnValue(java.lang.Object value)
... return ProxyTarget.returnValue(xxx);Used when returning values in general case, when return type may be either primitive or an object. Also, must be used when returning
null
for primitives.public static java.lang.Object target()
public static java.lang.Class targetClass()
public static java.lang.String targetMethodName()
public static java.lang.String targetMethodSignature()
targetMethodDescription()
public static java.lang.String targetMethodDescription()
targetMethodSignature()
public static java.lang.Object targetMethodAnnotation(java.lang.String annotationClassName, java.lang.String element)
null
if annotation or element is missing.public static java.lang.Object targetClassAnnotation(java.lang.String annotationClassName, java.lang.String element)
null
if annotation or element is missing.public static ProxyTargetInfo info()
ProxyTargetInfo
instance.Copyright © 2003-present Jodd Team