Package de.monticore.symboltable
Interface ISymbol
- All Known Subinterfaces:
IScopeSpanningSymbol,IStereotypeSymbol
- All Known Implementing Classes:
SymbolWithScopeOfUnknownKind
public interface ISymbol
-
Method Summary
Modifier and TypeMethodDescriptiondefault voidaccept(ITraverser visitor) default AccessModifiergetName()default de.se_rwth.commons.SourcePositionReturns the stereotypes of this symbol, associated with values for them if present.
The keys of the map referenceIStereotypeSymbols, while the values reference the optionally associated stereovalue.booleanvoidsetAccessModifier(AccessModifier accessModifier) Sets the access modifier, such as public or protected in Java.sortSymbolsByPosition(Collection<T> unorderedSymbols)
-
Method Details
-
getName
String getName()- Returns:
- the symbol name
-
getPackageName
String getPackageName()- Returns:
- the package of this symbol. The package name of all symbols within an artifact is
usually the same. For example, the package name of a state chart
p.q.SCand its containing statesare the same, i.e.,p.q. - See Also:
-
getFullName
String getFullName()- Returns:
- the package of this symbol. All symbols within an artifact usually have the same
package name. For example, the state chart
p.q.SCand its containing states all have the packagep.q. - See Also:
-
getEnclosingScope
IScope getEnclosingScope()- Returns:
- Returns the enclosing scope of this symbol. Symbol classes implementing the
ISymbolinterface override this method and refine the return type to the scASTope classes of the language.
-
getAccessModifier
- Returns:
- the access modifier, such as public or protected in Java. By default, the
AccessModifier.ALL_INCLUSIONis returned, which indicates that the symbol does not have any access modifier. Note that this is not the same as the (implicit) access modifierBasicAccessModifier.PACKAGE_LOCALof Java.
-
setAccessModifier
Sets the access modifier, such as public or protected in Java.- Parameters:
accessModifier- the access modifier
-
getStereoinfo
Map<IStereotypeReference,Optional<Value>> getStereoinfo()Returns the stereotypes of this symbol, associated with values for them if present.
The keys of the map referenceIStereotypeSymbols, while the values reference the optionally associated stereovalue. -
isPresentAstNode
boolean isPresentAstNode() -
getAstNode
ASTNode getAstNode() -
getSourcePosition
default de.se_rwth.commons.SourcePosition getSourcePosition()- Returns:
- the position of this symbol in the source model. By default, it is the source position of the ast node.
-
sortSymbolsByPosition
-
accept
-