Class InstrumentationSettings
- java.lang.Object
-
- com.offbynull.coroutines.instrumenter.InstrumentationSettings
-
public final class InstrumentationSettings extends java.lang.ObjectInstrumentation settings.
-
-
Field Summary
Fields Modifier and Type Field Description private booleanautoSerializableprivate booleandebugModeprivate DebugGenerators.MarkerTypemarkerType
-
Constructor Summary
Constructors Constructor Description InstrumentationSettings(DebugGenerators.MarkerType markerType, boolean debugMode, boolean autoSerializable)Constructs aInstrumentationSettingsobject.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description DebugGenerators.MarkerTypegetMarkerType()Get marker type.booleanisAutoSerializable()Get auto-serializable.booleanisDebugMode()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 aInstrumentationSettingsobject.- 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 asSerializableand 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 theserialVersionUIDinternally generated by Java will change between the old and new version).- Returns:
- auto-serializable
-
-