public class GroovyMethodElement extends AbstractGroovyElement implements MethodElement
MethodNode
.compilationUnit, visitorContext
EMPTY_ELEMENT_ARRAY
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
EMPTY
Modifier and Type | Method and Description |
---|---|
ClassElement |
getDeclaringType() |
ClassElement |
getGenericReturnType()
The generic return type of the method.
|
java.lang.String |
getName() |
java.lang.Object |
getNativeType()
Returns the native underlying type.
|
ClassElement |
getOwningType()
The owing type is the type that owns this element.
|
ParameterElement[] |
getParameters() |
ClassElement |
getReturnType() |
boolean |
isAbstract() |
boolean |
isFinal() |
boolean |
isPrivate() |
boolean |
isProtected() |
boolean |
isPublic() |
boolean |
isStatic() |
java.lang.String |
toString() |
MethodElement |
withNewParameters(ParameterElement... newParameters)
Takes this method element and transforms into a new method element with the given parameters appended to the existing parameters.
|
alignNewGenericsInfo, annotate, getAnnotationMetadata, getGenericElement, isPackagePrivate, resolveAnnotationMetadata, toClassElement
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getDescription, getSuspendParameters, hasParameters, isDefault, isSuspend, of
annotate, annotate, annotate, annotate, getDocumentation, getSimpleName, isPackagePrivate
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
hasDeclaredStereotype
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
getAnnotationMetadata
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getName()
public boolean isAbstract()
isAbstract
in interface Element
public boolean isStatic()
public boolean isPublic()
public boolean isPrivate()
public boolean isFinal()
public boolean isProtected()
isProtected
in interface Element
public java.lang.Object getNativeType()
Element
getNativeType
in interface Element
@NonNull public ClassElement getGenericReturnType()
MethodElement
getGenericReturnType
in interface MethodElement
@NonNull public ClassElement getReturnType()
getReturnType
in interface MethodElement
public ParameterElement[] getParameters()
getParameters
in interface MethodElement
public MethodElement withNewParameters(ParameterElement... newParameters)
MethodElement
withNewParameters
in interface MethodElement
newParameters
- The new parameterspublic ClassElement getDeclaringType()
getDeclaringType
in interface MemberElement
public ClassElement getOwningType()
MemberElement
MemberElement.getDeclaringType()
in the case of inheritance since this method will return the subclass that owners the inherited member,
whilst MemberElement.getDeclaringType()
will return the super class that declares the type.getOwningType
in interface MemberElement