Class Implementation.Context.Default.FieldGetter
java.lang.Object
net.bytebuddy.description.ModifierReviewable.AbstractBase
net.bytebuddy.description.TypeVariableSource.AbstractBase
net.bytebuddy.description.method.MethodDescription.AbstractBase
net.bytebuddy.description.method.MethodDescription.InDefinedShape.AbstractBase
net.bytebuddy.implementation.Implementation.Context.Default.AbstractPropertyAccessorMethod
net.bytebuddy.implementation.Implementation.Context.Default.FieldGetter
- All Implemented Interfaces:
AnnotationSource, ByteCodeElement, ByteCodeElement.Member, ByteCodeElement.TypeDependant<MethodDescription.InDefinedShape, MethodDescription.Token>, DeclaredByType, DeclaredByType.WithMandatoryDeclaration, MethodDescription, MethodDescription.InDefinedShape, 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, TypeVariableSource
- Enclosing class:
Implementation.Context.Default
protected static class Implementation.Context.Default.FieldGetter
extends Implementation.Context.Default.AbstractPropertyAccessorMethod
A description of a field getter method.
-
Nested Class Summary
Nested classes/interfaces inherited from class MethodDescription.InDefinedShape.AbstractBase
MethodDescription.InDefinedShape.AbstractBase.Executable, MethodDescription.InDefinedShape.AbstractBase.ForLoadedExecutable<T>Nested classes/interfaces inherited from interface AnnotationSource
AnnotationSource.Empty, AnnotationSource.ExplicitNested classes/interfaces inherited from interface ByteCodeElement
ByteCodeElement.Member, ByteCodeElement.TypeDependant<T,S> Nested classes/interfaces inherited from interface DeclaredByType
DeclaredByType.WithMandatoryDeclarationNested classes/interfaces inherited from interface MethodDescription
MethodDescription.AbstractBase, MethodDescription.ForLoadedConstructor, MethodDescription.ForLoadedMethod, MethodDescription.InDefinedShape, MethodDescription.InGenericShape, MethodDescription.Latent, MethodDescription.SignatureToken, MethodDescription.Token, MethodDescription.TypeSubstituting, MethodDescription.TypeTokenNested classes/interfaces inherited from interface MethodDescription.InDefinedShape
MethodDescription.InDefinedShape.AbstractBaseNested classes/interfaces inherited from interface ModifierReviewable
ModifierReviewable.AbstractBase, ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForModuleDescription, ModifierReviewable.ForModuleRequirement, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration, ModifierReviewable.OfMandatableNested classes/interfaces inherited from interface NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeNameNested classes/interfaces inherited from interface TypeVariableSource
TypeVariableSource.AbstractBase, TypeVariableSource.Visitor<T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FieldDescriptionThe field for which a getter is described.private final TypeDescriptionThe instrumented type.private final StringThe name of the getter method.Fields inherited from interface MethodDescription
CONSTRUCTOR_INTERNAL_NAME, TYPE_INITIALIZER_INTERNAL_NAME, TYPE_INITIALIZER_MODIFIER, UNDEFINEDFields inherited from interface ModifierReviewable
EMPTY_MASKFields inherited from interface NamedElement
EMPTY_NAME, NO_NAMEFields inherited from interface NamedElement.WithDescriptor
NON_GENERIC_SIGNATUREFields inherited from interface TypeVariableSource
UNDEFINED -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedFieldGetter(TypeDescription instrumentedType, FieldDescription fieldDescription, String suffix) Creates a new field getter. -
Method Summary
Modifier and TypeMethodDescriptionprotected intReturns the base modifiers, i.e.Returns a list of annotations that are declared by this instance.Returns the declaring type of this instance.AnnotationValue<?, ?> Returns the method's default annotation value ornullif no default value is defined for this method.Returns the exception types of the described method.Returns the internal name of this byte code element.Returns a list of this method's parameters.Returns the return type of the described method.Returns the type variables that are declared by this element.Methods inherited from class Implementation.Context.Default.AbstractPropertyAccessorMethod
getModifiersMethods inherited from class MethodDescription.InDefinedShape.AbstractBase
asDefined, getReceiverTypeMethods inherited from class MethodDescription.AbstractBase
accept, asSignatureToken, asToken, asTypeToken, equals, getActualModifiers, getActualModifiers, getActualModifiers, getActualName, getDefaultValue, getDescriptor, getEnclosingSource, getGenericSignature, getName, getStackSize, hashCode, isAccessibleTo, isBridgeCompatible, isConstantBootstrap, isConstantBootstrap, isConstructor, isDefaultMethod, isDefaultValue, isDefaultValue, isGenerified, isInferrable, isInvokableOn, isInvokeBootstrap, isInvokeBootstrap, isMethod, isSpecializableFor, isTypeInitializer, isVirtual, isVisibleTo, represents, represents, toGenericString, toSafeString, toStringMethods inherited from class TypeVariableSource.AbstractBase
findExpectedVariable, findVariableMethods inherited from class 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, isVolatileMethods inherited from interface ByteCodeElement
isAccessibleTo, isVisibleToMethods inherited from interface ByteCodeElement.TypeDependant
asTokenMethods inherited from interface MethodDescription
asSignatureToken, asTypeToken, getActualModifiers, getActualModifiers, getActualModifiers, getDefaultValue, getStackSize, isBridgeCompatible, isConstantBootstrap, isConstantBootstrap, isConstructor, isDefaultMethod, isDefaultValue, isDefaultValue, isInvokableOn, isInvokeBootstrap, isInvokeBootstrap, isMethod, isSpecializableFor, isTypeInitializer, isVirtual, represents, representsMethods inherited from interface ModifierReviewable
getSyntheticState, isFinal, isSyntheticMethods inherited from interface ModifierReviewable.ForMethodDescription
getMethodManifestation, getMethodStrictness, getSynchronizationState, isBridge, isNative, isStrict, isSynchronized, isVarArgsMethods inherited from interface ModifierReviewable.OfAbstraction
isAbstractMethods inherited from interface ModifierReviewable.OfByteCodeElement
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStaticMethods inherited from interface NamedElement
getActualNameMethods inherited from interface NamedElement.WithDescriptor
getDescriptor, getGenericSignatureMethods inherited from interface NamedElement.WithGenericName
toGenericStringMethods inherited from interface NamedElement.WithRuntimeName
getNameMethods inherited from interface TypeVariableSource
accept, findExpectedVariable, findVariable, getEnclosingSource, isGenerified, isInferrable
-
Field Details
-
instrumentedType
The instrumented type. -
fieldDescription
The field for which a getter is described. -
name
The name of the getter method.
-
-
Constructor Details
-
FieldGetter
protected FieldGetter(TypeDescription instrumentedType, FieldDescription fieldDescription, String suffix) Creates a new field getter.- Parameters:
instrumentedType- The instrumented type.fieldDescription- The field for which a getter is described.suffix- The name suffix for the field getter method.
-
-
Method Details
-
getReturnType
Returns the return type of the described method.- Returns:
- The return type of the described method.
-
getParameters
Returns a list of this method's parameters.- Returns:
- A list of this method's parameters.
-
getExceptionTypes
Returns the exception types of the described method.- Returns:
- The exception types of the described method.
-
getDefaultValue
Returns the method's default annotation value ornullif no default value is defined for this method.- Returns:
- The method's default annotation value or
nullif no default value is defined for this method.
-
getTypeVariables
Returns the type variables that are declared by this element.- Returns:
- The type variables that are declared by this element.
-
getDeclaredAnnotations
Returns a list of annotations that are declared by this instance.- Returns:
- A list of declared annotations.
-
getDeclaringType
Returns the declaring type of this instance.- Returns:
- The declaring type or
nullif no such type exists.
-
getBaseModifiers
protected int getBaseModifiers()Description copied from class:Implementation.Context.Default.AbstractPropertyAccessorMethodReturns the base modifiers, i.e. the modifiers that define the accessed property's features.- Specified by:
getBaseModifiersin classImplementation.Context.Default.AbstractPropertyAccessorMethod- Returns:
- Returns the base modifiers of the represented methods.
-
getInternalName
Returns the internal name of this byte code element. If no well-defined internal name is known for this element, the actual name is returned.- Returns:
- The internal name of this byte code element as used within the Java class file format.
-