Package spoon.metamodel
Class MMMethod
- java.lang.Object
-
- spoon.metamodel.MMMethod
-
public class MMMethod extends Object
Represents a method used to get or set aMetamodelProperty
of aMetamodelConcept
.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CtMethod<?>
getActualCtMethod()
List<CtMethod<?>>
getDeclaredMethods()
MMMethodKind
getKind()
String
getName()
MetamodelConcept
getOwner()
MetamodelProperty
getProperty()
CtTypeReference<?>
getReturnType()
String
getSignature()
CtTypeReference<?>
getValueType()
boolean
overrides(CtMethod<?> method)
String
toString()
-
-
-
Method Detail
-
getActualCtMethod
public CtMethod<?> getActualCtMethod()
-
getName
public String getName()
-
getSignature
public String getSignature()
- Returns:
- signature of this method, without the declaring type
-
getKind
public MMMethodKind getKind()
- Returns:
- kind of this method. Getter, setter, ...
-
overrides
public boolean overrides(CtMethod<?> method)
- Parameters:
method
-- Returns:
- true of this
MMMethod
overrides `method`. In different words, if it represents the same method
-
getProperty
public MetamodelProperty getProperty()
- Returns:
- the
MetamodelProperty
which is get or set by thisMMMethod
-
getOwner
public MetamodelConcept getOwner()
- Returns:
MetamodelConcept
where thisMMMethod
belongs to
-
getDeclaredMethods
public List<CtMethod<?>> getDeclaredMethods()
- Returns:
CtMethod
s, which are declared in theMetamodelConcept
or in the hierarchy, that have the same role andMMMethodKind
.
-
getReturnType
public CtTypeReference<?> getReturnType()
- Returns:
- the type returned by this method
-
getValueType
public CtTypeReference<?> getValueType()
- Returns:
- a value type of this method
-
-