public abstract class TypeDeclaration extends BodyDeclaration implements org.walkmod.merger.Mergeable<TypeDeclaration>, SymbolDataAware<SymbolData>, SymbolDefinition
| Constructor and Description |
|---|
TypeDeclaration() |
TypeDeclaration(int beginLine,
int beginColumn,
int endLine,
int endColumn,
List<AnnotationExpr> annotations,
JavadocComment javaDoc,
int modifiers,
String name,
List<BodyDeclaration> members) |
TypeDeclaration(int modifiers,
String name) |
TypeDeclaration(List<AnnotationExpr> annotations,
JavadocComment javaDoc,
int modifiers,
String name,
List<BodyDeclaration> members) |
| Modifier and Type | Method and Description |
|---|---|
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.
|
List<SymbolReference> |
getBodyReferences()
Returns the external references contained inside the body of this
definition.
|
List<Node> |
getChildren() |
Comparator<?> |
getIdentityComparator() |
List<BodyDeclaration> |
getMembers() |
Map<String,List<SymbolDefinition>> |
getMethodDefinitions()
Gets the available methods
|
int |
getModifiers()
Return the modifiers of this type declaration.
|
String |
getName() |
int |
getScopeLevel()
Returns the scope level where this definition is specified.
|
SymbolData |
getSymbolData()
Returns the symbol data related to a given node.
|
String |
getSymbolName()
Gets the symbol name
|
Map<String,SymbolDefinition> |
getTypeDefinitions()
Gets the available variables
|
List<SymbolReference> |
getUsages()
Returns the references that represent usages to that definition.
|
Map<String,SymbolDefinition> |
getVariableDefinitions()
Gets the available variables
|
void |
merge(TypeDeclaration remoteTypeDeclaration,
org.walkmod.merger.MergeEngine configuration) |
boolean |
removeChild(Node child) |
boolean |
replaceChildNode(Node oldChild,
Node newChild) |
void |
setBodyReferences(List<SymbolReference> bodyReferences)
Sets the external references contained inside the body of this
definition.
|
void |
setMembers(List<BodyDeclaration> members) |
void |
setModifiers(int modifiers) |
void |
setName(String name) |
void |
setScopeLevel(int scopeLevel)
Sets the scope level where this definition is specified.
|
void |
setSymbolData(SymbolData symbolData)
Sets the symbol data from a semantic analyzer.
|
void |
setUsages(List<SymbolReference> usages)
Sets the references that represent usages to that definition.
|
getAnnotations, getJavaDoc, merge, setAnnotations, setJavaDocaccept, accept, check, clone, 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, updateReferencespublic TypeDeclaration()
public TypeDeclaration(int modifiers,
String name)
public TypeDeclaration(List<AnnotationExpr> annotations, JavadocComment javaDoc, int modifiers, String name, List<BodyDeclaration> members)
public TypeDeclaration(int beginLine,
int beginColumn,
int endLine,
int endColumn,
List<AnnotationExpr> annotations,
JavadocComment javaDoc,
int modifiers,
String name,
List<BodyDeclaration> members)
public boolean removeChild(Node child)
removeChild in class BodyDeclarationpublic List<Node> getChildren()
getChildren in class BodyDeclarationpublic final List<BodyDeclaration> getMembers()
public final int getModifiers()
ModifierSetpublic final String getName()
public void setMembers(List<BodyDeclaration> members)
public final void setModifiers(int modifiers)
public final void setName(String name)
public void merge(TypeDeclaration remoteTypeDeclaration, org.walkmod.merger.MergeEngine configuration)
merge in interface org.walkmod.merger.Mergeable<TypeDeclaration>public Comparator<?> getIdentityComparator()
getIdentityComparator in interface org.walkmod.merger.IdentificableNodepublic SymbolData getSymbolData()
SymbolDataAwaregetSymbolData in interface SymbolDataAware<SymbolData>public void setSymbolData(SymbolData symbolData)
SymbolDataAwaresetSymbolData in interface SymbolDataAware<SymbolData>symbolData - the symbol data.public List<SymbolReference> getUsages()
SymbolDefinitiongetUsages in interface SymbolDefinitionpublic List<SymbolReference> getBodyReferences()
SymbolDefinitiongetBodyReferences in interface SymbolDefinitionpublic void setUsages(List<SymbolReference> usages)
SymbolDefinitionsetUsages in interface SymbolDefinitionusages - references that represent usages to that definition.public void setBodyReferences(List<SymbolReference> bodyReferences)
SymbolDefinitionsetBodyReferences in interface SymbolDefinitionbodyReferences - external references contained inside the body of this
definition.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 int getScopeLevel()
SymbolDefinitiongetScopeLevel in interface SymbolDefinitionpublic void setScopeLevel(int scopeLevel)
SymbolDefinitionsetScopeLevel in interface SymbolDefinitionscopeLevel - the scope level where this definition is specified.public boolean replaceChildNode(Node oldChild, Node newChild)
replaceChildNode in class BodyDeclarationpublic Map<String,List<SymbolDefinition>> getMethodDefinitions()
ScopeAwaregetMethodDefinitions in interface ScopeAwaregetMethodDefinitions in class BodyDeclarationpublic 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.