Package net.bytebuddy.implementation
Enum Class LoadedTypeInitializer.NoOp
- All Implemented Interfaces:
Serializable
,Comparable<LoadedTypeInitializer.NoOp>
,Constable
,LoadedTypeInitializer
- Enclosing interface:
- LoadedTypeInitializer
public static enum LoadedTypeInitializer.NoOp
extends Enum<LoadedTypeInitializer.NoOp>
implements LoadedTypeInitializer
A loaded type initializer that does not do anything.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.LoadedTypeInitializer
LoadedTypeInitializer.Compound, LoadedTypeInitializer.ForStaticField, LoadedTypeInitializer.NoOp
-
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
isAlive()
Indicates if this initializer is alive and needs to be invoked.void
Callback that is invoked on the creation of an instrumented type.static LoadedTypeInitializer.NoOp
Returns the enum constant of this class with the specified name.static LoadedTypeInitializer.NoOp[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
INSTANCE
The singleton instance.
-
-
Constructor Details
-
NoOp
private NoOp()
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name
- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
-
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.
-