A - The command actor typepublic static interface ParameterType.Factory<A extends CommandActor> extends ParameterFactory, BaseParameterType
ParameterTypes dynamically| Modifier and Type | Method and Description |
|---|---|
<T> @Nullable ParameterType<A,T> |
create(@NotNull java.lang.reflect.Type parameterType,
@NotNull AnnotationList annotations,
@NotNull Lamp<A> lamp)
Dynamically creates a
ParameterType |
static <A extends CommandActor,T> |
forType(@NotNull java.lang.Class<T> type,
@NotNull ParameterType<A,T> parameterType)
Creates a new
ParameterType.Factory that returns a ParameterType for all
parameters that exactly have a certain class. |
static <A extends CommandActor,T> |
forTypeAndSubclasses(@NotNull java.lang.Class<T> type,
@NotNull ParameterType<A,T> parameterType)
Creates a new
ParameterType.Factory that returns a ParameterType for all
parameters that are assignable from the given type. |
@NotNull static <A extends CommandActor,T> @NotNull ParameterType.Factory<A> forType(@NotNull @NotNull java.lang.Class<T> type, @NotNull @NotNull ParameterType<A,T> parameterType)
ParameterType.Factory that returns a ParameterType 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 ParameterType.Factory<A> forTypeAndSubclasses(@NotNull @NotNull java.lang.Class<T> type, @NotNull @NotNull ParameterType<A,T> parameterType)
ParameterType.Factory that returns a ParameterType 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 ParameterType<A,T> create(@NotNull @NotNull java.lang.reflect.Type parameterType, @NotNull @NotNull AnnotationList annotations, @NotNull @NotNull Lamp<A> lamp)
ParameterTypeT - The parameter typeparameterType - The command parameter to create forannotations - The parameter annotationslamp - The Lamp instance (for referencing other parameter types)ParameterType, or null if this factory
cannot deal with it.