public static class MethodDelegation.InstrumentationDelegate.ForStaticFieldInstance extends Object implements MethodDelegation.InstrumentationDelegate, TypeInitializer
MethodDelegation.InstrumentationDelegate.ForConstruction, MethodDelegation.InstrumentationDelegate.ForInstanceField, MethodDelegation.InstrumentationDelegate.ForStaticFieldInstance, MethodDelegation.InstrumentationDelegate.ForStaticMethod
TypeInitializer.Compound, TypeInitializer.NoOp
Constructor and Description |
---|
ForStaticFieldInstance(Object delegate)
Creates a new instrumentation to an instance that is stored in a
static field. |
ForStaticFieldInstance(Object delegate,
String fieldName)
Creates a new instrumentation to an instance that is stored in a
static field. |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object other) |
MethodDelegationBinder.MethodInvoker |
getMethodInvoker(TypeDescription instrumentedType)
Returns the method invoker responsible for invoking the delegation method.
|
StackManipulation |
getPreparingStackAssignment(TypeDescription instrumentedType)
Returns the stack manipulation responsible for preparing the instance representing the instrumentation.
|
int |
hashCode() |
boolean |
isAlive()
Indicates if this initializer is alive and needs to be invoked.
|
void |
onLoad(Class<?> type)
Callback that is invoked on the creation of an instrumented type.
|
InstrumentedType |
prepare(InstrumentedType instrumentedType)
Prepares the instrumented type.
|
String |
toString() |
public ForStaticFieldInstance(Object delegate)
static
field.
The field name will be created randomly.delegate
- The actual delegation target.public InstrumentedType prepare(InstrumentedType instrumentedType)
MethodDelegation.InstrumentationDelegate
prepare
in interface MethodDelegation.InstrumentationDelegate
instrumentedType
- The instrumented type to be prepared.public StackManipulation getPreparingStackAssignment(TypeDescription instrumentedType)
MethodDelegation.InstrumentationDelegate
getPreparingStackAssignment
in interface MethodDelegation.InstrumentationDelegate
instrumentedType
- A description of the instrumented type to which the instrumentation is applied.public MethodDelegationBinder.MethodInvoker getMethodInvoker(TypeDescription instrumentedType)
MethodDelegation.InstrumentationDelegate
getMethodInvoker
in interface MethodDelegation.InstrumentationDelegate
instrumentedType
- The instrumented type to which the instrumentation is applied.public void onLoad(Class<?> type)
TypeInitializer
onLoad
in interface TypeInitializer
type
- The manifestation of the instrumented type.public boolean isAlive()
TypeInitializer
isAlive
in interface TypeInitializer
true
if this initializer is alive.Copyright © 2014. All rights reserved.