Interface ScalaNode<T extends scala.meta.Tree>
-
- Type Parameters:
T
- The Scala node type that extends Scala's Tree trait
- All Superinterfaces:
Node
- All Known Implementing Classes:
ASTCase
,ASTCtorPrimary
,ASTCtorSecondary
,ASTDeclDef
,ASTDeclType
,ASTDeclVal
,ASTDeclVar
,ASTDefnClass
,ASTDefnDef
,ASTDefnMacro
,ASTDefnObject
,ASTDefnTrait
,ASTDefnType
,ASTDefnVal
,ASTDefnVar
,ASTEnumeratorGenerator
,ASTEnumeratorGuard
,ASTEnumeratorVal
,ASTImport
,ASTImporteeName
,ASTImporteeRename
,ASTImporteeUnimport
,ASTImporteeWildcard
,ASTImporter
,ASTInit
,ASTLitBoolean
,ASTLitByte
,ASTLitChar
,ASTLitDouble
,ASTLitFloat
,ASTLitInt
,ASTLitLong
,ASTLitNull
,ASTLitShort
,ASTLitString
,ASTLitSymbol
,ASTLitUnit
,ASTModAbstract
,ASTModAnnot
,ASTModCase
,ASTModContravariant
,ASTModCovariant
,ASTModFinal
,ASTModImplicit
,ASTModInline
,ASTModLazy
,ASTModOverride
,ASTModPrivate
,ASTModProtected
,ASTModSealed
,ASTModValParam
,ASTModVarParam
,ASTNameAnonymous
,ASTNameIndeterminate
,ASTPatAlternative
,ASTPatBind
,ASTPatExtract
,ASTPatExtractInfix
,ASTPatInterpolate
,ASTPatSeqWildcard
,ASTPatTuple
,ASTPatTyped
,ASTPatVar
,ASTPatWildcard
,ASTPatXml
,ASTPkg
,ASTPkgObject
,ASTQuasi
,ASTSelf
,ASTSource
,ASTTemplate
,ASTTermAnnotate
,ASTTermApply
,ASTTermApplyInfix
,ASTTermApplyType
,ASTTermApplyUnary
,ASTTermAscribe
,ASTTermAssign
,ASTTermBlock
,ASTTermDo
,ASTTermEta
,ASTTermFor
,ASTTermForYield
,ASTTermFunction
,ASTTermIf
,ASTTermInterpolate
,ASTTermMatch
,ASTTermName
,ASTTermNew
,ASTTermNewAnonymous
,ASTTermParam
,ASTTermPartialFunction
,ASTTermPlaceholder
,ASTTermRepeated
,ASTTermReturn
,ASTTermSelect
,ASTTermSuper
,ASTTermThis
,ASTTermThrow
,ASTTermTry
,ASTTermTryWithHandler
,ASTTermTuple
,ASTTermWhile
,ASTTermXml
,ASTTypeAnd
,ASTTypeAnnotate
,ASTTypeApply
,ASTTypeApplyInfix
,ASTTypeBounds
,ASTTypeByName
,ASTTypeExistential
,ASTTypeFunction
,ASTTypeImplicitFunction
,ASTTypeLambda
,ASTTypeMethod
,ASTTypeName
,ASTTypeOr
,ASTTypeParam
,ASTTypePlaceholder
,ASTTypeProject
,ASTTypeRefine
,ASTTypeRepeated
,ASTTypeSelect
,ASTTypeSingleton
,ASTTypeTuple
,ASTTypeVar
,ASTTypeWith
public interface ScalaNode<T extends scala.meta.Tree> extends Node
A Base interface of a Scala Node. Defines several required methods of all nodes.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description <D,R>
Raccept(ScalaParserVisitor<D,R> visitor, D data)
Accept a visitor and traverse this node.Iterable<? extends ScalaNode<?>>
children()
ScalaNode<?>
getChild(int idx)
T
getNode()
Deprecated.The underlying scala node should not be used directly.ScalaNode<?>
getParent()
boolean
isImplicit()
Returns true if the node is implicit.-
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, getXPathNodeName, hasDescendantMatchingXPath, hasDescendantOfType, hasImageEqualTo, isFindBoundary, jjtAddChild, jjtClose, jjtGetChild, jjtGetChildIndex, jjtGetId, jjtGetNumChildren, jjtGetParent, jjtOpen, jjtSetChildIndex, jjtSetParent, remove, removeChildAtIndex, setDataFlowNode, setImage, setUserData
-
-
-
-
Method Detail
-
accept
<D,R> R accept(ScalaParserVisitor<D,R> visitor, D data)
Accept a visitor and traverse this node.- Type Parameters:
D
- The type of the data inputR
- The type of the returned data- Parameters:
visitor
- the visitor to visit this node withdata
- context-specific data to pass along- Returns:
- context-specific data for this Visitor pattern
-
getNode
@Deprecated T getNode()
Deprecated.The underlying scala node should not be used directly.Get the underlying Scala Node.- Returns:
- the Scala Node for this node
-
isImplicit
boolean isImplicit()
Returns true if the node is implicit. If this node has no non-implicit descendant, then its text bounds identify an empty region of the source document. In that case, the end column is smaller than the begin column. That's because the end column index is inclusive.
-
-