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 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.io7m.cedarbridge.schema.compiled.CBTypeDeclarationType
arity, idForType, parametersByNameMethods inherited from interface com.io7m.cedarbridge.schema.compiled.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
Add a variant case.- Parameters:
caseV- The case
-
setExternalName
Set the external name.- Parameters:
newExternalPackage- The external packagenewExternalName- The external name
-
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
Set the owner.- Parameters:
newOwner- The new owner
-
setDocumentation
Set the documentation.- Parameters:
text- The text
-