public abstract static class FieldDescription.AbstractBase extends ModifierReviewable.AbstractBase implements FieldDescription
FieldDescription.AbstractBase, FieldDescription.ForLoadedField, FieldDescription.InDefinedShape, FieldDescription.InGenericShape, FieldDescription.Latent, FieldDescription.SignatureToken, FieldDescription.Token, FieldDescription.TypeSubstituting
ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
NamedElement.WithGenericName, NamedElement.WithRuntimeName
NO_DEFAULT_VALUE
NON_GENERIC_SIGNATURE
EMPTY_MASK
EMPTY_NAME, NO_NAME
Constructor and Description |
---|
AbstractBase() |
Modifier and Type | Method and Description |
---|---|
FieldDescription.SignatureToken |
asSignatureToken()
Returns a signature token representing this field.
|
FieldDescription.Token |
asToken(ElementMatcher<? super TypeDescription> matcher)
Returns a token representative of this type dependant.
|
boolean |
equals(Object other) |
String |
getDescriptor()
Returns the descriptor of this byte code element.
|
String |
getGenericSignature()
Returns the generic signature of this byte code element.
|
String |
getInternalName()
Returns the internal internalName of this byte code element.
|
String |
getSourceCodeName()
Returns the name of this element as it is found in the source code.
|
int |
hashCode() |
boolean |
isVisibleTo(TypeDescription typeDescription)
Checks if this element is visible from a given type.
|
String |
toGenericString()
Returns a generic string of this byte code element.
|
String |
toString() |
isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getType
getModifiers, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSuper, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatile
getDeclaringType
getDeclaredAnnotations
getName
asDefined
public String getInternalName()
NamedElement.WithRuntimeName
getInternalName
in interface NamedElement.WithRuntimeName
public String getSourceCodeName()
NamedElement
getSourceCodeName
in interface NamedElement
public String getDescriptor()
ByteCodeElement
getDescriptor
in interface ByteCodeElement
public String getGenericSignature()
ByteCodeElement
null
is returned as a signature.getGenericSignature
in interface ByteCodeElement
null
if this element is not generic.public boolean isVisibleTo(TypeDescription typeDescription)
ByteCodeElement
Checks if this element is visible from a given type.
Note: A method or field might define a signature that includes types that are not visible to a type. Such methods can be legally invoked from this type and can even be implemented as bridge methods by this type. It is however not legal to declare a method with invisible types in its signature that are not bridges what might require additional validation.
Important: Virtual byte code elements, i.e. virtual methods, are only considered visible if the type they are invoked upon is visible to a given type. The visibility of such virtual members can therefore not be determined by only investigating the invoked method but requires an additional check of the target type.
isVisibleTo
in interface ByteCodeElement
typeDescription
- The type which is checked for its access of this element.true
if this element is visible for typeDescription
.public FieldDescription.Token asToken(ElementMatcher<? super TypeDescription> matcher)
ByteCodeElement.TypeDependant
TargetType
descriptions.asToken
in interface ByteCodeElement.TypeDependant<FieldDescription.InDefinedShape,FieldDescription.Token>
matcher
- A matcher to identify types to be replaced by TargetType
descriptions.public FieldDescription.SignatureToken asSignatureToken()
FieldDescription
asSignatureToken
in interface FieldDescription
public String toGenericString()
NamedElement.WithGenericName
toGenericString
in interface NamedElement.WithGenericName
Copyright © 2014–2016. All rights reserved.