Package net.bytebuddy.implementation
Class InvokeDynamic.WithImplicitType.OfField
java.lang.Object
net.bytebuddy.implementation.InvokeDynamic
net.bytebuddy.implementation.InvokeDynamic.AbstractDelegator
net.bytebuddy.implementation.InvokeDynamic.WithImplicitType
net.bytebuddy.implementation.InvokeDynamic.WithImplicitType.OfField
- All Implemented Interfaces:
InstrumentedType.Prepareable
,Implementation
,Implementation.Composable
- Enclosing class:
- InvokeDynamic.WithImplicitType
protected static class InvokeDynamic.WithImplicitType.OfField
extends InvokeDynamic.WithImplicitType
An invoke dynamic implementation where the last argument is an implicitly typed field value.
-
Nested Class Summary
Nested classes/interfaces inherited from class net.bytebuddy.implementation.InvokeDynamic.WithImplicitType
InvokeDynamic.WithImplicitType.OfArgument, InvokeDynamic.WithImplicitType.OfField, InvokeDynamic.WithImplicitType.OfInstance
Nested classes/interfaces inherited from class net.bytebuddy.implementation.InvokeDynamic
InvokeDynamic.AbstractDelegator, InvokeDynamic.Appender, InvokeDynamic.InvocationProvider, InvokeDynamic.TerminationHandler, InvokeDynamic.WithImplicitArguments, InvokeDynamic.WithImplicitTarget, InvokeDynamic.WithImplicitType
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.Implementation
Implementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Target
Nested classes/interfaces inherited from interface net.bytebuddy.dynamic.scaffold.InstrumentedType.Prepareable
InstrumentedType.Prepareable.NoOp
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final FieldLocator.Factory
The field locator factory to use.private final String
The field name.Fields inherited from class net.bytebuddy.implementation.InvokeDynamic
arguments, assigner, bootstrap, invocationProvider, terminationHandler, typing
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
OfField
(MethodDescription.InDefinedShape bootstrap, List<? extends JavaConstant> arguments, InvokeDynamic.InvocationProvider invocationProvider, InvokeDynamic.TerminationHandler terminationHandler, Assigner assigner, Assigner.Typing typing, String fieldName, FieldLocator.Factory fieldLocatorFactory) Creates a new abstract delegator for a dynamic method invocation where the last argument is assigned an implicit type. -
Method Summary
Modifier and TypeMethodDescriptionas
(TypeDescription typeDescription) Represents the last value as an instance of the given type.protected InvokeDynamic
Resolves the current configuration into a fully initialized invoke dynamic instance.Methods inherited from class net.bytebuddy.implementation.InvokeDynamic.WithImplicitType
as
Methods 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
-
fieldName
The field name. -
fieldLocatorFactory
The field locator factory to use.
-
-
Constructor Details
-
OfField
protected OfField(MethodDescription.InDefinedShape bootstrap, List<? extends JavaConstant> arguments, InvokeDynamic.InvocationProvider invocationProvider, InvokeDynamic.TerminationHandler terminationHandler, Assigner assigner, Assigner.Typing typing, String fieldName, FieldLocator.Factory fieldLocatorFactory) Creates a new abstract delegator for a dynamic method invocation where the last argument is assigned an implicit type.- Parameters:
bootstrap
- The bootstrap method or constructor.arguments
- The arguments that are provided to the bootstrap method.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.fieldName
- The field name.fieldLocatorFactory
- The field locator factory to use.
-
-
Method Details
-
as
Description copied from class:InvokeDynamic.WithImplicitType
Represents the last value as an instance of the given type.- Specified by:
as
in 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.AbstractDelegator
Resolves the current configuration into a fully initialized invoke dynamic instance.- Specified by:
materialize
in classInvokeDynamic.AbstractDelegator
- Returns:
- The fully resolved invoke dynamic instance.
-