TYPE - the target object type.public abstract class InvocationTarget<TYPE> extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
InvocationTarget.ClassInvocationTarget<TYPE>
Invocation target wrapping a class.
|
static class |
InvocationTarget.InstanceInvocationTarget<TYPE>
Invocation target wrapping an object instance.
|
| Modifier and Type | Method and Description |
|---|---|
static <TYPE> InvocationTarget.ClassInvocationTarget<TYPE> |
classOfType(Class<TYPE> targetClass)
Returns a target based on the specified class.
|
abstract Object |
getTarget()
Returns the target of the invocation.
|
abstract Class<? extends TYPE> |
getTargetClass()
Returns the target class.
|
static <TYPE> InvocationTarget.InstanceInvocationTarget<TYPE> |
instance(TYPE target)
Returns a target based on the specified instance.
|
abstract boolean |
isAssignableTo(Class<?> otherClass)
Checks if this invocation target is assignable to the specified class.
|
abstract boolean |
isSameTypeOf(Class<?> type)
Checks if this invocation target is of the specified type.
|
@NotNull public static <TYPE> InvocationTarget.ClassInvocationTarget<TYPE> classOfType(@NotNull Class<TYPE> targetClass)
TYPE - the target object type.targetClass - the target class.@NotNull public static <TYPE> InvocationTarget.InstanceInvocationTarget<TYPE> instance(@NotNull TYPE target)
TYPE - the target object type.target - the target instance.@Nullable public abstract Object getTarget()
@NotNull public abstract Class<? extends TYPE> getTargetClass()
public abstract boolean isAssignableTo(@NotNull
Class<?> otherClass)
otherClass - the other class.public abstract boolean isSameTypeOf(@NotNull
Class<?> type)
type - the type class.