Class Files.UnknownFile

java.lang.Object
net.hydromatic.morel.eval.Files.AbstractFile
net.hydromatic.morel.eval.Files.UnknownFile
All Implemented Interfaces:
File, TypedValue
Direct Known Subclasses:
Files.UnknownChildFile
Enclosing class:
Files

private static class Files.UnknownFile extends Files.AbstractFile
File that we have not yet categorized. We don't know whether it is a directory.

Its type is an empty record type (because we don't know the files in the directory, or the fields of the data file).

  • Field Details

    • PROGRESSIVE_UNIT

      static final Type.Key PROGRESSIVE_UNIT
      Key for the type "{...}", the progressive record with no (as yet known) fields.
    • PROGRESSIVE_UNIT_LIST

      static final Type.Key PROGRESSIVE_UNIT_LIST
      Key for the type "{...} list", the list of progressive records with no (as yet known) fields.
  • Constructor Details

  • Method Details

    • valueAs

      public <V> V valueAs(Class<V> clazz)
      Description copied from interface: TypedValue
      Returns the value cast as a particular type.
    • typeKey

      public Type.Key typeKey()
      Description copied from interface: TypedValue
      Key from which the type of this value can be constructed.
    • expand

      public File expand()
      Description copied from interface: File
      Expands this file to a file with a more precise type.

      During expansion, record types may get new fields, never lose them.

      This file object may or may not be mutable. If this file is immutable and is expanded, returns the new file. If this file is mutable, returns this file regardless of whether expansion occurred; the caller cannot discern whether expansion occurred.

    • discoverField

      public File discoverField(TypeSystem typeSystem, String fieldName)
      Description copied from interface: TypedValue
      Tries to expand the type to include the given field name.

      Returns this value or an expanded value.