public enum OptionalResponseHandler extends java.lang.Enum<OptionalResponseHandler> implements ResponseHandler.Factory<CommandActor>
ResponseHandler.Factory that creates ResponseHandlers for
{@code Optional} where T is any type that has
a registered response handler.| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
<T> @Nullable ResponseHandler<CommandActor,T> |
create(@NotNull java.lang.reflect.Type type,
@NotNull AnnotationList annotations,
@NotNull Lamp<CommandActor> lamp)
Creates a new
CommandPermission for the given type and list of annotations. |
static OptionalResponseHandler |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static OptionalResponseHandler[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOfforType, forTypeAndSubclassespublic static final OptionalResponseHandler INSTANCE
public static OptionalResponseHandler[] values()
for (OptionalResponseHandler c : OptionalResponseHandler.values()) System.out.println(c);
public static OptionalResponseHandler valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is null@Nullable public <T> @Nullable ResponseHandler<CommandActor,T> create(@NotNull @NotNull java.lang.reflect.Type type, @NotNull @NotNull AnnotationList annotations, @NotNull @NotNull Lamp<CommandActor> lamp)
ResponseHandler.FactoryCommandPermission for the given type and list of annotations. These
annotations will usually represent the ones on the function
If this factory is not responsible for the given input, it may return
null.
create in interface ResponseHandler.Factory<CommandActor>annotations - The annotation listlamp - The Lamp instance