Package net.bytebuddy.implementation
Enum LoadedTypeInitializer.NoOp
- java.lang.Object
-
- java.lang.Enum<LoadedTypeInitializer.NoOp>
-
- net.bytebuddy.implementation.LoadedTypeInitializer.NoOp
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<LoadedTypeInitializer.NoOp>,LoadedTypeInitializer
- Enclosing interface:
- LoadedTypeInitializer
public static enum LoadedTypeInitializer.NoOp extends java.lang.Enum<LoadedTypeInitializer.NoOp> implements LoadedTypeInitializer
A loaded type initializer that does not do anything.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.bytebuddy.implementation.LoadedTypeInitializer
LoadedTypeInitializer.Compound, LoadedTypeInitializer.ForStaticField, LoadedTypeInitializer.NoOp
-
-
Enum Constant Summary
Enum Constants Enum Constant Description INSTANCEThe singleton instance.
-
Constructor Summary
Constructors Modifier Constructor Description privateNoOp()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAlive()Indicates if this initializer is alive and needs to be invoked.voidonLoad(java.lang.Class<?> type)Callback that is invoked on the creation of an instrumented type.static LoadedTypeInitializer.NoOpvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static LoadedTypeInitializer.NoOp[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
INSTANCE
public static final LoadedTypeInitializer.NoOp INSTANCE
The singleton instance.
-
-
Method Detail
-
values
public static LoadedTypeInitializer.NoOp[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (LoadedTypeInitializer.NoOp c : LoadedTypeInitializer.NoOp.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static LoadedTypeInitializer.NoOp valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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:
java.lang.IllegalArgumentException- if this enum type has no constant with the specified namejava.lang.NullPointerException- if the argument is null
-
onLoad
public void onLoad(java.lang.Class<?> type)
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:
onLoadin 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:
isAlivein interfaceLoadedTypeInitializer- Returns:
trueif this initializer is alive.
-
-