public class GroovyMethodElement extends AbstractGroovyElement implements MethodElement
MethodNode.compilationUnit, sourceUnit, visitorContextEMPTY_ELEMENT_ARRAYCLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBEREMPTY| Modifier and Type | Method and Description |
|---|---|
List<? extends GenericPlaceholderElement> |
getDeclaredTypeVariables() |
ClassElement |
getDeclaringType() |
ClassElement |
getGenericReturnType()
The generic return type of the method.
|
Set<ElementModifier> |
getModifiers() |
String |
getName() |
Object |
getNativeType()
Returns the native underlying type.
|
ClassElement |
getOwningType()
The owing type is the type that owns this element.
|
ParameterElement[] |
getParameters() |
ClassElement |
getReturnType() |
ClassElement[] |
getThrownTypes()
Returns the types declared in the
throws declaration of a method. |
boolean |
isAbstract() |
boolean |
isFinal() |
boolean |
isPrivate() |
boolean |
isProtected() |
boolean |
isPublic() |
boolean |
isStatic() |
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, annotate, equals, getAnnotationMetadata, getGenericElement, hashCode, isPackagePrivate, removeAnnotation, removeAnnotationIf, removeStereotype, resolveAnnotationMetadata, resolveModifiers, resolveModifiers, resolveModifiersclone, finalize, getClass, notify, notifyAll, wait, wait, waitaddAssociatedBean, getDescription, getReceiverType, getSuspendParameters, hasParameters, isDefault, isSuspend, of, overridesisReflectionRequired, isReflectionRequiredannotate, annotate, annotate, annotate, annotate, getDescription, getDocumentation, getSimpleName, isPackagePrivate, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotypebooleanValue, 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, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypegetAnnotationValuesByName, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresentisDeclaredNonNull, isDeclaredNullable, isNonNull, isNullablegetAnnotationMetadatapublic ClassElement[] getThrownTypes()
MethodElementthrows declaration of a method.getThrownTypes in interface MethodElementthrows types, if any. Never null.public Set<ElementModifier> getModifiers()
getModifiers in interface ElementgetModifiers in interface MemberElementElementModifier types for this class elementpublic String getName()
public boolean isAbstract()
isAbstract in interface Elementpublic boolean isStatic()
public boolean isPublic()
public boolean isPrivate()
public boolean isFinal()
public boolean isProtected()
isProtected in interface Elementpublic Object getNativeType()
ElementgetNativeType in interface Element@NonNull public ClassElement getGenericReturnType()
MethodElementgetGenericReturnType in interface MethodElement@NonNull public ClassElement getReturnType()
getReturnType in interface MethodElementpublic ParameterElement[] getParameters()
getParameters in interface MethodElementpublic MethodElement withNewParameters(ParameterElement... newParameters)
MethodElementwithNewParameters in interface MethodElementnewParameters - The new parameterspublic ClassElement getDeclaringType()
getDeclaringType in interface MemberElementpublic ClassElement getOwningType()
MemberElementMemberElement.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 MemberElementpublic List<? extends GenericPlaceholderElement> getDeclaredTypeVariables()
getDeclaredTypeVariables in interface MethodElement