Package net.bytebuddy.description.field
Class FieldDescription.TypeSubstituting
- java.lang.Object
-
- net.bytebuddy.description.ModifierReviewable.AbstractBase
-
- net.bytebuddy.description.field.FieldDescription.AbstractBase
-
- net.bytebuddy.description.field.FieldDescription.TypeSubstituting
-
- All Implemented Interfaces:
AnnotationSource,ByteCodeElement,ByteCodeElement.Member,ByteCodeElement.TypeDependant<FieldDescription.InDefinedShape,FieldDescription.Token>,DeclaredByType,DeclaredByType.WithMandatoryDeclaration,FieldDescription,FieldDescription.InGenericShape,ModifierReviewable,ModifierReviewable.ForFieldDescription,ModifierReviewable.ForMethodDescription,ModifierReviewable.ForModuleDescription,ModifierReviewable.ForModuleRequirement,ModifierReviewable.ForParameterDescription,ModifierReviewable.ForTypeDefinition,ModifierReviewable.OfAbstraction,ModifierReviewable.OfByteCodeElement,ModifierReviewable.OfEnumeration,ModifierReviewable.OfMandatable,NamedElement,NamedElement.WithDescriptor,NamedElement.WithGenericName,NamedElement.WithRuntimeName
- Enclosing interface:
- FieldDescription
public static class FieldDescription.TypeSubstituting extends FieldDescription.AbstractBase implements FieldDescription.InGenericShape
A field description that represents a given field but with a substituted field type.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.annotation.AnnotationSource
AnnotationSource.Empty, AnnotationSource.Explicit
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.ByteCodeElement
ByteCodeElement.Member, ByteCodeElement.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.DeclaredByType
DeclaredByType.WithMandatoryDeclaration
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.field.FieldDescription
FieldDescription.AbstractBase, FieldDescription.ForLoadedField, FieldDescription.InDefinedShape, FieldDescription.InGenericShape, FieldDescription.Latent, FieldDescription.SignatureToken, FieldDescription.Token, FieldDescription.TypeSubstituting
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.ModifierReviewable
ModifierReviewable.AbstractBase, ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForModuleDescription, ModifierReviewable.ForModuleRequirement, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration, ModifierReviewable.OfMandatable
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
-
-
Field Summary
Fields Modifier and Type Field Description private TypeDescription.GenericdeclaringTypeThe declaring type of the field.private FieldDescriptionfieldDescriptionThe represented field.private TypeDescription.Generic.Visitor<? extends TypeDescription.Generic>visitorA visitor that is applied to the field type.-
Fields inherited from interface net.bytebuddy.description.field.FieldDescription
NO_DEFAULT_VALUE
-
Fields inherited from interface net.bytebuddy.description.ModifierReviewable
EMPTY_MASK
-
Fields inherited from interface net.bytebuddy.description.NamedElement
EMPTY_NAME, NO_NAME
-
Fields inherited from interface net.bytebuddy.description.NamedElement.WithDescriptor
NON_GENERIC_SIGNATURE
-
-
Constructor Summary
Constructors Constructor Description TypeSubstituting(TypeDescription.Generic declaringType, FieldDescription fieldDescription, TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)Creates a field description with a substituted field type.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description FieldDescription.InDefinedShapeasDefined()Returns this type dependant in its defined shape, i.e.AnnotationListgetDeclaredAnnotations()Returns a list of annotations that are declared by this instance.TypeDescription.GenericgetDeclaringType()Returns the declaring type of this instance.intgetModifiers()Returns the modifier that is described by this object.java.lang.StringgetName()Returns the binary name of this byte code element.TypeDescription.GenericgetType()Returns the type of the described field.-
Methods inherited from class net.bytebuddy.description.field.FieldDescription.AbstractBase
asSignatureToken, asToken, equals, getActualModifiers, getActualName, getDescriptor, getGenericSignature, getInternalName, hashCode, isAccessibleTo, isVisibleTo, toGenericString, toString
-
Methods inherited from class net.bytebuddy.description.ModifierReviewable.AbstractBase
getEnumerationState, getFieldManifestation, getFieldPersistence, getMandate, getMethodManifestation, getMethodStrictness, getOpenness, getOwnership, getParameterManifestation, getProvisioningState, getRequiredPhase, getSynchronizationState, getSyntheticState, getTransitivity, getTypeManifestation, getVisibility, isAbstract, isAnnotation, isBridge, isDeprecated, isEnum, isFinal, isInterface, isMandated, isNative, isOpen, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic, isStaticPhase, isStrict, isSynchronized, isSynthetic, isTransient, isTransitive, isVarArgs, isVolatile
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface net.bytebuddy.description.ByteCodeElement
isAccessibleTo, isVisibleTo
-
Methods inherited from interface net.bytebuddy.description.ByteCodeElement.TypeDependant
asToken
-
Methods inherited from interface net.bytebuddy.description.field.FieldDescription
asSignatureToken, getActualModifiers
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable
getSyntheticState, isFinal, isSynthetic
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.ForFieldDescription
getFieldManifestation, getFieldPersistence, isTransient, isVolatile
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfByteCodeElement
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfEnumeration
getEnumerationState, isEnum
-
Methods inherited from interface net.bytebuddy.description.NamedElement
getActualName
-
Methods inherited from interface net.bytebuddy.description.NamedElement.WithDescriptor
getDescriptor, getGenericSignature
-
Methods inherited from interface net.bytebuddy.description.NamedElement.WithGenericName
toGenericString
-
Methods inherited from interface net.bytebuddy.description.NamedElement.WithRuntimeName
getInternalName
-
-
-
-
Field Detail
-
declaringType
private final TypeDescription.Generic declaringType
The declaring type of the field.
-
fieldDescription
private final FieldDescription fieldDescription
The represented field.
-
visitor
private final TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor
A visitor that is applied to the field type.
-
-
Constructor Detail
-
TypeSubstituting
public TypeSubstituting(TypeDescription.Generic declaringType, FieldDescription fieldDescription, TypeDescription.Generic.Visitor<? extends TypeDescription.Generic> visitor)
Creates a field description with a substituted field type.- Parameters:
declaringType- The declaring type of the field.fieldDescription- The represented field.visitor- A visitor that is applied to the field type.
-
-
Method Detail
-
getType
public TypeDescription.Generic getType()
Returns the type of the described field.- Specified by:
getTypein interfaceFieldDescription- Returns:
- The type of the described field.
-
getDeclaredAnnotations
public AnnotationList getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.- Specified by:
getDeclaredAnnotationsin interfaceAnnotationSource- Returns:
- A list of declared annotations.
-
getDeclaringType
@Nonnull public TypeDescription.Generic getDeclaringType()
Returns the declaring type of this instance.- Specified by:
getDeclaringTypein interfaceDeclaredByType- Specified by:
getDeclaringTypein interfaceDeclaredByType.WithMandatoryDeclaration- Specified by:
getDeclaringTypein interfaceFieldDescription- Specified by:
getDeclaringTypein interfaceFieldDescription.InGenericShape- Returns:
- The declaring type or
nullif no such type exists.
-
getModifiers
public int getModifiers()
Returns the modifier that is described by this object.- Specified by:
getModifiersin interfaceModifierReviewable- Returns:
- The modifier that is described by this object.
-
getName
public java.lang.String getName()
Returns the binary name of this byte code element. If no well-defined internal name is known for this element, the actual name is returned.- Specified by:
getNamein interfaceNamedElement.WithRuntimeName- Returns:
- The binary ame of this byte code element as visible from within a running Java application.
-
asDefined
public FieldDescription.InDefinedShape asDefined()
Returns this type dependant in its defined shape, i.e. the form it is declared in and without its type variable's resolved.- Specified by:
asDefinedin interfaceByteCodeElement.TypeDependant<FieldDescription.InDefinedShape,FieldDescription.Token>- Returns:
- This type dependant in its defined shape.
-
-