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.TypeSubstitutingByteCodeElement.Member, ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumerationDeclaredByType.WithMandatoryDeclarationAnnotationSource.Empty, AnnotationSource.ExplicitNamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeNameNO_DEFAULT_VALUENON_GENERIC_SIGNATUREEMPTY_MASKEMPTY_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) |
int |
getActualModifiers()
Returns the field's actual modifiers as it is present in a class file, i.e.
|
String |
getActualName()
Returns the display name of this element as it is found in the source code.
|
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 name of this byte code element.
|
int |
hashCode() |
boolean |
isAccessibleTo(TypeDescription typeDescription)
Checks if this element is accessible from a given type.
|
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() |
getEnumerationState, getFieldManifestation, getFieldPersistence, getMethodManifestation, getMethodStrictness, getOwnership, getParameterManifestation, getProvisioningState, getSynchronizationState, getSyntheticState, getTypeManifestation, getVisibility, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStrict, isSynchronized, isSynthetic, isTransient, isVarArgs, isVolatileclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetTypegetFieldManifestation, getFieldPersistence, isTransient, isVolatilegetEnumerationState, isEnumgetDeclaringTypegetOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStaticgetModifiers, getSyntheticState, isFinal, isSyntheticgetDeclaredAnnotationsgetNameasDefinedpublic String getInternalName()
getInternalName in interface NamedElement.WithRuntimeNamepublic String getActualName()
getActualName in interface NamedElementpublic String getDescriptor()
getDescriptor in interface NamedElement.WithDescriptor@MaybeNull public String getGenericSignature()
null is returned as a signature.getGenericSignature in interface NamedElement.WithDescriptornull if this element is not generic.public boolean isVisibleTo(TypeDescription typeDescription)
Checks if this element is visible from a given type. Visibility is a wider criteria then accessibility which can be checked by
ByteCodeElement.isAccessibleTo(TypeDescription). Visibility allows the invocation of a method on itself or on external
instances.
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 ByteCodeElementtypeDescription - The type which is checked for its visibility of this element.true if this element is visible for typeDescription.public boolean isAccessibleTo(TypeDescription typeDescription)
Checks if this element is accessible from a given type. Accessibility is a more narrow criteria then visibility which can be
checked by ByteCodeElement.isVisibleTo(TypeDescription). Accessibility allows the invocation of a method on external
instances or on itself. Methods that can be invoked from within an instance might however not be considered accessible.
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.
isAccessibleTo in interface ByteCodeElementtypeDescription - The type which is checked for its accessibility of this element.true if this element is accessible for typeDescription.public int getActualModifiers()
getActualModifiers in interface FieldDescriptionpublic FieldDescription.Token asToken(ElementMatcher<? super TypeDescription> matcher)
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()
asSignatureToken in interface FieldDescription@CachedReturnPlugin.Enhance(value="hashCode") public int hashCode()
public boolean equals(@MaybeNull Object other)
public String toGenericString()
toGenericString in interface NamedElement.WithGenericNameCopyright © 2014–2023. All rights reserved.