Class InstrumentationSettings
- java.lang.Object
-
- com.offbynull.coroutines.instrumenter.InstrumentationSettings
-
public final class InstrumentationSettings extends java.lang.Object
Instrumentation settings.
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
autoSerializable
private boolean
debugMode
private DebugGenerators.MarkerType
markerType
-
Constructor Summary
Constructors Constructor Description InstrumentationSettings(DebugGenerators.MarkerType markerType, boolean debugMode, boolean autoSerializable)
Constructs aInstrumentationSettings
object.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DebugGenerators.MarkerType
getMarkerType()
Get marker type.boolean
isAutoSerializable()
Get auto-serializable.boolean
isDebugMode()
Get debug mode.
-
-
-
Field Detail
-
markerType
private final DebugGenerators.MarkerType markerType
-
debugMode
private final boolean debugMode
-
autoSerializable
private final boolean autoSerializable
-
-
Constructor Detail
-
InstrumentationSettings
public InstrumentationSettings(DebugGenerators.MarkerType markerType, boolean debugMode, boolean autoSerializable)
Constructs aInstrumentationSettings
object.- Parameters:
markerType
- marker typedebugMode
- debug modeautoSerializable
- auto-serializable- Throws:
java.lang.NullPointerException
- if any argument isnull
-
-
Method Detail
-
getMarkerType
public DebugGenerators.MarkerType getMarkerType()
Get marker type. Depending on the marker type used, markers will be added to the instrumented code that explains what each portion of the instrumented code is doing. This is useful for debugging the instrumentation logic (if the instrumented code is bugged).- Returns:
- marker type
-
isDebugMode
public boolean isDebugMode()
Get debug mode. Debug mode adds extra instrumentation code to the class such that the instrumented method's state is viewable when you run the instrumented code through a debugger (e.g. the debugger in Netbeans/Eclipse/IntelliJ).- Returns:
- debug mode
-
isAutoSerializable
public boolean isAutoSerializable()
Get auto-serializable. Auto-serializable will automatically mark the classes of methods intended to run as part of a coroutine asSerializable
and provide a assign a defaultserialVersionUID
. This is vital for the serialization feature (if the user uses the default serializer). If the classes don't extendSerializable
, they'll get an exception when serializing it. Also, if they don't hardcode aserialVersionUID
, any change to the class will cause deserialization of previous versions to fail (because theserialVersionUID
internally generated by Java will change between the old and new version).- Returns:
- auto-serializable
-
-