Package ftbsc.lll.proxies
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
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class ftbsc.lll.proxies.AbstractProxy
AbstractProxy.Builder<T extends AbstractProxy>
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.String
fullyQualifiedName
The fully-qualified name of the element represented by this proxy.java.lang.String
internalName
The "internal name" (fully-qualified with slashes) of the element represented by this proxy.-
Fields inherited from class ftbsc.lll.proxies.AbstractProxy
descriptor, modifiers, name, parent, proxyType
-
-
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 aString
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 aString
containing the simple name of the element.
-
-
-
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 elementmodifiers
- the modifiers, as a packed intparent
- theQualifiableProxy
representing the parent of this elementfullyQualifiedName
- the FQN of the elementproxyType
- theProxyType
being represented here
-
-
Method Detail
-
extractParentFromFQN
protected static java.lang.String extractParentFromFQN(java.lang.String fqn)
Returns aString
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 aString
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 classAbstractProxy
- Parameters:
obj
- the object to perform- Returns:
- true if it's equal
-
-