- All Implemented Interfaces:
Serializable,Comparable<FieldAccess>,Constable
Mechanisms reading and writing fields, see
ToolsetBuilder.fieldAccess(FieldAccess...).-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionNarcissus library with its native part, must be on the classpath.Reflection.Unsafe, works for any package.VarHandleof the trusted lookup, JDK 9+. -
Method Summary
Modifier and TypeMethodDescriptionstatic FieldAccessReturns the enum constant of this class with the specified name.static FieldAccess[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
REFLECTION
Reflection. Needs the package of the field opened to the cloner on JDK 9+ (or aModuleOpening). -
UNSAFE
Unsafe, works for any package. Since JDK 24 the JVM warns on the first use ofsun.misc.Unsafememory access; if it is denied (--sun-misc-unsafe-memory-access=deny), a toolset with this mechanism is not built. -
VAR_HANDLE
VarHandleof the trusted lookup, JDK 9+. Needsjava.base/java.lang.invokeopened to the cloner. -
NARCISSUS
Narcissus library with its native part, must be on the classpath. Narcissus loads a native library: since JDK 24 the JVM warns about it unless started with--enable-native-access=ALL-UNNAMED(or the module of Narcissus), a future JDK will deny it.
-
-
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
-