public final class MethodDeclaration extends BodyDeclaration<MethodDeclaration> implements NodeWithJavaDoc<MethodDeclaration>, NodeWithDeclaration, NodeWithName<MethodDeclaration>, NodeWithType<MethodDeclaration>, NodeWithElementType<MethodDeclaration>, NodeWithModifiers<MethodDeclaration>, NodeWithParameters<MethodDeclaration>, NodeWithThrowable<MethodDeclaration>, NodeWithBlockStmt<MethodDeclaration>
ABSOLUTE_BEGIN_LINE, ABSOLUTE_END_LINE| Constructor and Description |
|---|
MethodDeclaration() |
MethodDeclaration(EnumSet<Modifier> modifiers,
List<AnnotationExpr> annotations,
List<TypeParameter> typeParameters,
Type elementType,
List<ArrayBracketPair> arrayBracketPairsAfterElementType,
String name,
List<Parameter> parameters,
List<ArrayBracketPair> arrayBracketPairsAfterParameterList,
List<ReferenceType> throws_,
BlockStmt body) |
MethodDeclaration(EnumSet<Modifier> modifiers,
Type elementType,
String name) |
MethodDeclaration(EnumSet<Modifier> modifiers,
Type elementType,
String name,
List<Parameter> parameters) |
MethodDeclaration(Range range,
EnumSet<Modifier> modifiers,
List<AnnotationExpr> annotations,
List<TypeParameter> typeParameters,
Type elementType,
List<ArrayBracketPair> arrayBracketPairsAfterElementType,
NameExpr nameExpr,
List<Parameter> parameters,
List<ArrayBracketPair> arrayBracketPairsAfterParameterList,
List<ReferenceType> throws_,
BlockStmt body) |
getAnnotations, setAnnotationsaddOrphanComment, clone, contains, equals, getAllContainedComments, getBegin, getChildrenNodes, getComment, getEnd, getNodesByType, getOrphanComments, getParentNode, getParentNodeOfType, getRange, getUserData, hasComment, hashCode, isPositionedAfter, isPositionedBefore, setAsParentNodeOf, setAsParentNodeOf, setBegin, setBlockComment, setComment, setEnd, setLineComment, setParentNode, setRange, setUserData, toString, toStringWithoutComments, tryAddImportToParentCompilationUnitfinalize, getClass, notify, notifyAll, wait, wait, waitsetJavaDocCommentsetType, setTypesetElementType, setElementTypeaddModifier, isAbstract, isFinal, isNative, isPrivate, isProtected, isPublic, isStatic, isStrictfp, isSynchronized, isTransient, isVolatileaddAndGetParameter, addAndGetParameter, addAndGetParameter, addAndGetParameter, addParameter, addParameter, addParameter, addParameter, getParamByName, getParamByType, getParamByTypeaddThrows, addThrows, isThrows, isThrowscreateBodyaddAnnotation, addAnnotation, addMarkerAnnotation, addMarkerAnnotation, addSingleMemberAnnotation, addSingleMemberAnnotation, getAnnotationByClass, getAnnotationByName, isAnnotationPresent, isAnnotationPresentpublic MethodDeclaration()
public MethodDeclaration(EnumSet<Modifier> modifiers, Type elementType, String name)
public MethodDeclaration(EnumSet<Modifier> modifiers, Type elementType, String name, List<Parameter> parameters)
public MethodDeclaration(EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, List<TypeParameter> typeParameters, Type elementType, List<ArrayBracketPair> arrayBracketPairsAfterElementType, String name, List<Parameter> parameters, List<ArrayBracketPair> arrayBracketPairsAfterParameterList, List<ReferenceType> throws_, BlockStmt body)
public MethodDeclaration(Range range, EnumSet<Modifier> modifiers, List<AnnotationExpr> annotations, List<TypeParameter> typeParameters, Type elementType, List<ArrayBracketPair> arrayBracketPairsAfterElementType, NameExpr nameExpr, List<Parameter> parameters, List<ArrayBracketPair> arrayBracketPairsAfterParameterList, List<ReferenceType> throws_, BlockStmt body)
public <R,A> R accept(GenericVisitor<R,A> v, A arg)
Nodepublic <A> void accept(VoidVisitor<A> v, A arg)
Nodepublic BlockStmt getBody()
getBody in interface NodeWithBlockStmt<MethodDeclaration>public EnumSet<Modifier> getModifiers()
getModifiers in interface NodeWithModifiers<MethodDeclaration>Modifierpublic String getName()
getName in interface NodeWithName<MethodDeclaration>public NameExpr getNameExpr()
public List<Parameter> getParameters()
getParameters in interface NodeWithParameters<MethodDeclaration>public List<ReferenceType> getThrows()
getThrows in interface NodeWithThrowable<MethodDeclaration>public Type getType()
NodeWithTypegetType in interface NodeWithType<MethodDeclaration>public Type getElementType()
getElementType in interface NodeWithElementType<MethodDeclaration>public List<TypeParameter> getTypeParameters()
public MethodDeclaration setBody(BlockStmt body)
setBody in interface NodeWithBlockStmt<MethodDeclaration>public MethodDeclaration setModifiers(EnumSet<Modifier> modifiers)
setModifiers in interface NodeWithModifiers<MethodDeclaration>public MethodDeclaration setName(String name)
setName in interface NodeWithName<MethodDeclaration>public MethodDeclaration setNameExpr(NameExpr name)
public MethodDeclaration setParameters(List<Parameter> parameters)
setParameters in interface NodeWithParameters<MethodDeclaration>public MethodDeclaration setThrows(List<ReferenceType> throws_)
setThrows in interface NodeWithThrowable<MethodDeclaration>public MethodDeclaration setType(Type type)
NodeWithTypesetType in interface NodeWithType<MethodDeclaration>type - the typepublic MethodDeclaration setElementType(Type elementType)
setElementType in interface NodeWithElementType<MethodDeclaration>elementType - the element elementTypepublic MethodDeclaration setTypeParameters(List<TypeParameter> typeParameters)
public boolean isDefault()
public MethodDeclaration setDefault(boolean isDefault)
public String getDeclarationAsString()
NodeWithDeclarationNodeWithDeclaration.getDeclarationAsString(boolean, boolean, boolean) including
the modifiers, the throws clause and the parameters with both type and name.getDeclarationAsString in interface NodeWithDeclarationpublic String getDeclarationAsString(boolean includingModifiers, boolean includingThrows)
NodeWithDeclarationNodeWithDeclaration.getDeclarationAsString(boolean, boolean, boolean) including
the parameters with both type and name.getDeclarationAsString in interface NodeWithDeclarationincludingModifiers - flag to include the modifiers (if present) in the string producedincludingThrows - flag to include the throws clause (if present) in the string producedpublic String getDeclarationAsString(boolean includingModifiers, boolean includingThrows, boolean includingParameterName)
getDeclarationAsString in interface NodeWithDeclarationincludingModifiers - flag to include the modifiers (if present) in the string producedincludingThrows - flag to include the throws clause (if present) in the string producedincludingParameterName - flag to include the parameter name (while the parameter type is always included) in the string producedpublic JavadocComment getJavaDoc()
NodeWithJavaDocgetJavaDoc in interface NodeWithJavaDoc<MethodDeclaration>public List<ArrayBracketPair> getArrayBracketPairsAfterElementType()
getArrayBracketPairsAfterElementType in interface NodeWithElementType<MethodDeclaration>class C { int[] abc; }public MethodDeclaration setArrayBracketPairsAfterElementType(List<ArrayBracketPair> arrayBracketPairsAfterType)
setArrayBracketPairsAfterElementType in interface NodeWithElementType<MethodDeclaration>public List<ArrayBracketPair> getArrayBracketPairsAfterParameterList()
int abc()[] {...}public MethodDeclaration setArrayBracketPairsAfterParameterList(List<ArrayBracketPair> arrayBracketPairsAfterParameterList)
Copyright © 2007–2016. All rights reserved.