public static class InvokeDynamic.WithImplicitFieldType extends InvokeDynamic.AbstractDelegator
InvokeDynamic.AbstractDelegator, InvokeDynamic.Appender, InvokeDynamic.InvocationProvider, InvokeDynamic.TerminationHandler, InvokeDynamic.WithImplicitArguments, InvokeDynamic.WithImplicitArgumentType, InvokeDynamic.WithImplicitFieldType, InvokeDynamic.WithImplicitTarget
Implementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Target
assigner, bootstrapMethod, dynamicallyTyped, handleArguments, invocationProvider, terminationHandler
Modifier | Constructor and Description |
---|---|
protected |
WithImplicitFieldType(MethodDescription bootstrapMethod,
List<?> handleArguments,
InvokeDynamic.InvocationProvider invocationProvider,
InvokeDynamic.TerminationHandler terminationHandler,
Assigner assigner,
boolean dynamicallyTyped,
Object value)
Creates a new invoke dynamic instance with an implicit field type for the provided value.
|
Modifier and Type | Method and Description |
---|---|
Implementation |
andThen(Implementation implementation)
Applies this invoke dynamic implementation and removes the return value of the bootstrapped method from
the operand stack before applying the provided implementation.
|
ByteCodeAppender |
appender(Implementation.Target implementationTarget)
Creates a byte code appender that determines the implementation of the instrumented type's methods.
|
InvokeDynamic |
as(Class<?> type)
Defines the given value to be treated as an instance of the provided type.
|
InvokeDynamic |
as(TypeDescription typeDescription)
Defines the given value to be treated as an instance of the provided type.
|
protected InvokeDynamic.InvocationProvider |
getInvocationProvider()
Returns the invocation provider to be used for equals and hash code calculations.
|
protected InvokeDynamic |
materialize()
Resolves the current configuration into a fully initialized invoke dynamic instance.
|
InstrumentedType |
prepare(InstrumentedType instrumentedType)
During the preparation phase of an implementation, implementations are eligible to adding fields or methods
to the currently instrumented type.
|
String |
toString() |
InvokeDynamic |
withAssigner(Assigner assigner,
boolean dynamicallyTyped)
Instructs this implementation to use the provided assigner and decides if the assigner should apply
dynamic typing.
|
withArgument, withArgument, withBooleanValue, withByteValue, withCharacterValue, withDoubleValue, withField, withFloatValue, withImplicitAndMethodArguments, withInstance, withInstanceField, withInstanceField, withIntegerValue, withLongValue, withMethodArguments, withNullValue, withNullValue, withReference, withReference, withShortValue, withThis, withThis, withType, withValue
bootstrap, bootstrap, bootstrap, equals, hashCode, withEnumeration
protected WithImplicitFieldType(MethodDescription bootstrapMethod, List<?> handleArguments, InvokeDynamic.InvocationProvider invocationProvider, InvokeDynamic.TerminationHandler terminationHandler, Assigner assigner, boolean dynamicallyTyped, Object value)
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.dynamicallyTyped
- true
if the assigner should attempt dynamically-typed assignments.value
- The value that is supplied as the next argument to the bootstrapped method.public InvokeDynamic as(Class<?> type)
type
- The type as which the provided instance should be handed to the bootstrap method.public InvokeDynamic as(TypeDescription typeDescription)
typeDescription
- The type as which the provided instance should be handed to the bootstrap method.protected InvokeDynamic materialize()
InvokeDynamic.AbstractDelegator
materialize
in class InvokeDynamic.AbstractDelegator
public InvokeDynamic withAssigner(Assigner assigner, boolean dynamicallyTyped)
InvokeDynamic
withAssigner
in class InvokeDynamic
assigner
- The assigner to use.dynamicallyTyped
- true
if the assigner should attempt dynamic typing.public Implementation andThen(Implementation implementation)
InvokeDynamic
andThen
in class InvokeDynamic
implementation
- The implementation to apply after executing the dynamic method invocation.public InstrumentedType prepare(InstrumentedType instrumentedType)
Implementation
ByteCodeAppender
that is emitted
on the call to
Implementation.appender(Implementation.Target)
call. On this method call, loaded type initializers can also be added to the instrumented type.prepare
in interface Implementation
prepare
in class InvokeDynamic
instrumentedType
- The instrumented type that is the basis of the ongoing instrumentation.public ByteCodeAppender appender(Implementation.Target implementationTarget)
Implementation
appender
in interface Implementation
appender
in class InvokeDynamic
implementationTarget
- The target of the current implementation.Implementation.prepare(InstrumentedType)
.protected InvokeDynamic.InvocationProvider getInvocationProvider()
InvokeDynamic
getInvocationProvider
in class InvokeDynamic
public String toString()
toString
in class InvokeDynamic
Copyright © 2014–2015. All rights reserved.