Class PHPTree

java.lang.Object
org.sonar.php.tree.impl.PHPTree
All Implemented Interfaces:
Tree
Direct Known Subclasses:
AnonymousClassTreeImpl, ArrayAccessTreeImpl, ArrayAssignmentPatternElementTreeImpl, ArrayAssignmentPatternTreeImpl, ArrayInitializerBracketTreeImpl, ArrayInitializerFunctionTreeImpl, ArrayPairTreeImpl, ArrowFunctionExpressionTreeImpl, AssignmentByReferenceTreeImpl, AssignmentExpressionTreeImpl, AttributeGroupTreeImpl, AttributeTreeImpl, BinaryExpressionTreeImpl, BlockTreeImpl, BreakStatementTreeImpl, BuiltInTypeTreeImpl, CallableConvertTreeImpl, CallArgumentTreeImpl, CaseClauseTreeImpl, CastExpressionTreeImpl, CatchBlockTreeImpl, ClassDeclarationTreeImpl, ClassPropertyDeclarationTreeImpl, CombinedTypeTreeImpl, CompilationUnitTreeImpl, CompoundVariableTreeImpl, ComputedVariableTreeImpl, ConditionalExpressionTreeImpl, ConstantDeclarationTreeImpl, ContinueStatementTreeImpl, DeclareStatementTreeImpl, DefaultClauseTreeImpl, DoWhileStatementTreeImpl, EchoTagStatementTreeImpl, ElseClauseTreeImpl, ElseifClauseTreeImpl, EmptyStatementImpl, EnumCaseTreeImpl, ExecutionOperatorTreeImpl, ExpandableStringCharactersTreeImpl, ExpandableStringLiteralTreeImpl, ExpressionListStatementTreeImpl, ExpressionStatementTreeImpl, ForEachStatementTreeImpl, ForStatementTreeImpl, FunctionCallTreeImpl, FunctionDeclarationTreeImpl, FunctionExpressionTreeImpl, GlobalStatementTreeImpl, GotoStatementTreeImpl, HeredocStringLiteralTreeImpl, HeredocStringLiteralTreeImpl.HeredocBody, IfStatementTreeImpl, InlineHTMLTreeImpl, InternalSyntaxToken, InternalSyntaxTrivia, LabelTreeImpl, LexicalVariablesTreeImpl, ListExpressionTreeImpl, LiteralTreeImpl, MatchConditionClauseTreeImpl, MatchDefaultClauseTreeImpl, MatchExpressionTreeImpl, MemberAccessTreeImpl, MethodDeclarationTreeImpl, NameIdentifierTreeImpl, NamespaceNameTreeImpl, NamespaceStatementTreeImpl, NewExpressionTreeImpl, ParameterListTreeImpl, ParameterTreeImpl, ParenthesizedExpressionTreeImpl, PostfixExpressionTreeImpl, PrefixedCastExpressionTreeImpl, PrefixExpressionTreeImpl, ReferenceVariableTreeImpl, ReturnStatementTreeImpl, ReturnTypeClauseTreeImpl, ScriptTreeImpl, SpreadArgumentTreeImpl, StaticStatementTreeImpl, SwitchStatementTreeImpl, ThrowExpressionTreeImpl, ThrowStatementTreeImpl, TraitAliasTreeImpl, TraitMethodReferenceTreeImpl, TraitPrecedenceTreeImpl, TryStatementTreeImpl, TypeTreeImpl, UnsetVariableStatementTreeImpl, UseClauseTreeImpl, UseStatementTreeImpl, UseTraitDeclarationTreeImpl, VariableDeclarationTreeImpl, VariableIdentifierTreeImpl, VariableVariableTreeImpl, WhileStatementTreeImpl, YieldExpressionTreeImpl

public abstract class PHPTree extends Object implements Tree
  • Constructor Details

    • PHPTree

      public PHPTree()
  • Method Details

    • setParent

      public void setParent(Tree parent)
    • getParent

      @Nullable public Tree getParent()
      Specified by:
      getParent in interface Tree
    • getLine

      public int getLine()
    • is

      public final boolean is(Tree.Kind... kind)
      Specified by:
      is in interface Tree
    • childrenIterator

      public abstract Iterator<Tree> childrenIterator()
      Creates iterator for children of this node. Note that iterator may contain null elements.
      Throws:
      UnsupportedOperationException - if isLeaf() returns true
    • isLeaf

      public boolean isLeaf()
    • getLastToken

      public SyntaxToken getLastToken()
    • getFirstToken

      public SyntaxToken getFirstToken()
    • toString

      public String toString()
      Overrides:
      toString in class Object