Package net.bytebuddy.implementation
Class InvokeDynamic.WithImplicitType.OfInstance
java.lang.Object
net.bytebuddy.implementation.InvokeDynamic
net.bytebuddy.implementation.InvokeDynamic.AbstractDelegator
net.bytebuddy.implementation.InvokeDynamic.WithImplicitType
net.bytebuddy.implementation.InvokeDynamic.WithImplicitType.OfInstance
- All Implemented Interfaces:
InstrumentedType.Prepareable,Implementation,Implementation.Composable
- Enclosing class:
InvokeDynamic.WithImplicitType
protected static class InvokeDynamic.WithImplicitType.OfInstance
extends InvokeDynamic.WithImplicitType
A step in the invoke dynamic domain specific language that allows to explicitly specify a field type for a reference value.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.implementation.InvokeDynamic.WithImplicitType
InvokeDynamic.WithImplicitType.OfArgument, InvokeDynamic.WithImplicitType.OfField, InvokeDynamic.WithImplicitType.OfInstanceNested classes/interfaces inherited from class net.bytebuddy.implementation.InvokeDynamic
InvokeDynamic.AbstractDelegator, InvokeDynamic.Appender, InvokeDynamic.InvocationProvider, InvokeDynamic.TerminationHandler, InvokeDynamic.WithImplicitArguments, InvokeDynamic.WithImplicitTarget, InvokeDynamic.WithImplicitTypeNested classes/interfaces inherited from interface net.bytebuddy.implementation.Implementation
Implementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.TargetNested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOp -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final InvokeDynamic.InvocationProvider.ArgumentProviderAn argument provider that represents the argument with an implicit type.private final ObjectThe value that is supplied as the next argument to the bootstrapped method.Fields inherited from class net.bytebuddy.implementation.InvokeDynamic
arguments, assigner, bootstrap, invocationProvider, terminationHandler, typing -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedOfInstance(MethodDescription.InDefinedShape bootstrap, List<? extends JavaConstant> arguments, InvokeDynamic.InvocationProvider invocationProvider, InvokeDynamic.TerminationHandler terminationHandler, Assigner assigner, Assigner.Typing typing, Object value) Creates a new invoke dynamic instance with an implicit field type for the provided value. -
Method Summary
Modifier and TypeMethodDescriptionas(TypeDescription typeDescription) Represents the last value as an instance of the given type.protected InvokeDynamicResolves the current configuration into a fully initialized invoke dynamic instance.Methods inherited from class net.bytebuddy.implementation.InvokeDynamic.WithImplicitType
asMethods inherited from class net.bytebuddy.implementation.InvokeDynamic.AbstractDelegator
andThen, appender, prepare, withArgument, withArgument, withAssigner, withBooleanValue, withByteValue, withCharacterValue, withDoubleValue, withEnumeration, withField, withField, withField, withField, withFloatValue, withImplicitAndMethodArguments, withInstance, withIntegerValue, withLongValue, withMethodArguments, withNullValue, withNullValue, withReference, withReference, withShortValue, withThis, withThis, withType, withValue
-
Field Details
-
value
The value that is supplied as the next argument to the bootstrapped method. -
argumentProvider
An argument provider that represents the argument with an implicit type.
-
-
Constructor Details
-
OfInstance
protected OfInstance(MethodDescription.InDefinedShape bootstrap, List<? extends JavaConstant> arguments, InvokeDynamic.InvocationProvider invocationProvider, InvokeDynamic.TerminationHandler terminationHandler, Assigner assigner, Assigner.Typing typing, Object value) Creates a new invoke dynamic instance with an implicit field type for the provided value.- Parameters:
bootstrap- The bootstrap method or constructor.arguments- The arguments that are provided to the bootstrap method or constructor.invocationProvider- The target provided that identifies the method to be bootstrapped.terminationHandler- A handler that handles the method return.assigner- The assigner to be used.typing- Indicates if dynamic type castings should be attempted for incompatible assignments.value- The value that is supplied as the next argument to the bootstrapped method.
-
-
Method Details
-
as
Description copied from class:InvokeDynamic.WithImplicitTypeRepresents the last value as an instance of the given type.- Specified by:
asin classInvokeDynamic.WithImplicitType- Parameters:
typeDescription- The type to represent to the dynamic method invocation.- Returns:
- A new dynamic method invocation where the last argument is represented by the given type.
-
materialize
Description copied from class:InvokeDynamic.AbstractDelegatorResolves the current configuration into a fully initialized invoke dynamic instance.- Specified by:
materializein classInvokeDynamic.AbstractDelegator- Returns:
- The fully resolved invoke dynamic instance.
-