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 TypeMethodDescriptionvoid
accept
(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()
boolean
Return true if the namespace name has namespace separator.boolean
Return 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:
absoluteSeparator
in interfaceNamespaceNameTree
-
namespaces
- Specified by:
namespaces
in interfaceNamespaceNameTree
-
name
- Specified by:
name
in interfaceNamespaceNameTree
-
fullName
Description copied from interface:NamespaceNameTree
Return the concatenation of:- absolute separator (if present)
- namespaces with separators (if present)
- name
- Specified by:
fullName
in interfaceNamespaceNameTree
-
unqualifiedName
Description copied from interface:NamespaceNameTree
Return 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:
unqualifiedName
in interfaceNamespaceNameTree
-
qualifiedName
Description copied from interface:NamespaceNameTree
Return 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:
qualifiedName
in interfaceNamespaceNameTree
-
fullyQualifiedName
Description copied from interface:NamespaceNameTree
Return 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:
fullyQualifiedName
in interfaceNamespaceNameTree
-
isFullyQualified
public boolean isFullyQualified()Description copied from interface:NamespaceNameTree
Return true if the namespace name starts with a namespace separator.Example:
\Foo\Bar \AnotherFoo
- Specified by:
isFullyQualified
in interfaceNamespaceNameTree
-
hasQualifiers
public boolean hasQualifiers()Description copied from interface:NamespaceNameTree
Return true if the namespace name has namespace separator.Example:
Foo\Bar
- Specified by:
hasQualifiers
in interfaceNamespaceNameTree
-
getKind
-
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
-