Interface NamespaceNameTree
-
- All Superinterfaces:
ExpressionTree,Tree,TypeNameTree
- All Known Implementing Classes:
ClassNamespaceNameTreeImpl,NamespaceNameTreeImpl
public interface NamespaceNameTree extends ExpressionTree, TypeNameTree
Namespace name- Unqualified name: this is an identifier without a namespace separator, such as Foo
- Qualified name: this is an identifier with a namespace separator, such as Foo\Bar
- Fully qualified name: this is an identifier with a namespace separator that begins with a namespace separator, such as \Foo\Bar. The namespace \Foo is also a fully qualified name.
name()// unqualifiednamespaces()name()// qualifiedabsoluteSeparator()namespaces()name()// fully qualified
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SyntaxTokenabsoluteSeparator()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.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.
-
-
-
Method Detail
-
absoluteSeparator
@Nullable SyntaxToken absoluteSeparator()
-
namespaces
SeparatedList<NameIdentifierTree> namespaces()
-
name
IdentifierTree name()
-
fullName
String fullName()
Return the concatenation of:- absolute separator (if present)
- namespaces with separators (if present)
- name
-
unqualifiedName
String unqualifiedName()
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"
-
qualifiedName
String qualifiedName()
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"
-
fullyQualifiedName
String fullyQualifiedName()
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"
-
isFullyQualified
boolean isFullyQualified()
Return true if the namespace name starts with a namespace separator.Example:
\Foo\Bar \AnotherFoo
-
hasQualifiers
boolean hasQualifiers()
Return true if the namespace name has namespace separator.Example:
Foo\Bar
-
-