Class ClassDeclarationTreeImpl
- java.lang.Object
-
- org.sonar.php.tree.impl.PHPTree
-
- org.sonar.php.tree.impl.declaration.ClassDeclarationTreeImpl
-
- All Implemented Interfaces:
HasClassSymbol,ClassDeclarationTree,ClassTree,HasAttributes,StatementTree,Tree
public class ClassDeclarationTreeImpl extends PHPTree implements ClassDeclarationTree, HasClassSymbol
-
-
Field Summary
-
Fields inherited from interface org.sonar.plugins.php.api.tree.declaration.ClassTree
PHP5_CONSTRUCTOR_NAME
-
-
Method Summary
-
Methods inherited from class org.sonar.php.tree.impl.PHPTree
getFirstToken, getLastToken, getLine, getParent, is, isLeaf, setParent, toString
-
-
-
-
Method Detail
-
modifierToken
@Nullable public SyntaxToken modifierToken()
Description copied from interface:ClassDeclarationTree- Specified by:
modifierTokenin interfaceClassDeclarationTree
-
attributeGroups
public List<AttributeGroupTree> attributeGroups()
- Specified by:
attributeGroupsin interfaceHasAttributes
-
classToken
public SyntaxToken classToken()
Description copied from interface:ClassDeclarationTree- Specified by:
classTokenin interfaceClassDeclarationTree- Specified by:
classTokenin interfaceClassTree
-
name
public NameIdentifierTree name()
- Specified by:
namein interfaceClassDeclarationTree
-
extendsToken
@Nullable public SyntaxToken extendsToken()
- Specified by:
extendsTokenin interfaceClassDeclarationTree- Specified by:
extendsTokenin interfaceClassTree
-
superClass
@Nullable public NamespaceNameTree superClass()
- Specified by:
superClassin interfaceClassDeclarationTree- Specified by:
superClassin interfaceClassTree
-
implementsToken
@Nullable public SyntaxToken implementsToken()
- Specified by:
implementsTokenin interfaceClassDeclarationTree- Specified by:
implementsTokenin interfaceClassTree
-
superInterfaces
public SeparatedListImpl<NamespaceNameTree> superInterfaces()
- Specified by:
superInterfacesin interfaceClassDeclarationTree- Specified by:
superInterfacesin interfaceClassTree
-
openCurlyBraceToken
public SyntaxToken openCurlyBraceToken()
- Specified by:
openCurlyBraceTokenin interfaceClassDeclarationTree- Specified by:
openCurlyBraceTokenin interfaceClassTree
-
members
public List<ClassMemberTree> members()
- Specified by:
membersin interfaceClassDeclarationTree- Specified by:
membersin interfaceClassTree
-
closeCurlyBraceToken
public SyntaxToken closeCurlyBraceToken()
- Specified by:
closeCurlyBraceTokenin interfaceClassDeclarationTree- Specified by:
closeCurlyBraceTokenin interfaceClassTree
-
fetchConstructor
@Nullable public MethodDeclarationTree fetchConstructor()
Description copied from interface:ClassTreeFetch 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:
fetchConstructorin interfaceClassTree- Returns:
- the class constructor method declaration if defined, null otherwise.
-
childrenIterator
public Iterator<Tree> childrenIterator()
Description copied from class:PHPTreeCreates iterator for children of this node. Note that iterator may containnullelements.- Specified by:
childrenIteratorin classPHPTree
-
accept
public void accept(VisitorCheck visitor)
-
createInterface
public static ClassDeclarationTree createInterface(List<AttributeGroupTree> attributes, InternalSyntaxToken interfaceToken, NameIdentifierTree name, @Nullable InternalSyntaxToken extendsToken, SeparatedListImpl<NamespaceNameTree> interfaceList, InternalSyntaxToken openCurlyBraceToken, List<ClassMemberTree> members, InternalSyntaxToken closeCurlyBraceToken)
-
createTrait
public static ClassDeclarationTree createTrait(List<AttributeGroupTree> attributes, InternalSyntaxToken traitToken, NameIdentifierTree name, InternalSyntaxToken openCurlyBraceToken, List<ClassMemberTree> members, InternalSyntaxToken closeCurlyBraceToken)
-
createClass
public static ClassDeclarationTree createClass(List<AttributeGroupTree> attributes, @Nullable InternalSyntaxToken modifierToken, InternalSyntaxToken classToken, NameIdentifierTree name, @Nullable InternalSyntaxToken extendsToken, @Nullable NamespaceNameTree superClass, @Nullable InternalSyntaxToken implementsToken, SeparatedListImpl<NamespaceNameTree> superInterfaces, InternalSyntaxToken openCurlyBraceToken, List<ClassMemberTree> members, InternalSyntaxToken closeCurlyBraceToken)
-
symbol
public ClassSymbol symbol()
- Specified by:
symbolin interfaceHasClassSymbol
-
setSymbol
public void setSymbol(ClassSymbol symbol)
- Specified by:
setSymbolin interfaceHasClassSymbol
-
-