Package net.hydromatic.morel.compile
Enum TypeResolver.EmptyTypeEnv
- All Implemented Interfaces:
Serializable,Comparable<TypeResolver.EmptyTypeEnv>,java.lang.constant.Constable,TypeResolver.TypeEnv
- Enclosing class:
TypeResolver
static enum TypeResolver.EmptyTypeEnv
extends Enum<TypeResolver.EmptyTypeEnv>
implements TypeResolver.TypeEnv
Empty type environment.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget(TypeSystem typeSystem, String name, Function<String, RuntimeException> exceptionFactory) Returns a term for the variable with a given name, creating if necessary.@Nullable TypegetTypeOpt(String name) Returns the datatype of a variable, or null if no type is known.booleanReturns whether a variable of the given name is defined in this environment.toString()static TypeResolver.EmptyTypeEnvReturns the enum constant of this type with the specified name.static TypeResolver.EmptyTypeEnv[]values()Returns an array containing the constants of this enum type, in the order they are declared.Methods inherited from class java.lang.Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, valueOfMethods inherited from interface net.hydromatic.morel.compile.TypeResolver.TypeEnv
bind, bind, bind, collectInstances, count, getKind, hasOverloaded
-
Enum Constant Details
-
INSTANCE
-
-
Constructor Details
-
EmptyTypeEnv
private EmptyTypeEnv()
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
get
public Unifier.Term get(TypeSystem typeSystem, String name, Function<String, RuntimeException> exceptionFactory) Description copied from interface:TypeResolver.TypeEnvReturns a term for the variable with a given name, creating if necessary.- Specified by:
getin interfaceTypeResolver.TypeEnv
-
has
Description copied from interface:TypeResolver.TypeEnvReturns whether a variable of the given name is defined in this environment.- Specified by:
hasin interfaceTypeResolver.TypeEnv
-
getTypeOpt
Description copied from interface:TypeResolver.TypeEnvReturns the datatype of a variable, or null if no type is known.Generally, type is known for built-in values but not for values in this compilation unit.
- Specified by:
getTypeOptin interfaceTypeResolver.TypeEnv
-
toString
- Overrides:
toStringin classEnum<TypeResolver.EmptyTypeEnv>
-