Package net.bytebuddy.implementation
Class InvokeDynamic.WithImplicitType
- java.lang.Object
-
- net.bytebuddy.implementation.InvokeDynamic
-
- net.bytebuddy.implementation.InvokeDynamic.AbstractDelegator
-
- net.bytebuddy.implementation.InvokeDynamic.WithImplicitType
-
- All Implemented Interfaces:
InstrumentedType.Prepareable
,Implementation
,Implementation.Composable
- Direct Known Subclasses:
InvokeDynamic.WithImplicitType.OfArgument
,InvokeDynamic.WithImplicitType.OfField
,InvokeDynamic.WithImplicitType.OfInstance
- Enclosing class:
- InvokeDynamic
public abstract static class InvokeDynamic.WithImplicitType extends InvokeDynamic.AbstractDelegator
AnInvokeDynamic
invocation where the last argument is assigned its implicit type.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static class
InvokeDynamic.WithImplicitType.OfArgument
An invoke dynamic implementation where the last argument is an implicitly typed method argument.protected static class
InvokeDynamic.WithImplicitType.OfField
An invoke dynamic implementation where the last argument is an implicitly typed field value.protected static class
InvokeDynamic.WithImplicitType.OfInstance
A step in the invoke dynamic domain specific language that allows to explicitly specify a field type for a reference value.-
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
-
-
Field Summary
-
Fields inherited from class net.bytebuddy.implementation.InvokeDynamic
arguments, assigner, bootstrap, invocationProvider, terminationHandler, typing
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
WithImplicitType(MethodDescription.InDefinedShape bootstrap, java.util.List<?> arguments, InvokeDynamic.InvocationProvider invocationProvider, InvokeDynamic.TerminationHandler terminationHandler, Assigner assigner, Assigner.Typing typing)
Creates a new abstract delegator for a dynamic method invocation where the last argument is assigned an implicit type.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description InvokeDynamic
as(java.lang.Class<?> type)
Represents the last value as an instance of the given type.abstract InvokeDynamic
as(TypeDescription typeDescription)
Represents the last value as an instance of the given type.-
Methods inherited from class net.bytebuddy.implementation.InvokeDynamic.AbstractDelegator
andThen, appender, materialize, 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
-
-
-
-
Constructor Detail
-
WithImplicitType
protected WithImplicitType(MethodDescription.InDefinedShape bootstrap, java.util.List<?> arguments, InvokeDynamic.InvocationProvider invocationProvider, InvokeDynamic.TerminationHandler terminationHandler, Assigner assigner, Assigner.Typing typing)
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 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.
-
-
Method Detail
-
as
public InvokeDynamic as(java.lang.Class<?> type)
Represents the last value as an instance of the given type.- Parameters:
type
- 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.
-
as
public abstract InvokeDynamic as(TypeDescription typeDescription)
Represents the last value as an instance of the given type.- 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.
-
-