@HashCodeAndEqualsPlugin.Enhance public static class LoadedTypeInitializer.ForStaticField extends java.lang.Object implements LoadedTypeInitializer, java.io.Serializable
LoadedTypeInitializer.Compound, LoadedTypeInitializer.ForStaticField, LoadedTypeInitializer.NoOp
Modifier and Type | Field and Description |
---|---|
private java.lang.String |
fieldName
The name of the field.
|
private static long |
serialVersionUID
This class's serial version UID.
|
private static java.lang.Object |
STATIC_FIELD
A value for accessing a static field.
|
private java.lang.Object |
value
The value of the field.
|
Modifier | Constructor and Description |
---|---|
protected |
ForStaticField(java.lang.String fieldName,
java.lang.Object value)
Creates a new
LoadedTypeInitializer for setting a static field. |
Modifier and Type | Method and Description |
---|---|
boolean |
isAlive()
Indicates if this initializer is alive and needs to be invoked.
|
void |
onLoad(java.lang.Class<?> type)
Callback that is invoked on the creation of an instrumented type.
|
private static final long serialVersionUID
private static final java.lang.Object STATIC_FIELD
private final java.lang.String fieldName
private final java.lang.Object value
protected ForStaticField(java.lang.String fieldName, java.lang.Object value)
LoadedTypeInitializer
for setting a static field.fieldName
- the name of the field.value
- The value to be set.public void onLoad(java.lang.Class<?> type)
onLoad
in interface LoadedTypeInitializer
type
- The manifestation of the instrumented type.public boolean isAlive()
isAlive
in interface LoadedTypeInitializer
true
if this initializer is alive.