Package net.hydromatic.morel.eval
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
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 Summary
FieldsModifier and TypeFieldDescription(package private) static final Type.KeyKey for the type "{...}", the progressive record with no (as yet known) fields.(package private) static final Type.KeyKey for the type "{...} list", the list of progressive records with no (as yet known) fields.Fields inherited from class net.hydromatic.morel.eval.Files.AbstractFile
baseName, fileType, ioFile -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondiscoverField(TypeSystem typeSystem, String fieldName) Tries to expand the type to include the given field name.expand()Expands this file to a file with a more precise type.typeKey()Key from which the type of this value can be constructed.<V> VReturns the value cast as a particular type.Methods inherited from class net.hydromatic.morel.eval.Files.AbstractFile
toStringMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface net.hydromatic.morel.type.TypedValue
fieldValueAs, fieldValueAs
-
Field Details
-
PROGRESSIVE_UNIT
Key for the type "{...}", the progressive record with no (as yet known) fields. -
PROGRESSIVE_UNIT_LIST
Key for the type "{...} list", the list of progressive records with no (as yet known) fields.
-
-
Constructor Details
-
UnknownFile
-
-
Method Details
-
valueAs
Description copied from interface:TypedValueReturns the value cast as a particular type. -
typeKey
Description copied from interface:TypedValueKey from which the type of this value can be constructed. -
expand
Description copied from interface:FileExpands 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
Description copied from interface:TypedValueTries to expand the type to include the given field name.Returns this value or an expanded value.
-