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
public class NamespaceNameTreeImpl extends PHPTree implements NamespaceNameTree
-
-
Constructor Summary
Constructors Constructor Description NamespaceNameTreeImpl(SyntaxToken absoluteSeparator, SeparatedList<NameIdentifierTree> namespaces, IdentifierTree name)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SyntaxTokenabsoluteSeparator()voidaccept(VisitorCheck visitor)Iterator<Tree>childrenIterator()Creates iterator for children of this node.StringfullName()Return the concatenation of: absolute separator (if present) namespaces with separators (if present) nameStringfullyQualifiedName()Return the fully qualified form of the namespaced name, with the namespaces and separators if present and the absolute separator if present.Tree.KindgetKind()booleanhasQualifiers()Return true if the namespace name has namespace separator.booleanisFullyQualified()Return true if the namespace name starts with a namespace separator.IdentifierTreename()SeparatedList<NameIdentifierTree>namespaces()StringqualifiedName()Return the qualified form of the namespaced name, with the namespaces and separators if present, only the name otherwise.StringunqualifiedName()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 Detail
-
NamespaceNameTreeImpl
public NamespaceNameTreeImpl(@Nullable SyntaxToken absoluteSeparator, SeparatedList<NameIdentifierTree> namespaces, IdentifierTree name)
-
-
Method Detail
-
absoluteSeparator
@Nullable public SyntaxToken absoluteSeparator()
- Specified by:
absoluteSeparatorin interfaceNamespaceNameTree
-
namespaces
public SeparatedList<NameIdentifierTree> namespaces()
- Specified by:
namespacesin interfaceNamespaceNameTree
-
name
public IdentifierTree name()
- Specified by:
namein interfaceNamespaceNameTree
-
fullName
public String fullName()
Description copied from interface:NamespaceNameTreeReturn the concatenation of:- absolute separator (if present)
- namespaces with separators (if present)
- name
- Specified by:
fullNamein interfaceNamespaceNameTree
-
unqualifiedName
public String 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
public String 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
public String 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
-
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)
-
-