Class QualifiableProxy

java.lang.Object
ftbsc.lll.proxies.AbstractProxy
ftbsc.lll.proxies.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
  • Field Details

    • fullyQualifiedName

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

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

    • QualifiableProxy

      protected QualifiableProxy(String descriptor, int modifiers, QualifiableProxy parent, 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 Details

    • extractParentFromFQN

      protected static String extractParentFromFQN(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 String extractSimpleNameFromFQN(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(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