Class ForAIErrorPaths

java.lang.Object
org.ek9lang.compiler.common.ForAIErrorPaths
All Implemented Interfaces:
Function<String,String>, UnaryOperator<String>

public final class ForAIErrorPaths extends Object implements UnaryOperator<String>
Maps compiler error codes to their corresponding path in forAI.json. AI assistants use these paths to find structured guidance for compiler errors, providing a faster alternative to fetching errors.html.

The paths use dot-notation to reference sections in forAI.json. For example, "excludedFeatures.break" points to the entry in the excludedFeatures.features array where keyword="break".

No statics (Steve, 2026-10-28): hold an instance and apply the error code; the table itself is a constant, filled once.

  • Constructor Details

    • ForAIErrorPaths

      public ForAIErrorPaths()
  • Method Details

    • apply

      public String apply(String errorCode)
      Get the forAI.json path for an error code.
      Specified by:
      apply in interface Function<String,String>
      Parameters:
      errorCode - The error code (e.g., "E01070")
      Returns:
      The forAI.json path, or null if no AI guidance available