Record Class ModelFiles.ImportOptions

java.lang.Object
java.lang.Record
org.clafer.frontend.ModelFiles.ImportOptions
Record Components:
roots - --import-root: a local import must be inside one of these folders, after resolving .. and symbolic links; any local file without them
publicOnly - --public-imports: URLs only from public addresses, without a proxy
base - --import-base: the URL from which the model's text was read, which its imports are relative to, so they can only be URLs
readUrls - whether URLs are downloaded; if not, an import of a URL is an error (ModelFiles.importsUrl()), e.g., in an editor, which analyzes the model on every change
Enclosing class:
ModelFiles

public static record ModelFiles.ImportOptions(List<String> roots, boolean publicOnly, Optional<String> base, boolean readUrls) extends Record
The restrictions of the imports, which only the command line gives, as the web tools give them to the compiler:
  • Field Details

  • Constructor Details

    • ImportOptions

      public ImportOptions(List<String> roots, boolean publicOnly, Optional<String> base, boolean readUrls)
      Creates an instance of a ImportOptions record class.
      Parameters:
      roots - the value for the roots record component
      publicOnly - the value for the publicOnly record component
      base - the value for the base record component
      readUrls - the value for the readUrls record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • roots

      public List<String> roots()
      Returns the value of the roots record component.
      Returns:
      the value of the roots record component
    • publicOnly

      public boolean publicOnly()
      Returns the value of the publicOnly record component.
      Returns:
      the value of the publicOnly record component
    • base

      public Optional<String> base()
      Returns the value of the base record component.
      Returns:
      the value of the base record component
    • readUrls

      public boolean readUrls()
      Returns the value of the readUrls record component.
      Returns:
      the value of the readUrls record component