Class AnonymousClassTreeImpl
- java.lang.Object
-
- org.sonar.php.tree.impl.PHPTree
-
- org.sonar.php.tree.impl.expression.AnonymousClassTreeImpl
-
- All Implemented Interfaces:
HasClassSymbol
,ClassTree
,HasAttributes
,AnonymousClassTree
,ExpressionTree
,Tree
public class AnonymousClassTreeImpl extends PHPTree implements AnonymousClassTree, HasClassSymbol
-
-
Field Summary
-
Fields inherited from interface org.sonar.plugins.php.api.tree.declaration.ClassTree
PHP5_CONSTRUCTOR_NAME
-
-
Constructor Summary
Constructors Constructor Description AnonymousClassTreeImpl(List<AttributeGroupTree> attributeGroups, SyntaxToken classToken, SyntaxToken openParenthesisToken, SeparatedList<CallArgumentTree> callArguments, SyntaxToken closeParenthesisToken, SyntaxToken extendsToken, NamespaceNameTree superClass, SyntaxToken implementsToken, SeparatedListImpl<NamespaceNameTree> superInterfaces, SyntaxToken openCurlyBraceToken, List<ClassMemberTree> members, SyntaxToken closeCurlyBraceToken)
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
accept(VisitorCheck visitor)
SeparatedList<ExpressionTree>
arguments()
Deprecated.since 3.11 .List<AttributeGroupTree>
attributeGroups()
SeparatedList<CallArgumentTree>
callArguments()
Iterator<Tree>
childrenIterator()
Creates iterator for children of this node.SyntaxToken
classToken()
SyntaxToken
closeCurlyBraceToken()
SyntaxToken
closeParenthesisToken()
SyntaxToken
extendsToken()
MethodDeclarationTree
fetchConstructor()
Fetch class constructor declaration within classmembers
.Tree.Kind
getKind()
SyntaxToken
implementsToken()
List<ClassMemberTree>
members()
SyntaxToken
openCurlyBraceToken()
SyntaxToken
openParenthesisToken()
void
setSymbol(ClassSymbol symbol)
NamespaceNameTree
superClass()
SeparatedList<NamespaceNameTree>
superInterfaces()
ClassSymbol
symbol()
-
Methods inherited from class org.sonar.php.tree.impl.PHPTree
getFirstToken, getLastToken, getLine, getParent, is, isLeaf, setParent, toString
-
-
-
-
Constructor Detail
-
AnonymousClassTreeImpl
public AnonymousClassTreeImpl(List<AttributeGroupTree> attributeGroups, SyntaxToken classToken, @Nullable SyntaxToken openParenthesisToken, SeparatedList<CallArgumentTree> callArguments, @Nullable SyntaxToken closeParenthesisToken, @Nullable SyntaxToken extendsToken, @Nullable NamespaceNameTree superClass, @Nullable SyntaxToken implementsToken, @Nullable SeparatedListImpl<NamespaceNameTree> superInterfaces, SyntaxToken openCurlyBraceToken, List<ClassMemberTree> members, SyntaxToken closeCurlyBraceToken)
-
-
Method Detail
-
attributeGroups
public List<AttributeGroupTree> attributeGroups()
- Specified by:
attributeGroups
in interfaceHasAttributes
-
classToken
public SyntaxToken classToken()
- Specified by:
classToken
in interfaceAnonymousClassTree
- Specified by:
classToken
in interfaceClassTree
-
openParenthesisToken
@Nullable public SyntaxToken openParenthesisToken()
- Specified by:
openParenthesisToken
in interfaceAnonymousClassTree
-
arguments
@Deprecated public SeparatedList<ExpressionTree> arguments()
Deprecated.since 3.11 . UsecallArguments()
instead.- Specified by:
arguments
in interfaceAnonymousClassTree
-
callArguments
public SeparatedList<CallArgumentTree> callArguments()
- Specified by:
callArguments
in interfaceAnonymousClassTree
-
closeParenthesisToken
@Nullable public SyntaxToken closeParenthesisToken()
- Specified by:
closeParenthesisToken
in interfaceAnonymousClassTree
-
extendsToken
@Nullable public SyntaxToken extendsToken()
- Specified by:
extendsToken
in interfaceAnonymousClassTree
- Specified by:
extendsToken
in interfaceClassTree
-
superClass
@Nullable public NamespaceNameTree superClass()
- Specified by:
superClass
in interfaceAnonymousClassTree
- Specified by:
superClass
in interfaceClassTree
-
implementsToken
@Nullable public SyntaxToken implementsToken()
- Specified by:
implementsToken
in interfaceAnonymousClassTree
- Specified by:
implementsToken
in interfaceClassTree
-
superInterfaces
public SeparatedList<NamespaceNameTree> superInterfaces()
- Specified by:
superInterfaces
in interfaceAnonymousClassTree
- Specified by:
superInterfaces
in interfaceClassTree
-
openCurlyBraceToken
public SyntaxToken openCurlyBraceToken()
- Specified by:
openCurlyBraceToken
in interfaceAnonymousClassTree
- Specified by:
openCurlyBraceToken
in interfaceClassTree
-
members
public List<ClassMemberTree> members()
- Specified by:
members
in interfaceAnonymousClassTree
- Specified by:
members
in interfaceClassTree
-
closeCurlyBraceToken
public SyntaxToken closeCurlyBraceToken()
- Specified by:
closeCurlyBraceToken
in interfaceAnonymousClassTree
- Specified by:
closeCurlyBraceToken
in interfaceClassTree
-
fetchConstructor
@Nullable public MethodDeclarationTree fetchConstructor()
Description copied from interface:ClassTree
Fetch class constructor declaration within classmembers
. Will look for a method named "__construct", if cannot be found it will search for the old-style constructor function, by the name of the class.- Specified by:
fetchConstructor
in interfaceClassTree
- Returns:
- the class constructor method declaration if defined, null otherwise.
-
childrenIterator
public Iterator<Tree> childrenIterator()
Description copied from class:PHPTree
Creates iterator for children of this node. Note that iterator may containnull
elements.- Specified by:
childrenIterator
in classPHPTree
-
accept
public void accept(VisitorCheck visitor)
-
symbol
public ClassSymbol symbol()
- Specified by:
symbol
in interfaceHasClassSymbol
-
setSymbol
public void setSymbol(ClassSymbol symbol)
- Specified by:
setSymbol
in interfaceHasClassSymbol
-
-