Package com.bw.jtools.profiling
Enum ReflectionProfilingUtil.StackAccessMode
- java.lang.Object
-
- java.lang.Enum<ReflectionProfilingUtil.StackAccessMode>
-
- com.bw.jtools.profiling.ReflectionProfilingUtil.StackAccessMode
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ReflectionProfilingUtil.StackAccessMode>,java.lang.constant.Constable
- Enclosing class:
- ReflectionProfilingUtil
public static enum ReflectionProfilingUtil.StackAccessMode extends java.lang.Enum<ReflectionProfilingUtil.StackAccessMode>
-
-
Enum Constant Summary
Enum Constants Enum Constant Description AUTOTry to detect the best way.FAILSAFEFail-safe viaThrowable.getStackTrace(), works always but is slower by factor 10.GETSTACKTRACEELEMENTVia protected Throwable-Method, works through Java 8.STACKWALKERStackWalker, since Java 9.
-
Method Summary
Modifier and Type Method Description static ReflectionProfilingUtil.StackAccessModevalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ReflectionProfilingUtil.StackAccessMode[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
STACKWALKER
public static final ReflectionProfilingUtil.StackAccessMode STACKWALKER
StackWalker, since Java 9.
-
GETSTACKTRACEELEMENT
public static final ReflectionProfilingUtil.StackAccessMode GETSTACKTRACEELEMENT
Via protected Throwable-Method, works through Java 8.
-
FAILSAFE
public static final ReflectionProfilingUtil.StackAccessMode FAILSAFE
Fail-safe viaThrowable.getStackTrace(), works always but is slower by factor 10.
-
AUTO
public static final ReflectionProfilingUtil.StackAccessMode AUTO
Try to detect the best way.
-
-
Method Detail
-
values
public static ReflectionProfilingUtil.StackAccessMode[] values()
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ReflectionProfilingUtil.StackAccessMode 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
-
-