Package spoon.metamodel
Enum Class MMMethodKind
- All Implemented Interfaces:
Serializable
,Comparable<MMMethodKind>
,Constable
Represents the type of metamodel method.
eg
CtType.addField(CtField)
has MMMethodKindADD_FIRST
.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionboolean
isMulti()
static MMMethodKind
Detect kind of methodstatic MMMethodKind
Returns the enum constant of this class with the specified name.static MMMethodKind[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
GET
Getter. T get() -
SET
Setter void set(T) -
ADD_FIRST
void addFirst(T) -
ADD_LAST
void add(T) -
ADD_ON
void addOn(int, T) -
REMOVE
void remove(T) -
GET_BY
Return element by its name T get(String) -
OTHER
The not matching method
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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
Detect kind of method- Parameters:
method
- to be check method- Returns:
- detected
MMMethodKind
, which fits to the `method`
-