A - The command actor type@FunctionalInterface public static interface ContextParameter.Factory<A extends CommandActor> extends ParameterFactory
ContextParameters dynamically| Modifier and Type | Method and Description |
|---|---|
<T> @Nullable ContextParameter<A,T> |
create(@NotNull java.lang.reflect.Type parameterType,
@NotNull AnnotationList annotations,
@NotNull Lamp<A> lamp)
Dynamically creates a
ContextParameter |
static <A extends CommandActor,T> |
forType(@NotNull java.lang.Class<T> type,
@NotNull ContextParameter<A,T> parameterType)
Creates a new
ContextParameter.Factory that returns a ContextParameter for all
parameters that exactly have a certain class. |
static <A extends CommandActor,T> |
forTypeAndSubclasses(@NotNull java.lang.Class<T> type,
@NotNull ContextParameter<A,T> parameterType)
Creates a new
ContextParameter.Factory that returns a ContextParameter for all
parameters that are assignable from the given type. |
@NotNull static <A extends CommandActor,T> @NotNull ContextParameter.Factory<A> forType(@NotNull @NotNull java.lang.Class<T> type, @NotNull @NotNull ContextParameter<A,T> parameterType)
ContextParameter.Factory that returns a ContextParameter for all
parameters that exactly have a certain class.A - The actor typeT - The parameter typetype - Parameter type to check againstparameterType - The parameter type to supply@NotNull static <A extends CommandActor,T> @NotNull ContextParameter.Factory<A> forTypeAndSubclasses(@NotNull @NotNull java.lang.Class<T> type, @NotNull @NotNull ContextParameter<A,T> parameterType)
ContextParameter.Factory that returns a ContextParameter for all
parameters that are assignable from the given type.
Checking is done using Class.isAssignableFrom(Class).
A - The actor typeT - The parameter typetype - Parameter type to check againstparameterType - The parameter type to supply@Nullable <T> @Nullable ContextParameter<A,T> create(@NotNull @NotNull java.lang.reflect.Type parameterType, @NotNull @NotNull AnnotationList annotations, @NotNull @NotNull Lamp<A> lamp)
ContextParameterT - The parameter typeparameterType - The command parameter to create forannotations - The parameter annotationslamp - The Lamp instance (for referencing other parameter types)ContextParameter, or null if this factory
cannot deal with it.