Package net.hydromatic.morel.type
Class DataType
- java.lang.Object
-
- net.hydromatic.morel.type.BaseType
-
- net.hydromatic.morel.type.DataType
-
-
Field Summary
Fields Modifier and Type Field Description java.lang.Stringnamejava.util.SortedMap<java.lang.String,Type>typeConstructorsjava.util.List<TypeVar>typeVars-
Fields inherited from class net.hydromatic.morel.type.BaseType
description, op
-
-
Constructor Summary
Constructors Constructor Description DataType(TypeSystem typeSystem, java.lang.String name, java.lang.String description, java.util.List<TypeVar> typeVars, java.util.SortedMap<java.lang.String,Type> typeConstructors)Creates a DataType.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <R> Raccept(TypeVisitor<R> typeVisitor)(package private) static java.lang.StringcomputeDescription(java.util.Map<java.lang.String,Type> tyCons)Typecopy(TypeSystem typeSystem, java.util.function.Function<Type,Type> transform)Copies this type, applying a given transform to component types, and returning the original type if the component types are unchanged.private com.google.common.collect.ImmutableSortedMap<java.lang.String,Type>copyTypes(TypeSystem typeSystem, java.util.SortedMap<java.lang.String,Type> typeConstructors, java.util.function.Function<Type,Type> transform)java.lang.Stringname()Name of the type.-
Methods inherited from class net.hydromatic.morel.type.BaseType
description, op
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.hydromatic.morel.type.Type
description, op
-
-
-
-
Constructor Detail
-
DataType
DataType(TypeSystem typeSystem, java.lang.String name, java.lang.String description, java.util.List<TypeVar> typeVars, java.util.SortedMap<java.lang.String,Type> typeConstructors)
Creates a DataType.Called only from
TypeSystem.dataType(String, List, Map). If thetypeSystemargument is specified, canonizes the types inside type-constructors. This also allows temporary types (necessary while creating self-referential data types) to be replaced with real DataType instances.
-
-
Method Detail
-
copyTypes
private com.google.common.collect.ImmutableSortedMap<java.lang.String,Type> copyTypes(@Nonnull TypeSystem typeSystem, @Nonnull java.util.SortedMap<java.lang.String,Type> typeConstructors, @Nonnull java.util.function.Function<Type,Type> transform)
-
accept
public <R> R accept(TypeVisitor<R> typeVisitor)
-
copy
public Type copy(TypeSystem typeSystem, java.util.function.Function<Type,Type> transform)
Description copied from interface:TypeCopies this type, applying a given transform to component types, and returning the original type if the component types are unchanged.
-
name
public java.lang.String name()
Description copied from interface:NamedTypeName of the type.
-
computeDescription
static java.lang.String computeDescription(java.util.Map<java.lang.String,Type> tyCons)
-
-