Record Class ModelOptions
java.lang.Object
java.lang.Record
org.clafer.frontend.ModelOptions
- Record Components:
core---coretraceLength---tlminInt---minintmaxInt---maxintdecimalDigits---decimal-digitssimpleScopes---ss=simple, the default, rather than--ss=noneimports- the files of--import, as writtenothers- the names of the other options given, e.g.,-k
public record ModelOptions(boolean core, OptionalInt traceLength, OptionalLong minInt, OptionalLong maxInt, Optional<Integer> decimalDigits, boolean simpleScopes, List<String> imports, Set<String> others)
extends Record
The options of a model file that the frontend uses, from its first line,
//# OPTIONS ..., as the compiler reads them
(Import.fileOptions): --core, --tl,
--minint, --maxint, --decimal-digits,
--ss and --import. An option is --name=value or
--name value; the other options are kept by name only, the short
name if it has one, e.g., -c for --check-duplicates, for
the checks of the model and of combine(List, List, String, ModelOptions, List). As in the compiler,
--explicit implies -f, -l and --ss=none.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final ModelOptionsThe options of a model without a//# OPTIONSline. -
Constructor Summary
ConstructorsConstructorDescriptionModelOptions(boolean core, OptionalInt traceLength, OptionalLong minInt, OptionalLong maxInt, Optional<Integer> decimalDigits, boolean simpleScopes, List<String> imports, Set<String> others) Creates an instance of aModelOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleancheckAfm()booleanbooleancore()Returns the value of thecorerecord component.Returns the value of thedecimalDigitsrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanexplicit()final inthashCode()Returns a hash code value for this object.imports()Returns the value of theimportsrecord component.maxInt()Returns the value of themaxIntrecord component.minInt()Returns the value of theminIntrecord component.static ModelOptionsothers()Returns the value of theothersrecord component.booleanReturns the value of thesimpleScopesrecord component.booleanfinal StringtoString()Returns a string representation of this record class.Returns the value of thetraceLengthrecord component.
-
Field Details
-
Defaults
The options of a model without a//# OPTIONSline.
-
-
Constructor Details
-
ModelOptions
public ModelOptions(boolean core, OptionalInt traceLength, OptionalLong minInt, OptionalLong maxInt, Optional<Integer> decimalDigits, boolean simpleScopes, List<String> imports, Set<String> others) Creates an instance of aModelOptionsrecord class.- Parameters:
core- the value for thecorerecord componenttraceLength- the value for thetraceLengthrecord componentminInt- the value for theminIntrecord componentmaxInt- the value for themaxIntrecord componentdecimalDigits- the value for thedecimalDigitsrecord componentsimpleScopes- the value for thesimpleScopesrecord componentimports- the value for theimportsrecord componentothers- the value for theothersrecord component
-
-
Method Details
-
of
- Parameters:
text- the text of a model file- Returns:
- the options of its first line
-
explicit
- Returns:
--explicit: the model is an explicit model, whose names are the UIDs, without layout and without scope analysis
-
skipResolver
- Returns:
-f, also of--explicit: the names are the UIDs
-
checkDuplicates
- Returns:
--check-duplicates: no two clafers have the same name
-
checkAfm
- Returns:
--check-afm: no concrete clafer has more than one instance
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
core
-
traceLength
Returns the value of thetraceLengthrecord component.- Returns:
- the value of the
traceLengthrecord component
-
minInt
-
maxInt
-
decimalDigits
Returns the value of thedecimalDigitsrecord component.- Returns:
- the value of the
decimalDigitsrecord component
-
simpleScopes
Returns the value of thesimpleScopesrecord component.- Returns:
- the value of the
simpleScopesrecord component
-
imports
-
others
-