public final class ChoiceType extends CompoundType
| Constructor and Description |
|---|
ChoiceType(AstLocation location,
Package pkg,
java.lang.String name,
java.util.List<TemplateParameter> templateParameters,
java.util.List<Parameter> typeParameters,
Expression selectorExpression,
java.util.List<ChoiceCase> choiceCases,
ChoiceDefault choiceDefault,
java.util.List<Function> functions,
java.util.List<DocComment> docComments)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(ZserioAstVisitor visitor)
Accept zserio visitor.
|
java.util.List<ChoiceCase> |
getChoiceCases()
Gets list of choice cases defined by the choice.
|
ChoiceDefault |
getChoiceDefault()
Gets default case defined by the choice.
|
java.lang.String |
getInstantiationName()
Gets the unique instantiation name.
|
java.util.ArrayDeque<TypeReference> |
getInstantiationReferenceStack()
Gets stack of instantiations leading to this instantiation.
|
java.util.List<ZserioTemplatableType> |
getInstantiations()
Gets all template's instantiations.
|
java.util.ArrayDeque<TypeReference> |
getReversedInstantiationReferenceStack()
Gets reversed stack of instantiations leading to this instantiation.
|
Expression |
getSelectorExpression()
Gets selector expression.
|
ZserioTemplatableType |
getTemplate()
Gets original template used for instantiation.
|
java.util.List<TemplateParameter> |
getTemplateParameters()
Gets list of template parameters.
|
protected boolean |
hasBranchWithoutImplicitArray() |
protected boolean |
hasEmptyBranch(boolean implicitCanBeEmpty) |
boolean |
isChoiceDefaultUnreachable()
Checks if default case in choice can happen.
|
void |
visitChildren(ZserioAstVisitor visitor)
Visit children of the current AST node using given visitor.
|
checkNonSqlTableFields, checkSqlSymbolNames, checkSqlTableFields, checkSymbolNames, containsExtendedField, getFields, getFunctions, getName, getPackage, getScope, getTypeParameters, hasFieldBranchWithoutImplicitArray, hasFieldEmptyBranch, hasPackableField, isPackable, needsChildrenInitialization, trackExtendedField, trackImplicitArraygetDocCommentsgetLocationclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetLocationpublic ChoiceType(AstLocation location, Package pkg, java.lang.String name, java.util.List<TemplateParameter> templateParameters, java.util.List<Parameter> typeParameters, Expression selectorExpression, java.util.List<ChoiceCase> choiceCases, ChoiceDefault choiceDefault, java.util.List<Function> functions, java.util.List<DocComment> docComments)
location - AST node location.pkg - Package to which belongs the choice type.name - Name of the choice type.templateParameters - List of template parameters.typeParameters - List of parameters for the choice type.selectorExpression - Selector expression of the choice type.choiceCases - List of all choice cases.choiceDefault - Choice default case or null if default case is not defined.functions - List of all functions of the choice type.docComments - List of documentation comments belonging to this node.public void accept(ZserioAstVisitor visitor)
AstNodevisitor - Visitor to accept.public void visitChildren(ZserioAstVisitor visitor)
AstNodevisitChildren in interface AstNodevisitChildren in class CompoundTypevisitor - Visitor to use.public Expression getSelectorExpression()
public java.util.List<ChoiceCase> getChoiceCases()
public ChoiceDefault getChoiceDefault()
public boolean isChoiceDefaultUnreachable()
protected boolean hasBranchWithoutImplicitArray()
hasBranchWithoutImplicitArray in class CompoundTypeprotected boolean hasEmptyBranch(boolean implicitCanBeEmpty)
hasEmptyBranch in class CompoundTypepublic java.util.List<TemplateParameter> getTemplateParameters()
ZserioTemplatableTypegetTemplateParameters in interface ZserioTemplatableTypepublic java.util.List<ZserioTemplatableType> getInstantiations()
ZserioTemplatableTypegetInstantiations in interface ZserioTemplatableTypepublic ZserioTemplatableType getTemplate()
ZserioTemplatableTypegetTemplate in interface ZserioTemplatableTypepublic java.util.ArrayDeque<TypeReference> getInstantiationReferenceStack()
ZserioTemplatableTypegetInstantiationReferenceStack in interface ZserioTemplatableTypepublic java.util.ArrayDeque<TypeReference> getReversedInstantiationReferenceStack()
ZserioTemplatableTypegetReversedInstantiationReferenceStack in interface ZserioTemplatableTypepublic java.lang.String getInstantiationName()
ZserioTemplatableTypegetInstantiationName in interface ZserioTemplatableTypeLast updated 2024-10-29 12:56:13