public final class MethodDeclaration extends BodyDeclaration implements org.walkmod.merger.Mergeable<MethodDeclaration>, SymbolDataAware<MethodSymbolData>, SymbolDefinition
| Constructor and Description |
|---|
MethodDeclaration() |
MethodDeclaration(int beginLine,
int beginColumn,
int endLine,
int endColumn,
JavadocComment javaDoc,
int modifiers,
List<AnnotationExpr> annotations,
List<TypeParameter> typeParameters,
Type type,
String name,
List<Parameter> parameters,
int arrayCount,
List<ClassOrInterfaceType> throws_,
BlockStmt block) |
MethodDeclaration(int beginLine,
int beginColumn,
int endLine,
int endColumn,
JavadocComment javaDoc,
int modifiers,
List<AnnotationExpr> annotations,
List<TypeParameter> typeParameters,
Type type,
String name,
List<Parameter> parameters,
int arrayCount,
List<ClassOrInterfaceType> throws_,
BlockStmt block,
boolean isDefault) |
MethodDeclaration(int modifiers,
Type type,
String name) |
MethodDeclaration(int modifiers,
Type type,
String name,
List<Parameter> parameters) |
MethodDeclaration(JavadocComment javaDoc,
int modifiers,
List<AnnotationExpr> annotations,
List<TypeParameter> typeParameters,
Type type,
String name,
List<Parameter> parameters,
int arrayCount,
List<ClassOrInterfaceType> throws_,
BlockStmt block) |
MethodDeclaration(JavadocComment javaDoc,
int modifiers,
List<AnnotationExpr> annotations,
List<TypeParameter> typeParameters,
Type type,
String name,
List<Parameter> parameters,
int arrayCount,
List<ClassOrInterfaceType> throws_,
BlockStmt block,
boolean isDefault) |
| Modifier and Type | Method and Description |
|---|---|
<R,A> R |
accept(GenericVisitor<R,A> v,
A arg)
Accept method for visitor support.
|
<A> void |
accept(VoidVisitor<A> v,
A arg)
Accept method for visitor support.
|
boolean |
addBodyReference(SymbolReference bodyReference)
Adds a symbol reference to this definition.
|
boolean |
addUsage(SymbolReference usage)
Adds a usage reference to this definition and updates the definition in
that reference.
|
MethodDeclaration |
clone() |
int |
getArrayCount() |
BlockStmt |
getBody() |
List<SymbolReference> |
getBodyReferences()
Returns the external references contained inside the body of this
definition.
|
List<Node> |
getChildren() |
Comparator<?> |
getIdentityComparator() |
int |
getModifiers()
Return the modifiers of this member declaration.
|
String |
getName() |
List<Parameter> |
getParameters() |
int |
getScopeLevel()
Returns the scope level where this definition is specified.
|
MethodSymbolData |
getSymbolData()
Returns the symbol data related to a given node.
|
String |
getSymbolName()
Gets the symbol name
|
List<ClassOrInterfaceType> |
getThrows() |
Type |
getType() |
Map<String,SymbolDefinition> |
getTypeDefinitions()
Gets the available variables
|
List<TypeParameter> |
getTypeParameters() |
List<SymbolReference> |
getUsages()
Returns the references that represent usages to that definition.
|
Map<String,SymbolDefinition> |
getVariableDefinitions()
Gets the available variables
|
boolean |
isDefault() |
void |
merge(MethodDeclaration remote,
org.walkmod.merger.MergeEngine configuration) |
boolean |
removeChild(Node child) |
boolean |
replaceChildNode(Node oldChild,
Node newChild) |
void |
setArrayCount(int arrayCount) |
void |
setBody(BlockStmt body) |
void |
setBodyReferences(List<SymbolReference> bodyReferences)
Sets the external references contained inside the body of this
definition.
|
void |
setDefault(boolean isDefault) |
void |
setModifiers(int modifiers) |
void |
setName(String name) |
void |
setParameters(List<Parameter> parameters) |
void |
setScopeLevel(int scopeLevel)
Sets the scope level where this definition is specified.
|
void |
setSymbolData(MethodSymbolData symbolData)
Sets the symbol data from a semantic analyzer.
|
void |
setThrows(List<ClassOrInterfaceType> throws_) |
void |
setType(Type type) |
void |
setTypeParameters(List<TypeParameter> typeParameters) |
void |
setUsages(List<SymbolReference> usages)
Sets the references that represent usages to that definition.
|
getAnnotations, getJavaDoc, getMethodDefinitions, merge, setAnnotations, setJavaDoccheck, clone, clone, contains, diableConstraints, enableConstraints, equals, getBeginColumn, getBeginLine, getCommonAncestor, getConstraints, getData, getEndColumn, getEndLine, getParentNode, getPrettySource, getPrettySource, hashCode, isAncestorOf, isInEqualLocation, isNewNode, isPreviousThan, remove, replaceChildNodeInList, setAsParentNodeOf, setAsParentNodeOf, setBeginColumn, setBeginLine, setConstraints, setData, setEndColumn, setEndLine, toString, updateReferencesfinalize, getClass, notify, notifyAll, wait, wait, waitgetMethodDefinitionspublic MethodDeclaration()
public MethodDeclaration(int modifiers,
Type type,
String name,
List<Parameter> parameters)
public MethodDeclaration(JavadocComment javaDoc, int modifiers, List<AnnotationExpr> annotations, List<TypeParameter> typeParameters, Type type, String name, List<Parameter> parameters, int arrayCount, List<ClassOrInterfaceType> throws_, BlockStmt block)
public MethodDeclaration(JavadocComment javaDoc, int modifiers, List<AnnotationExpr> annotations, List<TypeParameter> typeParameters, Type type, String name, List<Parameter> parameters, int arrayCount, List<ClassOrInterfaceType> throws_, BlockStmt block, boolean isDefault)
public MethodDeclaration(int beginLine,
int beginColumn,
int endLine,
int endColumn,
JavadocComment javaDoc,
int modifiers,
List<AnnotationExpr> annotations,
List<TypeParameter> typeParameters,
Type type,
String name,
List<Parameter> parameters,
int arrayCount,
List<ClassOrInterfaceType> throws_,
BlockStmt block)
public MethodDeclaration(int beginLine,
int beginColumn,
int endLine,
int endColumn,
JavadocComment javaDoc,
int modifiers,
List<AnnotationExpr> annotations,
List<TypeParameter> typeParameters,
Type type,
String name,
List<Parameter> parameters,
int arrayCount,
List<ClassOrInterfaceType> throws_,
BlockStmt block,
boolean isDefault)
public boolean removeChild(Node child)
removeChild in class BodyDeclarationpublic List<Node> getChildren()
getChildren in class BodyDeclarationpublic <R,A> R accept(GenericVisitor<R,A> v, A arg)
Nodepublic <A> void accept(VoidVisitor<A> v, A arg)
Nodepublic int getArrayCount()
public BlockStmt getBody()
public int getModifiers()
ModifierSetpublic String getName()
public List<ClassOrInterfaceType> getThrows()
public Type getType()
public List<TypeParameter> getTypeParameters()
public void setArrayCount(int arrayCount)
public void setBody(BlockStmt body)
public void setModifiers(int modifiers)
public void setName(String name)
public void setThrows(List<ClassOrInterfaceType> throws_)
public void setType(Type type)
public void setTypeParameters(List<TypeParameter> typeParameters)
public Comparator<?> getIdentityComparator()
getIdentityComparator in interface org.walkmod.merger.IdentificableNodepublic void merge(MethodDeclaration remote, org.walkmod.merger.MergeEngine configuration)
merge in interface org.walkmod.merger.Mergeable<MethodDeclaration>public boolean isDefault()
public void setDefault(boolean isDefault)
public MethodSymbolData getSymbolData()
SymbolDataAwaregetSymbolData in interface SymbolDataAware<MethodSymbolData>public void setSymbolData(MethodSymbolData symbolData)
SymbolDataAwaresetSymbolData in interface SymbolDataAware<MethodSymbolData>symbolData - the symbol data.public List<SymbolReference> getUsages()
SymbolDefinitiongetUsages in interface SymbolDefinitionpublic void setUsages(List<SymbolReference> usages)
SymbolDefinitionsetUsages in interface SymbolDefinitionusages - references that represent usages to that definition.public List<SymbolReference> getBodyReferences()
SymbolDefinitiongetBodyReferences in interface SymbolDefinitionpublic void setBodyReferences(List<SymbolReference> bodyReferences)
SymbolDefinitionsetBodyReferences in interface SymbolDefinitionbodyReferences - external references contained inside the body of this
definition.public int getScopeLevel()
SymbolDefinitiongetScopeLevel in interface SymbolDefinitionpublic void setScopeLevel(int scopeLevel)
SymbolDefinitionsetScopeLevel in interface SymbolDefinitionscopeLevel - the scope level where this definition is specified.public boolean addBodyReference(SymbolReference bodyReference)
SymbolDefinitionaddBodyReference in interface SymbolDefinitionbodyReference - the reference to add.public boolean addUsage(SymbolReference usage)
SymbolDefinitionaddUsage in interface SymbolDefinitionusage - reference to this definition.public boolean replaceChildNode(Node oldChild, Node newChild)
replaceChildNode in class BodyDeclarationpublic MethodDeclaration clone() throws CloneNotSupportedException
clone in class NodeCloneNotSupportedExceptionpublic Map<String,SymbolDefinition> getVariableDefinitions()
ScopeAwaregetVariableDefinitions in interface ScopeAwaregetVariableDefinitions in class BodyDeclarationpublic Map<String,SymbolDefinition> getTypeDefinitions()
ScopeAwaregetTypeDefinitions in interface ScopeAwaregetTypeDefinitions in class BodyDeclarationpublic String getSymbolName()
SymbolDefinitiongetSymbolName in interface SymbolDefinitionCopyright © 2018. All rights reserved.