@HashCodeAndEqualsPlugin.Enhance public static class LoadedTypeInitializer.ForStaticField extends Object implements LoadedTypeInitializer, Serializable
LoadedTypeInitializer.Compound, LoadedTypeInitializer.ForStaticField, LoadedTypeInitializer.NoOp
Constructor and Description |
---|
ForStaticField(String fieldName,
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(Class<?> type)
Callback that is invoked on the creation of an instrumented type.
|
public ForStaticField(String fieldName, Object value)
LoadedTypeInitializer
for setting a static field.fieldName
- the name of the field.value
- The value to be set.public void onLoad(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.Copyright © 2014–2021. All rights reserved.