Package net.bytebuddy.asm
Class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfDefaultValue<T extends Annotation>
java.lang.Object
net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfDefaultValue<T>
- Type Parameters:
T- The type of the annotation.
- All Implemented Interfaces:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<T>
- Enclosing class:
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation
@Enhance
public static class MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.ForStackManipulation.OfDefaultValue<T extends Annotation>
extends Object
implements MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<T>
A factory that binds the default value of the annotated parameter, i.e.
null for reference types
or the specific version of 0 for primitive types.-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.asm.MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory
MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.AbstractBase<S extends Annotation>, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.Simple<S extends Annotation>, MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory.WithParameterSupportOnly<S extends Annotation> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOfDefaultValue(Class<T> annotationType) Creates a new factory for binding a default value. -
Method Summary
Modifier and TypeMethodDescriptionReturns the type of the annotation for this factory.make(MethodDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation) Creates an offset mapping for an annotation that was found on a non-static method.make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation) Creates an offset mapping for a parameter of the method or constructor that is the delegation target.
-
Field Details
-
annotationType
The annotation type.
-
-
Constructor Details
-
OfDefaultValue
Creates a new factory for binding a default value.- Parameters:
annotationType- The annotation type.
-
-
Method Details
-
getAnnotationType
Returns the type of the annotation for this factory.- Specified by:
getAnnotationTypein interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<T extends Annotation>- Returns:
- The type of the annotation for this factory.
-
make
public MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping make(MethodDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation) Creates an offset mapping for an annotation that was found on a non-static method.- Specified by:
makein interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<T extends Annotation>- Parameters:
target- The method that is the delegated to.annotation- The annotation that was found on the method.- Returns:
- An appropriate offset mapping.
-
make
public MemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping make(ParameterDescription.InDefinedShape target, AnnotationDescription.Loadable<T> annotation) Creates an offset mapping for a parameter of the method or constructor that is the delegation target.- Specified by:
makein interfaceMemberSubstitution.Substitution.Chain.Step.ForDelegation.OffsetMapping.Factory<T extends Annotation>- Parameters:
target- The parameter that is bound to an expression.annotation- The annotation that was found on the parameter.- Returns:
- An appropriate offset mapping.
-