Class SStackTraceElementHelper
java.lang.Object
jadex.common.transformation.traverser.SStackTraceElementHelper
Helper for reading stacktrace elements in both Java 9 and legacy Java.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static MethodHandle
Legacy constructor.protected static MethodHandle
Java 9+ constructor if available.protected static MethodHandle
Java 9+ method if available.protected static MethodHandle
Java 9+ method if available.protected static MethodHandle
Java 9+ method if available. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic String
Returns the name of the class loader.static String
Returns the module name.static String
Returns the module version.static boolean
hasJava9()
Check for Java 9+static StackTraceElement
newInstance
(String classloadername, String modulename, String moduleversion, String classname, String methodname, String filename, int linenumber) Creates a new instance based on Java version capability.
-
Field Details
-
constructor
Legacy constructor. -
constructor9
Java 9+ constructor if available. -
getclassloadername
Java 9+ method if available. -
getmodulename
Java 9+ method if available. -
getmoduleversion
Java 9+ method if available.
-
-
Constructor Details
-
SStackTraceElementHelper
public SStackTraceElementHelper()
-
-
Method Details
-
newInstance
public static StackTraceElement newInstance(String classloadername, String modulename, String moduleversion, String classname, String methodname, String filename, int linenumber) Creates a new instance based on Java version capability.- Returns:
- StackTraceElement.
-
getModuleName
Returns the module name. -
getModuleVersion
Returns the module version. -
getClassLoaderName
Returns the name of the class loader. -
hasJava9
public static boolean hasJava9()Check for Java 9+- Returns:
- True if Java9+.
-