Package net.bytebuddy.implementation
Class Implementation.Context.Default.FieldSetter
- 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.FieldSetter
-
- All Implemented Interfaces:
AnnotationSource
,ByteCodeElement
,ByteCodeElement.TypeDependant<MethodDescription.InDefinedShape,MethodDescription.Token>
,DeclaredByType
,MethodDescription
,MethodDescription.InDefinedShape
,ModifierReviewable
,ModifierReviewable.ForFieldDescription
,ModifierReviewable.ForMethodDescription
,ModifierReviewable.ForParameterDescription
,ModifierReviewable.ForTypeDefinition
,ModifierReviewable.OfAbstraction
,ModifierReviewable.OfByteCodeElement
,ModifierReviewable.OfEnumeration
,NamedElement
,NamedElement.WithDescriptor
,NamedElement.WithGenericName
,NamedElement.WithRuntimeName
,TypeVariableSource
- Enclosing class:
- Implementation.Context.Default
protected static class Implementation.Context.Default.FieldSetter extends Implementation.Context.Default.AbstractPropertyAccessorMethod
A description of a field setter method.
-
-
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.TypeDependant<T extends ByteCodeElement.TypeDependant<?,S>,S extends ByteCodeElement.Token<S>>
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.method.MethodDescription
MethodDescription.AbstractBase, MethodDescription.ForLoadedConstructor, MethodDescription.ForLoadedMethod, MethodDescription.InDefinedShape, MethodDescription.InGenericShape, MethodDescription.Latent, MethodDescription.SignatureToken, MethodDescription.Token, MethodDescription.TypeSubstituting, MethodDescription.TypeToken
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.method.MethodDescription.InDefinedShape
MethodDescription.InDefinedShape.AbstractBase
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.ModifierReviewable
ModifierReviewable.AbstractBase, ModifierReviewable.ForFieldDescription, ModifierReviewable.ForMethodDescription, ModifierReviewable.ForParameterDescription, ModifierReviewable.ForTypeDefinition, ModifierReviewable.OfAbstraction, ModifierReviewable.OfByteCodeElement, ModifierReviewable.OfEnumeration
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.NamedElement
NamedElement.WithDescriptor, NamedElement.WithGenericName, NamedElement.WithOptionalName, NamedElement.WithRuntimeName
-
Nested classes/interfaces inherited from interface net.bytebuddy.description.TypeVariableSource
TypeVariableSource.AbstractBase, TypeVariableSource.Visitor<T>
-
-
Field Summary
Fields Modifier and Type Field Description private FieldDescription
fieldDescription
The field for which a setter is described.private TypeDescription
instrumentedType
The instrumented type.private java.lang.String
name
The name of the field setter.-
Fields inherited from interface net.bytebuddy.description.method.MethodDescription
CONSTRUCTOR_INTERNAL_NAME, TYPE_INITIALIZER_INTERNAL_NAME, TYPE_INITIALIZER_MODIFIER, UNDEFINED
-
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
-
Fields inherited from interface net.bytebuddy.description.TypeVariableSource
UNDEFINED
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
FieldSetter(TypeDescription instrumentedType, FieldDescription fieldDescription, java.lang.String suffix)
Creates a new field setter.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected int
getBaseModifiers()
Returns the base modifiers, i.e.AnnotationList
getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.TypeDescription
getDeclaringType()
Returns the declaring type of this instance.AnnotationValue<?,?>
getDefaultValue()
Returns the method's default annotation value ornull
if no default value is defined for this method.TypeList.Generic
getExceptionTypes()
Returns the exception types of the described method.java.lang.String
getInternalName()
Returns the internal internalName of this byte code element.ParameterList<ParameterDescription.InDefinedShape>
getParameters()
Returns a list of this method's parameters.TypeDescription.Generic
getReturnType()
Returns the return type of the described method.TypeList.Generic
getTypeVariables()
Returns the type variables that are declared by this element.-
Methods inherited from class net.bytebuddy.implementation.Implementation.Context.Default.AbstractPropertyAccessorMethod
getModifiers
-
Methods inherited from class net.bytebuddy.description.method.MethodDescription.InDefinedShape.AbstractBase
asDefined, getReceiverType
-
Methods inherited from class net.bytebuddy.description.method.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, toString
-
Methods inherited from class net.bytebuddy.description.TypeVariableSource.AbstractBase
findVariable
-
Methods inherited from class net.bytebuddy.description.ModifierReviewable.AbstractBase
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, 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.method.MethodDescription
asSignatureToken, asTypeToken, getActualModifiers, getActualModifiers, getActualModifiers, getDefaultValue, getStackSize, isBridgeCompatible, isConstantBootstrap, isConstantBootstrap, isConstructor, isDefaultMethod, isDefaultValue, isDefaultValue, isInvokableOn, isInvokeBootstrap, isInvokeBootstrap, isMethod, isSpecializableFor, isTypeInitializer, isVirtual, represents, represents
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable
getSyntheticState, isFinal, isSynthetic
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.ForMethodDescription
getMethodManifestation, getMethodStrictness, getSynchronizationState, isBridge, isNative, isStrict, isSynchronized, isVarArgs
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfAbstraction
isAbstract
-
Methods inherited from interface net.bytebuddy.description.ModifierReviewable.OfByteCodeElement
getOwnership, getVisibility, isDeprecated, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
-
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
getName
-
Methods inherited from interface net.bytebuddy.description.TypeVariableSource
accept, findVariable, getEnclosingSource, isGenerified, isInferrable
-
-
-
-
Field Detail
-
instrumentedType
private final TypeDescription instrumentedType
The instrumented type.
-
fieldDescription
private final FieldDescription fieldDescription
The field for which a setter is described.
-
name
private final java.lang.String name
The name of the field setter.
-
-
Constructor Detail
-
FieldSetter
protected FieldSetter(TypeDescription instrumentedType, FieldDescription fieldDescription, java.lang.String suffix)
Creates a new field setter.- Parameters:
instrumentedType
- The instrumented type.fieldDescription
- The field for which a setter is described.suffix
- The name suffix for the field setter method.
-
-
Method Detail
-
getReturnType
public TypeDescription.Generic getReturnType()
Returns the return type of the described method.- Returns:
- The return type of the described method.
-
getParameters
public ParameterList<ParameterDescription.InDefinedShape> getParameters()
Returns a list of this method's parameters.- Returns:
- A list of this method's parameters.
-
getExceptionTypes
public TypeList.Generic getExceptionTypes()
Returns the exception types of the described method.- Returns:
- The exception types of the described method.
-
getDefaultValue
public AnnotationValue<?,?> getDefaultValue()
Returns the method's default annotation value ornull
if no default value is defined for this method.- Returns:
- The method's default annotation value or
null
if no default value is defined for this method.
-
getTypeVariables
public TypeList.Generic getTypeVariables()
Returns the type variables that are declared by this element.- Returns:
- The type variables that are declared by this element.
-
getDeclaredAnnotations
public AnnotationList getDeclaredAnnotations()
Returns a list of annotations that are declared by this instance.- Returns:
- A list of declared annotations.
-
getDeclaringType
public TypeDescription getDeclaringType()
Returns the declaring type of this instance.- Returns:
- The declaring type or
null
if no such type exists.
-
getBaseModifiers
protected int getBaseModifiers()
Description copied from class:Implementation.Context.Default.AbstractPropertyAccessorMethod
Returns the base modifiers, i.e. the modifiers that define the accessed property's features.- Specified by:
getBaseModifiers
in classImplementation.Context.Default.AbstractPropertyAccessorMethod
- Returns:
- Returns the base modifiers of the represented methods.
-
getInternalName
public java.lang.String getInternalName()
Returns the internal internalName of this byte code element.- Returns:
- The internal internalName of this byte code element as used within the Java class file format.
-
-