Package org.jtool.srcmodel
Class QualifiedName
java.lang.Object
org.jtool.srcmodel.QualifiedName
Stores fully-qualified name of an element.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The constant string that delimits a class name and a member name in the fully qualified name. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new object that represents an unresolved fully-qualified name.QualifiedName
(String fqn) Creates a new object that represents a fully-qualified name for a class.QualifiedName
(String className, String memberSignature) Creates a new object that represents a fully-qualified name for a method or a field.QualifiedName
(QualifiedName qname) Creates a new object that represents a fully-qualified name for a method or a field.QualifiedName
(QualifiedName qname, String memberSignature) Creates a new object that represents a fully-qualified name for a method or a field. -
Method Summary
Modifier and TypeMethodDescriptionboolean
boolean
equals
(QualifiedName qname) Tests if a given fully-qualified name is equal to this fully-qualified name.fqn()
Returns the reference form of this fully qualified nameReturns the name of the class.Returns the signature of the member.int
hashCode()
boolean
Tests if this fully qualified name is unresolved.toString()
Obtains information on this fully-qualified name.
-
Field Details
-
QualifiedNameSeparator
The constant string that delimits a class name and a member name in the fully qualified name.- See Also:
-
-
Constructor Details
-
QualifiedName
Creates a new object that represents a fully-qualified name for a method or a field.- Parameters:
className
- the name of the classmemberSignature
- the signature of the member
-
QualifiedName
Creates a new object that represents a fully-qualified name for a class.- Parameters:
fqn
- the fully qualified name (class#member
)
-
QualifiedName
public QualifiedName()Creates a new object that represents an unresolved fully-qualified name. This constructor is not intended to be invoked by clients. -
QualifiedName
Creates a new object that represents a fully-qualified name for a method or a field. This constructor is not intended to be invoked by clients.- Parameters:
qname
- the fully-qualified name of the classmemberSignature
- the signature of the member
-
QualifiedName
Creates a new object that represents a fully-qualified name for a method or a field. This constructor is not intended to be invoked by clients.- Parameters:
qname
- the fully-qualified name of the class
-
-
Method Details
-
getClassName
Returns the name of the class.- Returns:
- the class name
-
getMemberSignature
Returns the signature of the member.- Returns:
- the member signature
-
fqn
Returns the reference form of this fully qualified name- Returns:
- the reference string
-
isResolve
public boolean isResolve()Tests if this fully qualified name is unresolved.- Returns:
true
if this fully-qualified name is resolved, otherwisefalse
-
equals
-
equals
Tests if a given fully-qualified name is equal to this fully-qualified name.- Parameters:
qname
- the fully-qualified name to be checked- Returns:
true
if the given fully-qualified is equal to this fully-qualified
-
hashCode
public int hashCode() -
toString
Obtains information on this fully-qualified name.
-