Interface ClassTree
- All Superinterfaces:
HasAttributes
,Tree
- All Known Subinterfaces:
AnonymousClassTree
,ClassDeclarationTree
,EnumDeclarationTree
- All Known Implementing Classes:
AnonymousClassTreeImpl
,ClassDeclarationTreeImpl
,EnumDeclarationTreeImpl
Common interface for
ClassDeclarationTree
and AnonymousClassTree
-
Nested Class Summary
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
PHP 5 introduce a new way to declare constructors: by defining a method named "__construct". -
Method Summary
Methods inherited from interface org.sonar.plugins.php.api.tree.declaration.HasAttributes
attributeGroups
-
Field Details
-
PHP5_CONSTRUCTOR_NAME
PHP 5 introduce a new way to declare constructors: by defining a method named "__construct". Previously constructors were declared by defining a method with the same name as the class.- See Also:
-
-
Method Details
-
classToken
SyntaxToken classToken() -
extendsToken
-
superClass
-
implementsToken
-
superInterfaces
SeparatedList<NamespaceNameTree> superInterfaces() -
openCurlyBraceToken
SyntaxToken openCurlyBraceToken() -
members
List<ClassMemberTree> members() -
closeCurlyBraceToken
SyntaxToken closeCurlyBraceToken() -
fetchConstructor
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.- Returns:
- the class constructor method declaration if defined, null otherwise.
-