protected abstract static class InvokeDynamic.AbstractDelegator extends InvokeDynamic
InvokeDynamic.AbstractDelegator, InvokeDynamic.Appender, InvokeDynamic.InvocationProvider, InvokeDynamic.TerminationHandler, InvokeDynamic.WithImplicitArguments, InvokeDynamic.WithImplicitArgumentType, InvokeDynamic.WithImplicitFieldType, InvokeDynamic.WithImplicitTargetImplementation.Composable, Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Targetassigner, bootstrapMethod, handleArguments, invocationProvider, terminationHandler, typing| Constructor and Description |
|---|
AbstractDelegator(MethodDescription.InDefinedShape bootstrapMethod,
List<?> handleArguments,
InvokeDynamic.InvocationProvider invocationProvider,
InvokeDynamic.TerminationHandler terminationHandler,
Assigner assigner,
Assigner.Typing typing)
Creates a new abstract delegator for a dynamic method invocation.
|
| Modifier and Type | Method and Description |
|---|---|
protected abstract InvokeDynamic |
materialize()
Resolves the current configuration into a fully initialized invoke dynamic instance.
|
InvokeDynamic |
withArgument(int... index)
Passes parameters of the instrumented method to the bootstrapped method.
|
InvokeDynamic.WithImplicitArgumentType |
withArgument(int index)
Passes a parameter of the instrumented method to the bootstrapped method.
|
InvokeDynamic |
withBooleanValue(boolean... value)
Requires the bootstrap method to bootstrap a method that takes the specified
boolean arguments
as its next parameters. |
InvokeDynamic |
withByteValue(byte... value)
Requires the bootstrap method to bootstrap a method that takes the specified
byte arguments
as its next parameters. |
InvokeDynamic |
withCharacterValue(char... value)
Requires the bootstrap method to bootstrap a method that takes the specified
char arguments
as its next parameters. |
InvokeDynamic |
withDoubleValue(double... value)
Requires the bootstrap method to bootstrap a method that takes the specified
double arguments
as its next parameters. |
InvokeDynamic |
withField(String... fieldName)
Passes the values of the specified fields to the bootstrap method.
|
InvokeDynamic |
withFloatValue(float... value)
Requires the bootstrap method to bootstrap a method that takes the specified
float arguments
as its next parameters. |
InvokeDynamic |
withImplicitAndMethodArguments()
Adds a potential
this reference and all method arguments to the the bootstrapped method. |
InvokeDynamic |
withInstance(JavaInstance... javaInstance)
Hands the provided Java instance to the dynamically bound method.
|
InvokeDynamic |
withInstanceField(String fieldName,
Type fieldType)
Passes the value of the specified instance field to the bootstrapped method.
|
InvokeDynamic |
withInstanceField(String fieldName,
TypeDefinition fieldType)
Passes the value of the specified instance field to the bootstrapped method.
|
InvokeDynamic |
withIntegerValue(int... value)
Requires the bootstrap method to bootstrap a method that takes the specified
int arguments
as its next parameters. |
InvokeDynamic |
withLongValue(long... value)
Requires the bootstrap method to bootstrap a method that takes the specified
long arguments
as its next parameters. |
InvokeDynamic |
withMethodArguments()
Adds all method arguments to the the bootstrapped method.
|
InvokeDynamic |
withNullValue(Class<?>... type)
Passes
null values of the given types to the bootstrapped method. |
InvokeDynamic |
withNullValue(TypeDescription... typeDescription)
Passes
null values of the given types to the bootstrapped method. |
InvokeDynamic |
withReference(Object... value)
Requires the bootstrap method to bootstrap a method that takes the specified arguments as its next parameters.
|
InvokeDynamic.WithImplicitFieldType |
withReference(Object value)
Requires the bootstrap method to bootstrap a method that takes the specified argument as its next parameter while
allowing to specify the value to be of a different type than the actual instance type.
|
InvokeDynamic |
withShortValue(short... value)
Requires the bootstrap method to bootstrap a method that takes the specified
short arguments
as its next parameters. |
InvokeDynamic |
withThis(Class<?>... type)
Passes references to
this onto the operand stack where the instance is represented as
the given types. |
InvokeDynamic |
withThis(TypeDescription... typeDescription)
Passes references to
this onto the operand stack where the instance is represented as
the given types. |
InvokeDynamic |
withType(TypeDescription... typeDescription)
Hands the provided types to the dynamically bound method.
|
InvokeDynamic |
withValue(Object... value)
Requires the bootstrap method to bootstrap a method that takes the specified arguments as its next parameters.
|
andThen, appender, bootstrap, bootstrap, bootstrap, bootstrap, bootstrap, bootstrap, equals, getInvocationProvider, hashCode, prepare, toString, withAssigner, withEnumerationpublic AbstractDelegator(MethodDescription.InDefinedShape bootstrapMethod, List<?> handleArguments, InvokeDynamic.InvocationProvider invocationProvider, InvokeDynamic.TerminationHandler terminationHandler, Assigner assigner, Assigner.Typing typing)
bootstrapMethod - The bootstrap method.handleArguments - 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.protected abstract InvokeDynamic materialize()
public InvokeDynamic withBooleanValue(boolean... value)
InvokeDynamicboolean arguments
as its next parameters.withBooleanValue in class InvokeDynamicvalue - The arguments to pass to the bootstrapped method.public InvokeDynamic withByteValue(byte... value)
InvokeDynamicbyte arguments
as its next parameters.withByteValue in class InvokeDynamicvalue - The arguments to pass to the bootstrapped method.public InvokeDynamic withShortValue(short... value)
InvokeDynamicshort arguments
as its next parameters.withShortValue in class InvokeDynamicvalue - The arguments to pass to the bootstrapped method.public InvokeDynamic withCharacterValue(char... value)
InvokeDynamicchar arguments
as its next parameters.withCharacterValue in class InvokeDynamicvalue - The arguments to pass to the bootstrapped method.public InvokeDynamic withIntegerValue(int... value)
InvokeDynamicint arguments
as its next parameters.withIntegerValue in class InvokeDynamicvalue - The arguments to pass to the bootstrapped method.public InvokeDynamic withLongValue(long... value)
InvokeDynamiclong arguments
as its next parameters.withLongValue in class InvokeDynamicvalue - The arguments to pass to the bootstrapped method.public InvokeDynamic withFloatValue(float... value)
InvokeDynamicfloat arguments
as its next parameters.withFloatValue in class InvokeDynamicvalue - The arguments to pass to the bootstrapped method.public InvokeDynamic withDoubleValue(double... value)
InvokeDynamicdouble arguments
as its next parameters.withDoubleValue in class InvokeDynamicvalue - The arguments to pass to the bootstrapped method.public InvokeDynamic withValue(Object... value)
InvokeDynamicRequires the bootstrap method to bootstrap a method that takes the specified arguments as its next parameters. Note that any primitive parameters are passed as their wrapper types. Furthermore, values that can be stored in the instrumented class's constant pool might be of different object identity when passed to the bootstrapped method or might not be visible to the the created class what later results in a runtime error.
withValue in class InvokeDynamicvalue - The arguments to pass to the bootstrapped method.public InvokeDynamic.WithImplicitFieldType withReference(Object value)
InvokeDynamicRequires the bootstrap method to bootstrap a method that takes the specified argument as its next parameter while allowing to specify the value to be of a different type than the actual instance type.
withReference in class InvokeDynamicvalue - The arguments to pass to the bootstrapped method.public InvokeDynamic withReference(Object... value)
InvokeDynamicwithReference in class InvokeDynamicvalue - The arguments to pass to the bootstrapped method.public InvokeDynamic withType(TypeDescription... typeDescription)
InvokeDynamicwithType in class InvokeDynamictypeDescription - The classes to provide to the bound method as an argument.public InvokeDynamic withInstance(JavaInstance... javaInstance)
InvokeDynamicwithInstance in class InvokeDynamicjavaInstance - The Java instance to provide to the bound method as an argument.public InvokeDynamic withNullValue(Class<?>... type)
InvokeDynamicnull values of the given types to the bootstrapped method.withNullValue in class InvokeDynamictype - The type that the null values should represent.public InvokeDynamic withNullValue(TypeDescription... typeDescription)
InvokeDynamicnull values of the given types to the bootstrapped method.withNullValue in class InvokeDynamictypeDescription - The type that the null values should represent.public InvokeDynamic withArgument(int... index)
InvokeDynamicwithArgument in class InvokeDynamicindex - The indices of the parameters that should be passed to the bootstrapped method.public InvokeDynamic.WithImplicitArgumentType withArgument(int index)
InvokeDynamicwithArgument in class InvokeDynamicindex - The index of the parameter that should be passed to the bootstrapped method.public InvokeDynamic withThis(Class<?>... type)
InvokeDynamicthis onto the operand stack where the instance is represented as
the given types.withThis in class InvokeDynamictype - The types as which the this reference of the intercepted method should be masked.this references are passed as the next arguments.public InvokeDynamic withThis(TypeDescription... typeDescription)
InvokeDynamicthis onto the operand stack where the instance is represented as
the given types.withThis in class InvokeDynamictypeDescription - The types as which the this reference of the intercepted method should be masked.this references are passed as the next arguments.public InvokeDynamic withMethodArguments()
InvokeDynamicwithMethodArguments in class InvokeDynamicpublic InvokeDynamic withImplicitAndMethodArguments()
InvokeDynamicthis reference and all method arguments to the the bootstrapped method.withImplicitAndMethodArguments in class InvokeDynamicthis reference and all
parameters of the instrumented method added.public InvokeDynamic withInstanceField(String fieldName, Type fieldType)
InvokeDynamicwithInstanceField in class InvokeDynamicfieldName - The name of the field.fieldType - The type of the field.public InvokeDynamic withInstanceField(String fieldName, TypeDefinition fieldType)
InvokeDynamicwithInstanceField in class InvokeDynamicfieldName - The name of the field.fieldType - The type of the field.public InvokeDynamic withField(String... fieldName)
InvokeDynamicwithField in class InvokeDynamicfieldName - The names of the fields to be passed to the bootstrapped method.Copyright © 2014–2016. All rights reserved.