Package net.sourceforge.pmd.lang.vm.ast
Class ASTReference
- java.lang.Object
-
- net.sourceforge.pmd.lang.ast.AbstractNode
-
- net.sourceforge.pmd.lang.ast.impl.javacc.AbstractJjtreeNode<VmNode>
-
- net.sourceforge.pmd.lang.vm.ast.AbstractVmNode
-
- net.sourceforge.pmd.lang.vm.ast.ASTReference
-
public class ASTReference extends AbstractVmNode
This class is responsible for handling the references in VTL ($foo). Please look at the Parser.jjt file which is what controls the generation of this class.- Version:
- $Id: ASTReference.java 806597 2009-08-21 15:21:44Z nbubna $
- Author:
- Jason van Zyl, Geir Magnusson Jr., Christoph Reck, Kent Johnson
-
-
Field Summary
Fields Modifier and Type Field Description boolean
strictRef
Deprecated.for removal with PMD 7.0.0boolean
toStringNullCheck
Deprecated.for removal with PMD 7.0.0-
Fields inherited from class net.sourceforge.pmd.lang.vm.ast.AbstractVmNode
first, info, invalid, last, parser, state, templateName
-
Fields inherited from class net.sourceforge.pmd.lang.ast.AbstractNode
beginColumn, beginLine, childIndex, children, endColumn, endLine, firstToken, id, lastToken, parent
-
-
Constructor Summary
Constructors Constructor Description ASTReference(int id)
Deprecated.ASTReference(VmParser p, int id)
Deprecated.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description String
getRootString()
Returns the 'root string', the reference keyObject
jjtAccept(VmParserVisitor visitor, Object data)
Accept the visitor.String
literal()
Override of the SimpleNode method literal() Returns the literal representation of the node.void
setLiteral(String literal)
Deprecated.-
Methods inherited from class net.sourceforge.pmd.lang.vm.ast.AbstractVmNode
childrenAccept, dump, getColumn, getFirstToken, getInfo, getLastToken, getLine, getTemplateName, getType, getXPathNodeName, isInvalid, jjtClose, jjtOpen, setFirstToken, setInfo, setInvalid, toString
-
Methods inherited from class net.sourceforge.pmd.lang.ast.impl.javacc.AbstractJjtreeNode
children, getChild, getParent
-
Methods inherited from class net.sourceforge.pmd.lang.ast.AbstractNode
appendElement, findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getImage, getIndexInParent, getNthParent, getNumChildren, getParentsOfType, getUserData, getUserMap, getXPathAttributesIterator, hasDecendantOfAnyType, hasDescendantMatchingXPath, hasDescendantOfAnyType, hasDescendantOfType, hasImageEqualTo, isFindBoundary, isSingleLine, jjtAddChild, jjtGetChild, jjtGetChildIndex, jjtGetFirstToken, jjtGetId, jjtGetLastToken, jjtGetNumChildren, jjtGetParent, jjtSetChildIndex, jjtSetFirstToken, jjtSetLastToken, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData, testingOnlySetBeginColumn, testingOnlySetBeginLine, testingOnlySetEndColumn, testingOnlySetEndLine, toString
-
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.Node
findChildNodesWithXPath, findChildrenOfType, findDescendantsOfType, findDescendantsOfType, findDescendantsOfType, getAsDocument, getBeginColumn, getBeginLine, getDataFlowNode, getEndColumn, getEndLine, getFirstChildOfType, getFirstDescendantOfType, getFirstParentOfAnyType, getFirstParentOfType, getImage, getIndexInParent, getNthParent, getNumChildren, getParentsOfType, getUserData, getUserMap, getXPathAttributesIterator, hasDescendantMatchingXPath, hasDescendantOfType, hasImageEqualTo, isFindBoundary, jjtAddChild, jjtGetChild, jjtGetChildIndex, jjtGetId, jjtGetNumChildren, jjtGetParent, jjtSetChildIndex, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData
-
-
-
-
Field Detail
-
strictRef
@Deprecated public boolean strictRef
Deprecated.for removal with PMD 7.0.0Indicates if we are running in strict reference mode.
-
toStringNullCheck
@Deprecated public boolean toStringNullCheck
Deprecated.for removal with PMD 7.0.0Indicates if toString() should be called during condition evaluation just to ensure it does not return null. Check is unnecessary if all toString() implementations are known to have non-null return values. Disabling the check will give a performance improvement since toString() may be a complex operation on large objects.
-
-
Constructor Detail
-
ASTReference
@InternalApi @Deprecated public ASTReference(int id)
Deprecated.
-
ASTReference
@InternalApi @Deprecated public ASTReference(VmParser p, int id)
Deprecated.
-
-
Method Detail
-
jjtAccept
public Object jjtAccept(VmParserVisitor visitor, Object data)
Description copied from interface:VmNode
Accept the visitor.- Specified by:
jjtAccept
in interfaceVmNode
- Overrides:
jjtAccept
in classAbstractVmNode
-
getRootString
public String getRootString()
Returns the 'root string', the reference key- Returns:
- the root string.
-
setLiteral
@InternalApi @Deprecated public void setLiteral(String literal)
Deprecated.Routine to allow the literal representation to be externally overridden. Used now in the VM system to override a reference in a VM tree with the literal of the calling arg to make it work nicely when calling arg is null. It seems a bit much, but does keep things consistent. Note, you can only set the literal once...- Parameters:
literal
- String to render to when null
-
literal
public String literal()
Override of the SimpleNode method literal() Returns the literal representation of the node. Should be something like $<token>.- Overrides:
literal
in classAbstractVmNode
- Returns:
- A literal string.
-
-