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
-
Nested Class Summary
-
Field Summary
Fields inherited from interface org.sonar.plugins.php.api.tree.declaration.ClassTree
PHP5_CONSTRUCTOR_NAME
-
Constructor Summary
ConstructorsConstructorDescriptionAnonymousClassTreeImpl
(List<AttributeGroupTree> attributeGroups, SyntaxToken readonly, 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
Modifier and TypeMethodDescriptionvoid
accept
(VisitorCheck visitor) Deprecated.since 3.11 .Creates iterator for children of this node.Fetch class constructor declaration within classmembers
.getKind()
boolean
members()
void
setSymbol
(ClassSymbol symbol) symbol()
Methods inherited from class org.sonar.php.tree.impl.PHPTree
getFirstToken, getLastToken, getLine, getParent, is, isLeaf, setParent, toString
-
Constructor Details
-
AnonymousClassTreeImpl
public AnonymousClassTreeImpl(List<AttributeGroupTree> attributeGroups, @Nullable SyntaxToken readonly, 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 Details
-
attributeGroups
- Specified by:
attributeGroups
in interfaceHasAttributes
-
isReadOnly
public boolean isReadOnly()- Specified by:
isReadOnly
in interfaceAnonymousClassTree
-
classToken
- Specified by:
classToken
in interfaceAnonymousClassTree
- Specified by:
classToken
in interfaceClassTree
-
openParenthesisToken
- Specified by:
openParenthesisToken
in interfaceAnonymousClassTree
-
arguments
Deprecated.since 3.11 . UsecallArguments()
instead.- Specified by:
arguments
in interfaceAnonymousClassTree
-
callArguments
- Specified by:
callArguments
in interfaceAnonymousClassTree
-
closeParenthesisToken
- Specified by:
closeParenthesisToken
in interfaceAnonymousClassTree
-
extendsToken
- Specified by:
extendsToken
in interfaceAnonymousClassTree
- Specified by:
extendsToken
in interfaceClassTree
-
superClass
- Specified by:
superClass
in interfaceAnonymousClassTree
- Specified by:
superClass
in interfaceClassTree
-
implementsToken
- Specified by:
implementsToken
in interfaceAnonymousClassTree
- Specified by:
implementsToken
in interfaceClassTree
-
superInterfaces
- Specified by:
superInterfaces
in interfaceAnonymousClassTree
- Specified by:
superInterfaces
in interfaceClassTree
-
openCurlyBraceToken
- Specified by:
openCurlyBraceToken
in interfaceAnonymousClassTree
- Specified by:
openCurlyBraceToken
in interfaceClassTree
-
members
- Specified by:
members
in interfaceAnonymousClassTree
- Specified by:
members
in interfaceClassTree
-
closeCurlyBraceToken
- Specified by:
closeCurlyBraceToken
in interfaceAnonymousClassTree
- Specified by:
closeCurlyBraceToken
in interfaceClassTree
-
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
Description copied from class:PHPTree
Creates iterator for children of this node. Note that iterator may containnull
elements.- Specified by:
childrenIterator
in classPHPTree
-
accept
-
getKind
-
symbol
- Specified by:
symbol
in interfaceHasClassSymbol
-
setSymbol
- Specified by:
setSymbol
in interfaceHasClassSymbol
-