Annotation Interface IrisSpec
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.
On a top-level type Jobshop, IrisSpecProcessor reads the file, checks the
reader spec, and writes two classes beside the type:
JobshopHandles, with the parsedSpecasspec, a typed handle for each entry, named and typed asiris gen --lang javanames and types it, and aRecordReaderasreader;JobshopData, a record with a component for each entry, whichreaderreads.
@IrisSpec("formats/jobshop/jobshop.iris")
final class Jobshop {}
Data data = JobshopHandles.spec.read(input);
List<long[]> machine = data.get(JobshopHandles.machine);
JobshopData shop = JobshopHandles.reader.read(input);
A spec whose entries take more than 254 parameter slots in a record, where a long or
double component takes two, gets no record and no reader, since a constructor
takes at most 254; the processor notes it.
A relative path resolves against the directory that the processor option iris.root
names, as in -Airis.root=/path/to/project, or without the option against the directory of
the annotated type's source file. The generated classes keep the text of the spec, so the file is
not needed at run time; a build that should regenerate them when the file changes declares it as
an input of the compilation.
The annotation is kept only in the source, so the processor's jar is needed only to compile.
-
Required Element Summary
Required Elements
-
Element Details
-
value
String valueThe path of the reader spec.- Returns:
- the path, absolute or relative as the annotation's documentation says
-