Class CBVariantCase
java.lang.Object
com.io7m.cedarbridge.schema.compiled.internal.CBVariantCase
- All Implemented Interfaces:
CBFieldOwnerType,CBVariantCaseType
A variant case.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a field to the case.fields()name()owner()voidsetDocumentation(List<String> text) Set the documentation for the case.voidsetOwner(CBTypeDeclarationVariant newOwner) Set the owner of the variant case.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.CBFieldOwnerType
fieldsByName
-
Constructor Details
-
CBVariantCase
Construct a case.- Parameters:
inName- The case name
-
-
Method Details
-
addField
Add a field to the case.- Parameters:
field- The field
-
fields
- Specified by:
fieldsin interfaceCBFieldOwnerType- Returns:
- The fields of the record in declaration order
-
owner
- Specified by:
ownerin interfaceCBVariantCaseType- Returns:
- The type within which this case is declared
-
name
- Specified by:
namein interfaceCBVariantCaseType- Returns:
- The name of the variant case
-
documentation
- Specified by:
documentationin interfaceCBVariantCaseType- Returns:
- The documentation for the case
-
setOwner
Set the owner of the variant case.- Parameters:
newOwner- The owner
-
setDocumentation
Set the documentation for the case.- Parameters:
text- The documentation
-