Package spoon.metamodel
Enum MMMethodKind
- java.lang.Object
-
- java.lang.Enum<MMMethodKind>
-
- spoon.metamodel.MMMethodKind
-
- All Implemented Interfaces:
Serializable
,Comparable<MMMethodKind>
public enum MMMethodKind extends Enum<MMMethodKind>
Represents the type of metamodel method. egCtType.addField(CtField)
has MMMethodKindADD_FIRST
.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
isMulti()
static MMMethodKind
kindOf(CtMethod<?> method)
Detect kind of methodstatic MMMethodKind
valueOf(String name)
Returns the enum constant of this type with the specified name.static MMMethodKind[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
GET
public static final MMMethodKind GET
Getter. T get()
-
SET
public static final MMMethodKind SET
Setter void set(T)
-
ADD_FIRST
public static final MMMethodKind ADD_FIRST
void addFirst(T)
-
ADD_LAST
public static final MMMethodKind ADD_LAST
void add(T)
-
ADD_ON
public static final MMMethodKind ADD_ON
void addOn(int, T)
-
REMOVE
public static final MMMethodKind REMOVE
void remove(T)
-
GET_BY
public static final MMMethodKind GET_BY
Return element by its name T get(String)
-
OTHER
public static final MMMethodKind OTHER
The not matching method
-
-
Method Detail
-
values
public static MMMethodKind[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (MMMethodKind c : MMMethodKind.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MMMethodKind valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null
-
isMulti
public boolean isMulti()
- Returns:
- true if this accessor provides access to elements of a collection. false if it accessed full value of attribute
-
kindOf
public static MMMethodKind kindOf(CtMethod<?> method)
Detect kind of method- Parameters:
method
- to be check method- Returns:
- detected
MMMethodKind
, which fits to the `method`
-
-