Class AntlrEnumeration
java.lang.Object
cool.klass.model.converter.compiler.state.AntlrElement
cool.klass.model.converter.compiler.state.AntlrOrdinalElement
cool.klass.model.converter.compiler.state.AntlrNamedElement
cool.klass.model.converter.compiler.state.AntlrIdentifierElement
cool.klass.model.converter.compiler.state.AntlrPackageableElement
cool.klass.model.converter.compiler.state.AntlrEnumeration
- All Implemented Interfaces:
AntlrTopLevelElement,AntlrType,IAntlrElement
public class AntlrEnumeration
extends AntlrPackageableElement
implements AntlrType, AntlrTopLevelElement
-
Field Summary
FieldsFields inherited from class cool.klass.model.converter.compiler.state.AntlrPackageableElement
compilationUnitStateFields inherited from class cool.klass.model.converter.compiler.state.AntlrIdentifierElement
AMBIGUOUS_IDENTIFIER_CONTEXT, NOT_FOUND_IDENTIFIER_CONTEXTFields inherited from class cool.klass.model.converter.compiler.state.AntlrNamedElement
CONSTANT_NAME_PATTERN, JAVA_KEYWORDS, JAVA_LITERALS, MEMBER_NAME_PATTERN, nameContext, PACKAGE_NAME_PATTERN, RELADOMO_TYPES, SQL_KEYWORDS, TYPE_NAME_PATTERNFields inherited from class cool.klass.model.converter.compiler.state.AntlrOrdinalElement
ordinalFields inherited from class cool.klass.model.converter.compiler.state.AntlrElement
AMBIGUOUS_PARENT, compilationUnit, elementContext, NOT_FOUND_PARENT -
Constructor Summary
ConstructorsConstructorDescriptionAntlrEnumeration(KlassParser.EnumerationDeclarationContext elementContext, AntlrCompilationUnit compilationUnitState, int ordinal, KlassParser.IdentifierContext nameContext) -
Method Summary
Modifier and TypeMethodDescriptionbuild()voidenterEnumerationLiteral(AntlrEnumerationLiteral enumerationLiteral) intvoidlogDuplicateLiteralNames(CompilerAnnotationHolder compilerAnnotationHolder) voidlogDuplicatePrettyNames(CompilerAnnotationHolder compilerAnnotationHolder) voidreportErrors(CompilerAnnotationHolder compilerAnnotationHolder) voidreportNameErrors(CompilerAnnotationHolder compilerAnnotationHolder) toString()Methods inherited from class cool.klass.model.converter.compiler.state.AntlrPackageableElement
getNamePattern, getPackageName, getSurroundingElementMethods inherited from class cool.klass.model.converter.compiler.state.AntlrIdentifierElement
getNameContextMethods inherited from class cool.klass.model.converter.compiler.state.AntlrNamedElement
getName, reportKeywordCollisionMethods inherited from class cool.klass.model.converter.compiler.state.AntlrOrdinalElement
getOrdinalMethods inherited from class cool.klass.model.converter.compiler.state.AntlrElement
getCompilationUnit, getMacroElement, getMacroElementBuilder, getSourceCodeBuilder, getSourceText, getSourceTextLenient, hasMacro, isForwardReference, isInSameCompilationUnitMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface cool.klass.model.converter.compiler.state.AntlrTopLevelElement
getContextAfter, getContextBefore, getName, getOrdinal, getSurroundingElement, isContext, reportDuplicateTopLevelNameMethods inherited from interface cool.klass.model.converter.compiler.state.AntlrType
getName, getPotentialWiderTypesMethods inherited from interface cool.klass.model.converter.compiler.state.IAntlrElement
gatherSurroundingElements, getCompilationUnit, getEntireContext, getMacroElement, getSurroundingElement, getSurroundingElements, reportAuditErrors
-
Field Details
-
AMBIGUOUS
-
NOT_FOUND
-
-
Constructor Details
-
AntlrEnumeration
public AntlrEnumeration(@Nonnull KlassParser.EnumerationDeclarationContext elementContext, @Nonnull AntlrCompilationUnit compilationUnitState, int ordinal, @Nonnull KlassParser.IdentifierContext nameContext)
-
-
Method Details
-
getNumLiterals
public int getNumLiterals() -
enterEnumerationLiteral
-
build
-
getElementContext
- Specified by:
getElementContextin interfaceIAntlrElement- Overrides:
getElementContextin classAntlrElement
-
getBlockContext
- Specified by:
getBlockContextin interfaceAntlrTopLevelElement- Returns:
- a context representing a block, where '{' and '}' are the start and stop tokens.
-
getElementBuilder
- Specified by:
getElementBuilderin interfaceAntlrTopLevelElement- Specified by:
getElementBuilderin interfaceAntlrType- Overrides:
getElementBuilderin classAntlrPackageableElement
-
reportNameErrors
- Specified by:
reportNameErrorsin interfaceAntlrTopLevelElement- Overrides:
reportNameErrorsin classAntlrNamedElement
-
reportErrors
- Specified by:
reportErrorsin interfaceAntlrTopLevelElement- Specified by:
reportErrorsin classAntlrPackageableElement
-
logDuplicateLiteralNames
-
logDuplicatePrettyNames
-
toString
- Overrides:
toStringin classAntlrNamedElement
-
getTypeGetter
- Specified by:
getTypeGetterin interfaceAntlrType
-