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 MethodHandleLegacy constructor.protected static MethodHandleJava 9+ constructor if available.protected static MethodHandleJava 9+ method if available.protected static MethodHandleJava 9+ method if available.protected static MethodHandleJava 9+ method if available. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringReturns the name of the class loader.static StringReturns the module name.static StringReturns the module version.static booleanhasJava9()Check for Java 9+static StackTraceElementnewInstance(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+.
-