Class QualifiedName

java.lang.Object
org.jtool.srcmodel.QualifiedName

public class QualifiedName extends Object
Stores fully-qualified name of an element.
  • Field Details

    • QualifiedNameSeparator

      public static final String QualifiedNameSeparator
      The constant string that delimits a class name and a member name in the fully qualified name.
      See Also:
  • Constructor Details

    • QualifiedName

      public QualifiedName(String className, String memberSignature)
      Creates a new object that represents a fully-qualified name for a method or a field.
      Parameters:
      className - the name of the class
      memberSignature - the signature of the member
    • QualifiedName

      public QualifiedName(String fqn)
      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

      public QualifiedName(QualifiedName qname, String memberSignature)
      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
      memberSignature - the signature of the member
    • QualifiedName

      public QualifiedName(QualifiedName qname)
      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

      public String getClassName()
      Returns the name of the class.
      Returns:
      the class name
    • getMemberSignature

      public String getMemberSignature()
      Returns the signature of the member.
      Returns:
      the member signature
    • fqn

      public String 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, otherwise false
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • equals

      public boolean equals(QualifiedName qname)
      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()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Obtains information on this fully-qualified name.
      Overrides:
      toString in class Object
      Returns:
      the string representing of the fully-qualified name