Package net.bytebuddy.implementation
Class LoadedTypeInitializer.Compound
java.lang.Object
net.bytebuddy.implementation.LoadedTypeInitializer.Compound
- All Implemented Interfaces:
Serializable
,LoadedTypeInitializer
- Enclosing interface:
- LoadedTypeInitializer
@Enhance
public static class LoadedTypeInitializer.Compound
extends Object
implements LoadedTypeInitializer, Serializable
A compound loaded type initializer that combines several type initializers.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.LoadedTypeInitializer
LoadedTypeInitializer.Compound, LoadedTypeInitializer.ForStaticField, LoadedTypeInitializer.NoOp
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<LoadedTypeInitializer>
The loaded type initializers that are represented by this compound type initializer.private static final long
This class's serial version UID. -
Constructor Summary
ConstructorsConstructorDescriptionCompound
(List<? extends LoadedTypeInitializer> loadedTypeInitializers) Creates a new compound loaded type initializer.Compound
(LoadedTypeInitializer... loadedTypeInitializer) Creates a new compound loaded type initializer. -
Method Summary
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDThis class's serial version UID.- See Also:
-
loadedTypeInitializers
The loaded type initializers that are represented by this compound type initializer.
-
-
Constructor Details
-
Compound
Creates a new compound loaded type initializer.- Parameters:
loadedTypeInitializer
- A number of loaded type initializers in their invocation order.
-
Compound
Creates a new compound loaded type initializer.- Parameters:
loadedTypeInitializers
- A number of loaded type initializers in their invocation order.
-
-
Method Details
-
onLoad
Callback that is invoked on the creation of an instrumented type. If the loaded type initializer is alive, this method should be implemented empty instead of throwing an exception.- Specified by:
onLoad
in interfaceLoadedTypeInitializer
- Parameters:
type
- The manifestation of the instrumented type.
-
isAlive
public boolean isAlive()Indicates if this initializer is alive and needs to be invoked. This is only meant as a mark. A loaded type initializer that is not alive might still be called and must therefore not throw an exception but rather provide an empty implementation.- Specified by:
isAlive
in interfaceLoadedTypeInitializer
- Returns:
true
if this initializer is alive.
-