public static class InvokeDynamic.WithImplicitFieldType extends InvokeDynamic.AbstractDelegator
InvokeDynamic.AbstractDelegator, InvokeDynamic.Appender, InvokeDynamic.InvocationProvider, InvokeDynamic.TerminationHandler, InvokeDynamic.WithImplicitArguments, InvokeDynamic.WithImplicitArgumentType, InvokeDynamic.WithImplicitFieldType, InvokeDynamic.WithImplicitTargetImplementation.Compound, Implementation.Context, Implementation.Simple, Implementation.SpecialMethodInvocation, Implementation.Targetassigner, 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, withValuebootstrap, bootstrap, bootstrap, equals, hashCode, withEnumerationprotected 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.AbstractDelegatormaterialize in class InvokeDynamic.AbstractDelegatorpublic InvokeDynamic withAssigner(Assigner assigner, boolean dynamicallyTyped)
InvokeDynamicwithAssigner in class InvokeDynamicassigner - The assigner to use.dynamicallyTyped - true if the assigner should attempt dynamic typing.public Implementation andThen(Implementation implementation)
InvokeDynamicandThen in class InvokeDynamicimplementation - The implementation to apply after executing the dynamic method invocation.public InstrumentedType prepare(InstrumentedType instrumentedType)
ImplementationByteCodeAppender 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 Implementationprepare in class InvokeDynamicinstrumentedType - The instrumented type that is the basis of the ongoing instrumentation.public ByteCodeAppender appender(Implementation.Target implementationTarget)
Implementationappender in interface Implementationappender in class InvokeDynamicimplementationTarget - The target of the current implementation.Implementation.prepare(InstrumentedType).protected InvokeDynamic.InvocationProvider getInvocationProvider()
InvokeDynamicgetInvocationProvider in class InvokeDynamicpublic String toString()
toString in class InvokeDynamicCopyright © 2014–2015. All rights reserved.