Enum Class DebugAspect

java.lang.Object
java.lang.Enum<DebugAspect>
org.ek9lang.compiler.directives.DebugAspect
All Implemented Interfaces:
Serializable, Comparable<DebugAspect>, Constable

public enum DebugAspect extends Enum<DebugAspect>
Which slice of the generated debug information a @DEBUG directive asserts against.

A @DEBUG directive is deliberately finer-grained than @BYTECODE: it keeps ONE javap section for ONE construct so that a debug-info defect (a wrong source line, a wrong local range, a wrong SMAP mapping) is localised to the aspect that OWNS it, rather than surfacing later as a misbehaving step/breakpoint that has to be diagnosed backwards. See docs/strategic/SPEC-agentic-debugger.md ยง9.2.

Each aspect names the javap section it extracts (via JavapSectionExtractor). How the extracted section is normalised is aspect-specific and lives in DebugDirectiveListener:

  • LINES โ€” the LineNumberTable, normalised to the source-line SEQUENCE (the program-counter of each entry is dropped) so the golden asserts WHICH source lines map, in order, and is immune to instruction-offset churn.
  • LOCALS โ€” the LocalVariableTable, kept WITH its Start/Length ranges, because those pc-based ranges ARE the assertion (the WP-B per-variable declaration-label work targets exactly them).
  • SMAP โ€” the SourceDebugExtension (JSR-45 stratum line map), kept as-is.
  • Enum Constant Details

  • Method Details

    • values

      public static DebugAspect[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static DebugAspect valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • javapSection

      public String javapSection()
      The javap section header word (without the trailing colon) this aspect extracts.