Class InstrumentationSettings


  • public final class InstrumentationSettings
    extends java.lang.Object
    Instrumentation settings.
    • Field Detail

      • debugMode

        private final boolean debugMode
      • autoSerializable

        private final boolean autoSerializable
    • Constructor Detail

      • InstrumentationSettings

        public InstrumentationSettings​(DebugGenerators.MarkerType markerType,
                                       boolean debugMode,
                                       boolean autoSerializable)
        Constructs a InstrumentationSettings object.
        Parameters:
        markerType - marker type
        debugMode - debug mode
        autoSerializable - auto-serializable
        Throws:
        java.lang.NullPointerException - if any argument is null
    • 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 as Serializable and provide a assign a default serialVersionUID. This is vital for the serialization feature (if the user uses the default serializer). If the classes don't extend Serializable, they'll get an exception when serializing it. Also, if they don't hardcode a serialVersionUID, any change to the class will cause deserialization of previous versions to fail (because the serialVersionUID internally generated by Java will change between the old and new version).
        Returns:
        auto-serializable