public enum ActionType extends Enum<ActionType>
| Enum Constant and Description |
|---|
EXISTENTIAL
Indicates a method that checks for the existance of a value
|
GETTER
Indicates a method that gets a value
|
REMOVER
Indicates a method that removes a value
|
SETTER
Indicates a method that sets a value
|
| Modifier and Type | Method and Description |
|---|---|
String |
extractName(String name)
Extract the local name portion of the function name/
|
boolean |
isA(String functionName)
Test to see if the function name is of this action type.
|
static boolean |
isMultiple(Method m) |
static ActionType |
parse(String functionName)
Parse the action type from the function name.
|
static ActionType |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static ActionType[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ActionType GETTER
public static final ActionType SETTER
public static final ActionType REMOVER
public static final ActionType EXISTENTIAL
public static ActionType[] values()
for (ActionType c : ActionType.values()) System.out.println(c);
public static ActionType valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant
with the specified nameNullPointerException - if the argument is nullpublic static boolean isMultiple(Method m)
public static ActionType parse(String functionName)
| Function prefix | ActionType |
|---|---|
| get or is | GETTER |
| set or add | SETTER |
| remove | REMOVER |
| has | EXISTENTIAL |
functionName - IllegalArgumentException - if the function does not have an action type prefix.public String extractName(String name)
name - The function name to extract the local portion from.IllegalArgumentException - fur unrecognized ActionType instances.public boolean isA(String functionName)
functionName - The name to testCopyright © 2012-2013 XENEI.com. All Rights Reserved.