Class QualifiableProxy

  • Direct Known Subclasses:
    PackageProxy, TypeProxy

    public abstract class QualifiableProxy
    extends AbstractProxy
    A proxy for elements who have a fully-qualified name.
    Since:
    0.4.0
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected QualifiableProxy​(java.lang.String descriptor, int modifiers, QualifiableProxy parent, java.lang.String fullyQualifiedName, ProxyType proxyType)
      The protected constructor, should be called by all classes extending this in theirs.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Indicates whether the given object is a proxy for the same element as this.
      protected static java.lang.String extractParentFromFQN​(java.lang.String fqn)
      Returns a String containing the FQN of the parent element to this, which may represent a package or class.
      protected static java.lang.String extractSimpleNameFromFQN​(java.lang.String fqn)
      Returns a String containing the simple name of the element.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • fullyQualifiedName

        public final java.lang.String fullyQualifiedName
        The fully-qualified name of the element represented by this proxy.
      • internalName

        public final java.lang.String internalName
        The "internal name" (fully-qualified with slashes) of the element represented by this proxy.
    • Constructor Detail

      • QualifiableProxy

        protected QualifiableProxy​(java.lang.String descriptor,
                                   int modifiers,
                                   QualifiableProxy parent,
                                   java.lang.String fullyQualifiedName,
                                   ProxyType proxyType)
        The protected constructor, should be called by all classes extending this in theirs.
        Parameters:
        descriptor - the descriptor for the element
        modifiers - the modifiers, as a packed int
        parent - the QualifiableProxy representing the parent of this element
        fullyQualifiedName - the FQN of the element
        proxyType - the ProxyType being represented here
    • Method Detail

      • extractParentFromFQN

        protected static java.lang.String extractParentFromFQN​(java.lang.String fqn)
        Returns a String containing the FQN of the parent element to this, which may represent a package or class.
        Parameters:
        fqn - the fully qualified name of the element
        Returns:
        the parent, or null if the parent was the root element
      • extractSimpleNameFromFQN

        protected static java.lang.String extractSimpleNameFromFQN​(java.lang.String fqn)
        Returns a String containing the simple name of the element.
        Parameters:
        fqn - the fully qualified name of the element
        Returns:
        the simple name
      • equals

        public boolean equals​(java.lang.Object obj)
        Indicates whether the given object is a proxy for the same element as this.
        Overrides:
        equals in class AbstractProxy
        Parameters:
        obj - the object to perform
        Returns:
        true if it's equal