Class DiagnosticCodes

java.lang.Object
ca.mcscert.jpipe.compiler.model.DiagnosticCodes

public final class DiagnosticCodes extends Object
Compiler diagnostic error codes.

Each constant is a stable, bare kebab-case identifier carried by Diagnostic.code(), e.g. "unknown-model". Centralising them here makes them greppable and prevents silent drift between the site that emits a diagnostic and any tooling (tests, IDEs) that matches on the code.

The identifiers carry no brackets: presentation belongs to the renderer. The human-readable report displays them as "[unknown-model] " prefixes, while the JSON report emits them as a separate code field. Validation rules reach Diagnostic.code() the same way, via Violation.rule(), and are not listed here.

  • Field Details

    • SINGLE_CONCLUSION

      public static final String SINGLE_CONCLUSION
      A justification model declares more than one conclusion element.
      See Also:
    • UNRESOLVED_OVERRIDE

      public static final String UNRESOLVED_OVERRIDE
      A qualified override reference appears in a model that does not implement any template.
      See Also:
    • CYCLIC_IMPLEMENTS

      public static final String CYCLIC_IMPLEMENTS
      Two models mutually implement each other, creating a cycle.
      See Also:
    • IMPLEMENTS_ERROR

      public static final String IMPLEMENTS_ERROR
      An implements directive could not be applied.
      See Also:
    • REFERENCE_INTO_TEMPLATE

      public static final String REFERENCE_INTO_TEMPLATE
      A model implementing a template references a template-internal element (a strategy or conclusion) instead of only overriding its @support placeholders.
      See Also:
    • INVALID_SUPPORT

      public static final String INVALID_SUPPORT
      An AddSupport command references an element that does not exist.
      See Also:
    • UNKNOWN_MODEL

      public static final String UNKNOWN_MODEL
      A command references a model name that does not exist in the unit.
      See Also:
    • UNKNOWN_ELEMENT

      public static final String UNKNOWN_ELEMENT
      A command references an element ID that does not exist in its model.
      See Also:
    • INCOMPATIBLE_UNIFICATION

      public static final String INCOMPATIBLE_UNIFICATION
      Unification grouped elements whose kinds cannot be merged into a single element, e.g. a strategy and an evidence sharing the same label.
      See Also:
    • EXECUTION_ERROR

      public static final String EXECUTION_ERROR
      A command could not be executed (catch-all for unexpected failures).
      See Also:
    • UNRESOLVED_SYMBOL

      public static final String UNRESOLVED_SYMBOL
      A command remained unexecuted after all dependency rounds were exhausted.
      See Also: