Package net.hydromatic.morel.eval
Interface File
- All Superinterfaces:
TypedValue
- All Known Implementing Classes:
Files.AbstractFile,Files.DataFile,Files.Directory,Files.UnknownChildFile,Files.UnknownFile
Directory in the file system.
Its type is progressive, so that it can discover new files and subdirectories.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptiondefault FilediscoverField(TypeSystem typeSystem, String fieldName) Tries to expand the type to include the given field name.default Fileexpand()Expands this file to a file with a more precise type.Methods inherited from interface net.hydromatic.morel.type.TypedValue
fieldValueAs, fieldValueAs, typeKey, valueAs
-
Method Details
-
expand
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
Description copied from interface:TypedValueTries to expand the type to include the given field name.Returns this value or an expanded value.
- Specified by:
discoverFieldin interfaceTypedValue
-