Skip to content

Class Builder

Javadoc 27 generates this reference during each site build from the exported packages and the annotation processor. The Java guide shows the API in use.

java.lang.Object
dev.gecode.iris.build.Builder
public final class Builder extends Object
The statements of a reader spec, from Iris.builder(Runnable). source() prints them, and build() parses the text into an ordinary Spec.
  • Method Details

    • source

      public String source()
      Returns the text of the reader spec, as iris fmt writes it with no line limit.
      Returns:
      the text of the reader spec, as iris fmt writes it with no line limit
      Throws:
      BuildException - if a check of the whole spec fails, or an earlier statement failed one
    • build

      public Spec build()
      Prints the text and parses it.

      The spec keeps the call site of each statement, so that an error from reading with it names the line of the caller's code that wrote the statement the error belongs to, in IrisException.callSite.

      Returns:
      the reader spec
      Throws:
      BuildException - if a check fails, or the language rejects the text; then BuildException.callSite names the call of the statement that the error belongs to