public class Subtypes
extends java.lang.Object
Constructor and Description |
---|
Subtypes() |
Modifier and Type | Method and Description |
---|---|
static boolean |
applySubtype(Disguise disguise,
java.lang.String argument)
Applies a subtype to a given disguise based on the given argument.
|
static java.util.List<java.lang.String> |
listSubtypeArguments(Disguise disguise)
Returns a list containing all registered subtype arguments for the given disguise.
|
static void |
registerSubtype(java.lang.Class<? extends Disguise> disguiseClass,
java.lang.String methodName,
boolean parameter,
java.lang.String argument)
Registers a new subtype.
|
static void |
registerSubtype(java.lang.Class<? extends Disguise> disguiseClass,
java.lang.String methodName,
int parameter,
java.lang.String argument)
Registers a new subtype.
|
static void |
registerSubtype(java.lang.Class<? extends Disguise> disguiseClass,
java.lang.String methodName,
java.lang.Object parameter,
java.lang.String argument)
Registers a new subtype.
|
public static void registerSubtype(java.lang.Class<? extends Disguise> disguiseClass, java.lang.String methodName, java.lang.Object parameter, java.lang.String argument)
disguiseClass
- the disguise classmethodName
- the method to callparameter
- the parameter to pass to the methodargument
- the command argument to bind this topublic static void registerSubtype(java.lang.Class<? extends Disguise> disguiseClass, java.lang.String methodName, boolean parameter, java.lang.String argument)
disguiseClass
- the disguise classmethodName
- the method to callparameter
- the parameter to pass to the methodargument
- the command argument to bind this topublic static void registerSubtype(java.lang.Class<? extends Disguise> disguiseClass, java.lang.String methodName, int parameter, java.lang.String argument)
disguiseClass
- the disguise classmethodName
- the method to callparameter
- the parameter to pass to the methodargument
- the command argument to bind this topublic static boolean applySubtype(Disguise disguise, java.lang.String argument)
disguise
- the disguiseargument
- the argument to matchtrue
, if and only if a matching subtype has been found AND successfully appliedpublic static java.util.List<java.lang.String> listSubtypeArguments(Disguise disguise)
disguise
- the disguise