Class CBTypeDeclarationVariant
java.lang.Object
com.io7m.cedarbridge.schema.compiled.internal.CBTypeDeclarationVariant
- All Implemented Interfaces:
CBTypeDeclarationType, CBVariantType
A variant type declaration.
-
Constructor Summary
ConstructorsConstructorDescriptionCBTypeDeclarationVariant(String inName) Construct a variant type declaration. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddCase(CBVariantCase caseV) Add a variant case.voidaddTypeParameter(CBTypeParameter parameter) Add a type parameter.cases()external()name()owner()voidsetDocumentation(List<String> text) Set the documentation.voidsetExternalName(String newExternalPackage, String newExternalName) Set the external name.voidSet the owner.Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface CBTypeDeclarationType
arity, idForType, parametersByNameMethods inherited from interface CBVariantType
casesByName, id
-
Constructor Details
-
CBTypeDeclarationVariant
Construct a variant type declaration.- Parameters:
inName- The type name
-
-
Method Details
-
addTypeParameter
Add a type parameter.- Parameters:
parameter- The parameter
-
addCase
-
setExternalName
-
cases
- Specified by:
casesin interfaceCBVariantType- Returns:
- The cases of the variant type in declaration order
-
owner
- Specified by:
ownerin interfaceCBTypeDeclarationType- Returns:
- The package that owns this declaration
-
name
- Specified by:
namein interfaceCBTypeDeclarationType- Returns:
- The package-unique declaration name
-
parameters
- Specified by:
parametersin interfaceCBTypeDeclarationType- Returns:
- The type parameters, if any, in declaration order
-
external
- Specified by:
externalin interfaceCBTypeDeclarationType- Returns:
- The external name, if any
-
documentation
- Specified by:
documentationin interfaceCBTypeDeclarationType- Returns:
- Documentation for the type declaration
-
setOwner
-
setDocumentation
-