Class InstrumentationSettings
java.lang.Object
com.offbynull.coroutines.instrumenter.InstrumentationSettings
Instrumentation settings.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
private final boolean
private final DebugGenerators.MarkerType
-
Constructor Summary
ConstructorsConstructorDescriptionInstrumentationSettings
(DebugGenerators.MarkerType markerType, boolean debugMode, boolean autoSerializable) Constructs aInstrumentationSettings
object. -
Method Summary
Modifier and TypeMethodDescriptionGet marker type.boolean
Get auto-serializable.boolean
Get debug mode.
-
Field Details
-
markerType
-
debugMode
private final boolean debugMode -
autoSerializable
private final boolean autoSerializable
-
-
Constructor Details
-
InstrumentationSettings
public InstrumentationSettings(DebugGenerators.MarkerType markerType, boolean debugMode, boolean autoSerializable) Constructs aInstrumentationSettings
object.- Parameters:
markerType
- marker typedebugMode
- debug modeautoSerializable
- auto-serializable- Throws:
NullPointerException
- if any argument isnull
-
-
Method Details
-
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
-