Interface NamespaceNameTree
- All Superinterfaces:
ExpressionTree,Tree,TypeNameTree
- All Known Implementing Classes:
ClassNamespaceNameTreeImpl,NamespaceNameTreeImpl
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
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionfullName()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.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.
-
Method Details
-
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
-