Class NamespaceNameTreeImpl
java.lang.Object
org.sonar.php.tree.impl.PHPTree
org.sonar.php.tree.impl.declaration.NamespaceNameTreeImpl
- All Implemented Interfaces:
NamespaceNameTree,TypeNameTree,ExpressionTree,Tree
- Direct Known Subclasses:
ClassNamespaceNameTreeImpl
-
Nested Class Summary
-
Constructor Summary
ConstructorsConstructorDescriptionNamespaceNameTreeImpl(SyntaxToken absoluteSeparator, SeparatedList<NameIdentifierTree> namespaces, IdentifierTree name) -
Method Summary
Modifier and TypeMethodDescriptionvoidaccept(VisitorCheck visitor) Creates iterator for children of this node.fullName()Return the concatenation of: absolute separator (if present) namespaces with separators (if present) nameReturn the fully qualified form of the namespaced name, with the namespaces and separators if present and the absolute separator if present.getKind()booleanReturn true if the namespace name has namespace separator.booleanReturn true if the namespace name starts with a namespace separator.name()Return the qualified form of the namespaced name, with the namespaces and separators if present, only the name otherwise.Return the unqualified form of the namespaced name, means it will return just the String value of the name.Methods inherited from class org.sonar.php.tree.impl.PHPTree
getFirstToken, getLastToken, getLine, getParent, is, isLeaf, setParent, toString
-
Constructor Details
-
NamespaceNameTreeImpl
public NamespaceNameTreeImpl(@Nullable SyntaxToken absoluteSeparator, SeparatedList<NameIdentifierTree> namespaces, IdentifierTree name)
-
-
Method Details
-
absoluteSeparator
- Specified by:
absoluteSeparatorin interfaceNamespaceNameTree
-
namespaces
- Specified by:
namespacesin interfaceNamespaceNameTree
-
name
- Specified by:
namein interfaceNamespaceNameTree
-
fullName
Description copied from interface:NamespaceNameTreeReturn the concatenation of:- absolute separator (if present)
- namespaces with separators (if present)
- name
- Specified by:
fullNamein interfaceNamespaceNameTree
-
unqualifiedName
Description copied from interface:NamespaceNameTreeReturn the unqualified form of the namespaced name, means it will return just the String value of the name.Example:
\Foo\Bar => return "Bar" Foo\Bar => return "Bar" Bar => return "Bar"
- Specified by:
unqualifiedNamein interfaceNamespaceNameTree
-
qualifiedName
Description copied from interface:NamespaceNameTreeReturn the qualified form of the namespaced name, with the namespaces and separators if present, only the name otherwise.Example:
\Foo\Bar => return "Foo\Bar" Foo\Bar => return "Foo\Bar" Bar => return "Bar"
- Specified by:
qualifiedNamein interfaceNamespaceNameTree
-
fullyQualifiedName
Description copied from interface:NamespaceNameTreeReturn the fully qualified form of the namespaced name, with the namespaces and separators if present and the absolute separator if present.Example:
\Foo\Bar => return "\Foo\Bar" Foo\Bar => return "Foo\Bar" Bar => return "Bar"
- Specified by:
fullyQualifiedNamein interfaceNamespaceNameTree
-
isFullyQualified
public boolean isFullyQualified()Description copied from interface:NamespaceNameTreeReturn true if the namespace name starts with a namespace separator.Example:
\Foo\Bar \AnotherFoo
- Specified by:
isFullyQualifiedin interfaceNamespaceNameTree
-
hasQualifiers
public boolean hasQualifiers()Description copied from interface:NamespaceNameTreeReturn true if the namespace name has namespace separator.Example:
Foo\Bar
- Specified by:
hasQualifiersin interfaceNamespaceNameTree
-
getKind
-
childrenIterator
Description copied from class:PHPTreeCreates iterator for children of this node. Note that iterator may containnullelements.- Specified by:
childrenIteratorin classPHPTree
-
accept
-