Class ASTComponentReference
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.impl.AbstractNode<B,N>
-
- net.sourceforge.pmd.lang.ast.impl.javacc.AbstractJjtreeNode<net.sourceforge.pmd.lang.modelica.ast.AbstractModelicaNode,ModelicaNode>
-
- net.sourceforge.pmd.lang.modelica.ast.ASTComponentReference
-
- All Implemented Interfaces:
GenericNode<ModelicaNode>,JjtreeNode<ModelicaNode>,Node,TextAvailableNode,ModelicaNode,ResolvableModelicaNode,Reportable
public final class ASTComponentReference extends AbstractJjtreeNode<net.sourceforge.pmd.lang.modelica.ast.AbstractModelicaNode,ModelicaNode> implements ResolvableModelicaNode
-
-
Field Summary
-
Fields inherited from class net.sourceforge.pmd.lang.ast.impl.javacc.AbstractJjtreeNode
id
-
Fields inherited from interface net.sourceforge.pmd.lang.ast.Node
COORDS_COMPARATOR
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected <P,R>
RacceptModelicaVisitor(ModelicaVisitor<? super P,? extends R> visitor, P data)<P,R>
RacceptVisitor(AstVisitor<? super P,? extends R> visitor, P data)CompositeNamegetCompositeNameWithoutSubscripts()Returns aCompositeNameobject representing the lexical reference with subscripts being ignored, if any.ModelicaScopegetContainingScope()Returns the lexical scope this node is contained in.ModelicaScopegetMostSpecificScope()Returns the most specific lexical scope naturally associated with this node.ResolutionResult<ResolvableEntity>getResolutionCandidates()Returns resolution candidates for the referred component (and not dereferencing its type, etc.).StringgetResolvedTo()StringgetXPathNodeName()voidjjtClose()-
Methods inherited from class net.sourceforge.pmd.lang.ast.impl.javacc.AbstractJjtreeNode
addChild, compareLocation, fitTokensToChildren, getFirstToken, getImage, getLastToken, getTextRegion, insertChild, jjtOpen, setFirstToken, setImage, setLastToken, toString
-
Methods inherited from class net.sourceforge.pmd.lang.ast.impl.AbstractNode
children, firstChild, getChild, getIndexInParent, getNumChildren, getParent, getUserMap, remove, removeChildAtIndex, setChild, setParent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.impl.GenericNode
ancestors, ancestorsOrSelf, asStream, children, descendants, descendantsOrSelf, getChild, getFirstChild, getLastChild, getNextSibling, getParent, getPreviousSibling
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.impl.javacc.JjtreeNode
getFirstToken, getLastToken, tokens
-
Methods inherited from interface net.sourceforge.pmd.lang.modelica.ast.ModelicaNode
getContainingScope, getMostSpecificScope
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.Node
acceptVisitor, ancestors, children, compareLocation, descendants, firstChild, getAstInfo, getBeginColumn, getBeginLine, getEndColumn, getEndLine, getImage, getIndexInParent, getLanguageVersion, getNumChildren, getReportLocation, getRoot, getTextDocument, getUserMap, getXPathAttributesIterator, getXPathNodeName, hasImageEqualTo, isFindBoundary
-
Methods inherited from interface net.sourceforge.pmd.lang.ast.TextAvailableNode
getOriginalText, getText, getTextRegion
-
-
-
-
Method Detail
-
getCompositeNameWithoutSubscripts
public CompositeName getCompositeNameWithoutSubscripts()
Returns aCompositeNameobject representing the lexical reference with subscripts being ignored, if any.
-
getResolutionCandidates
public ResolutionResult<ResolvableEntity> getResolutionCandidates()
Returns resolution candidates for the referred component (and not dereferencing its type, etc.). We do not decide on entity type on behalf of the rule code, since this may introduce false negatives.- Specified by:
getResolutionCandidatesin interfaceResolvableModelicaNode
-
getResolvedTo
public String getResolvedTo()
-
acceptModelicaVisitor
protected <P,R> R acceptModelicaVisitor(ModelicaVisitor<? super P,? extends R> visitor, P data)
-
jjtClose
public void jjtClose()
- Overrides:
jjtClosein classAbstractJjtreeNode<net.sourceforge.pmd.lang.modelica.ast.AbstractModelicaNode,ModelicaNode>
-
acceptVisitor
public final <P,R> R acceptVisitor(AstVisitor<? super P,? extends R> visitor, P data)
- Specified by:
acceptVisitorin interfaceNode
-
getXPathNodeName
public String getXPathNodeName()
- Specified by:
getXPathNodeNamein interfaceNode
-
getContainingScope
public ModelicaScope getContainingScope()
Description copied from interface:ModelicaNodeReturns the lexical scope this node is contained in.- Specified by:
getContainingScopein interfaceModelicaNode
-
getMostSpecificScope
public ModelicaScope getMostSpecificScope()
Description copied from interface:ModelicaNodeReturns the most specific lexical scope naturally associated with this node.- Specified by:
getMostSpecificScopein interfaceModelicaNode- Returns:
- the scope defined by this node itself or the same as
ModelicaNode.getContainingScope()otherwise
-
-