Enum CachedReturnPlugin.AdviceResolver
java.lang.Object
java.lang.Enum<CachedReturnPlugin.AdviceResolver>
net.bytebuddy.build.CachedReturnPlugin.AdviceResolver
- All Implemented Interfaces:
Serializable, Comparable<CachedReturnPlugin.AdviceResolver>, java.lang.constant.Constable
- Enclosing class:
CachedReturnPlugin
protected static enum CachedReturnPlugin.AdviceResolver
extends Enum<CachedReturnPlugin.AdviceResolver>
A resolver for
Advice that caches a method's return type.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classA byte code appender for the exit advice.Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionA resolver for abooleantype.A resolver for abytetype.A resolver for achartype.A resolver for adoubletype.A resolver for afloattype.A resolver for ainttype.A resolver for alongtype.A resolver for a reference type.A resolver for ashorttype. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final DynamicTypeThe created dynamic type to use for advice. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateAdviceResolver(Class<?> type, int load, int store, int convert, int branch) Creates an advice resolver. -
Method Summary
Modifier and TypeMethodDescriptionprotected static CachedReturnPlugin.AdviceResolverof(TypeDefinition typeDefinition) Creates an advice resolver for a given type definition.protected AdviceResolve advice for a given field name.Returns the enum constant of this type with the specified name.static CachedReturnPlugin.AdviceResolver[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
BOOLEAN
A resolver for abooleantype. -
BYTE
A resolver for abytetype. -
SHORT
A resolver for ashorttype. -
CHARACTER
A resolver for achartype. -
INTEGER
A resolver for ainttype. -
LONG
A resolver for alongtype. -
FLOAT
A resolver for afloattype. -
DOUBLE
A resolver for adoubletype. -
REFERENCE
A resolver for a reference type.
-
-
Field Details
-
dynamicType
The created dynamic type to use for advice.
-
-
Constructor Details
-
AdviceResolver
Creates an advice resolver.- Parameters:
type- The type of the return type.load- The byte code that loads a value onto the stack from the local variable array.store- The byte code that stores a value to the local variable array.convert- An instruction to convert the cached value to a value that is applied on the branch instruction.branch- A jump instruction that checks if the cached value is already set.
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
of
Creates an advice resolver for a given type definition.- Parameters:
typeDefinition- The type definition for which advice is to be created.- Returns:
- An appropriate advice resolver.
-
toAdvice
-