Class EnumDef
java.lang.Object
de.haumacher.msgbuf.data.AbstractDataObject
de.haumacher.msgbuf.generator.ast.WithOptions
de.haumacher.msgbuf.generator.ast.DefinitionBase
de.haumacher.msgbuf.generator.ast.Definition
de.haumacher.msgbuf.generator.ast.EnumDef
- All Implemented Interfaces:
DataObject,ReflectiveDataObject,Observable
Definition of an enumeration.-
Nested Class Summary
Nested classes/interfaces inherited from class de.haumacher.msgbuf.generator.ast.Definition
Definition.Visitor<R,A> Nested classes/interfaces inherited from class de.haumacher.msgbuf.generator.ast.WithOptions
WithOptions.TypeKind -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final StringIdentifier for theEnumDeftype in JSON format.Fields inherited from class de.haumacher.msgbuf.generator.ast.Definition
FILE__PROP, NAME__PROP, OUTER__PROPFields inherited from class de.haumacher.msgbuf.generator.ast.DefinitionBase
COMMENT__PROPFields inherited from class de.haumacher.msgbuf.generator.ast.WithOptions
_listener, OPTIONS__PROP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddConstant(Constant value) Adds a value to thegetConstants()list.static EnumDefcreate()Creates aEnumDefinstance.All enum constants of this enumerationprotected final voidinternalAddConstant(Constant value) Implementation ofaddConstant(de.haumacher.msgbuf.generator.ast.Constant)without chain call utility.protected final voidinternalSetConstants(List<? extends Constant> value) Internal setter forgetConstants()without chain call utility.jsonType()kind()The type code of this instance.Adds a key value pair to theWithOptions.getOptions()map.static EnumDefReads a new instance from the given reader.protected voidreadField(JsonReader in, String field) final voidremoveConstant(Constant value) Removes a value from thegetConstants()list.voidsetComment(String value) setConstants(List<? extends Constant> value) setFile(DefinitionFile value) setOptions(Map<String, Option> value) setOuter(MessageDef value) <R,A> R visit(Definition.Visitor<R, A> v, A arg) Accepts the given visitor.protected voidwriteFields(JsonWriter out) Methods inherited from class de.haumacher.msgbuf.generator.ast.Definition
getFile, getName, getOuter, hasFile, hasOuter, internalSetFile, internalSetName, internalSetOuter, readDefinition, visitMethods inherited from class de.haumacher.msgbuf.generator.ast.DefinitionBase
getComment, internalSetComment, readDefinitionBase, visitMethods inherited from class de.haumacher.msgbuf.generator.ast.WithOptions
getOptions, internalPutOption, internalRegisterListener, internalSetOptions, internalUnregisterListener, readWithOptions, registerListener, removeOption, unregisterListener, writeToMethods inherited from class de.haumacher.msgbuf.data.AbstractDataObject
readContent, readFields, toString, writeContent
-
Field Details
-
ENUM_DEF__TYPE
Identifier for theEnumDeftype in JSON format.- See Also:
-
CONSTANTS__PROP
- See Also:
-
-
Constructor Details
-
Method Details
-
create
Creates aEnumDefinstance. -
kind
Description copied from class:WithOptionsThe type code of this instance.- Specified by:
kindin classWithOptions
-
getConstants
All enum constants of this enumeration -
setConstants
- See Also:
-
internalSetConstants
Internal setter forgetConstants()without chain call utility. -
addConstant
Adds a value to thegetConstants()list. -
internalAddConstant
Implementation ofaddConstant(de.haumacher.msgbuf.generator.ast.Constant)without chain call utility. -
removeConstant
Removes a value from thegetConstants()list. -
setName
- Overrides:
setNamein classDefinition- See Also:
-
setFile
- Overrides:
setFilein classDefinition- See Also:
-
setOuter
- Overrides:
setOuterin classDefinition- See Also:
-
setComment
- Overrides:
setCommentin classDefinition- See Also:
-
setOptions
- Overrides:
setOptionsin classDefinition- See Also:
-
putOption
Description copied from class:WithOptionsAdds a key value pair to theWithOptions.getOptions()map.- Overrides:
putOptionin classDefinition
-
jsonType
-
properties
- Specified by:
propertiesin interfaceReflectiveDataObject- Overrides:
propertiesin classDefinition
-
get
- Specified by:
getin interfaceReflectiveDataObject- Overrides:
getin classDefinition
-
set
- Specified by:
setin interfaceReflectiveDataObject- Overrides:
setin classDefinition
-
readEnumDef
Reads a new instance from the given reader.- Throws:
IOException
-
writeFields
- Overrides:
writeFieldsin classDefinition- Throws:
IOException
-
readField
- Overrides:
readFieldin classDefinition- Throws:
IOException
-
visit
Description copied from class:DefinitionAccepts the given visitor.- Specified by:
visitin classDefinition
-