public abstract class ContextInvocationTarget extends Object implements Parcelable
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE| Modifier and Type | Method and Description |
|---|---|
abstract InvocationTarget |
getInvocationTarget(Context context)
Returns an invocation target based on the specified context.
Note that a new instance will be returned each time the method is invoked. |
abstract Class<?> |
getTargetClass()
Returns the target class.
|
static ContextInvocationTarget |
targetClass(Class<?> targetClass)
Returns a target based on the specified class.
|
static ContextInvocationTarget |
targetObject(Class<?> targetClass)
Returns a target based on the specified instance.
No argument will be passed to the object factory. |
static ContextInvocationTarget |
targetObject(Class<?> targetClass,
Object... factoryArgs)
Returns a target based on the specified instance.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdescribeContents, writeToParcel@Nonnull public static ContextInvocationTarget targetClass(@Nonnull Class<?> targetClass)
targetClass - the target class.@Nonnull public static ContextInvocationTarget targetObject(@Nonnull Class<?> targetClass)
targetClass - the target class.@Nonnull public static ContextInvocationTarget targetObject(@Nonnull Class<?> targetClass, @Nullable Object... factoryArgs)
targetClass - the target class.factoryArgs - the object factory arguments.@Nonnull public abstract InvocationTarget getInvocationTarget(@Nonnull Context context)
context - the target context.