Class MessageDef
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.MessageDef
- All Implemented Interfaces:
DataObject,ReflectiveDataObject,MessageDefOperations,Observable
Definition of a data class.-
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 Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringIdentifier for theMessageDeftype in JSON format.static final StringFields 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 TypeMethodDescriptionaddDefinition(Definition value) Adds a value to thegetDefinitions()list.Adds a value to thegetFields()list.addSpecialization(MessageDef value) Adds a value to thegetSpecializations()list.static MessageDefcreate()Creates aMessageDefinstance.final List<Definition>OhterDefinitions that are local to this data class.final MessageDefReference to thedata class definitionthat is referenced by thegetExtends()clause.final QNameOptional reference to anotherMessageDefwhoes fields are inherited.AllFields locally defined in this data class.final intgetId()The ID used for distinguishing an instance of this type from instances of other types in the same polymorphic hierarchy.final List<MessageDef>Alldata classesthat inherit from this data class.final booleanChecks, whethergetExtendedDef()has a value.final booleanChecks, whethergetExtends()has a value.protected final voidinternalAddDefinition(Definition value) Implementation ofaddDefinition(de.haumacher.msgbuf.generator.ast.Definition)without chain call utility.protected final voidinternalAddField(Field value) Implementation ofaddField(de.haumacher.msgbuf.generator.ast.Field)without chain call utility.protected final voidImplementation ofaddSpecialization(de.haumacher.msgbuf.generator.ast.MessageDef)without chain call utility.protected final voidinternalSetAbstract(boolean value) Internal setter forisAbstract()without chain call utility.protected final voidinternalSetDefinitions(List<? extends Definition> value) Internal setter forgetDefinitions()without chain call utility.protected final voidinternalSetExtendedDef(MessageDef value) Internal setter forgetExtendedDef()without chain call utility.protected final voidinternalSetExtends(QName value) Internal setter forgetExtends()without chain call utility.protected final voidinternalSetFields(List<? extends Field> value) Internal setter forgetFields()without chain call utility.protected final voidinternalSetId(int value) Internal setter forgetId()without chain call utility.protected final voidinternalSetSpecializations(List<? extends MessageDef> value) Internal setter forgetSpecializations()without chain call utility.final booleanWhether this class only serves as super type for other data classes.jsonType()kind()The type code of this instance.Adds a key value pair to theWithOptions.getOptions()map.protected voidreadField(JsonReader in, String field) static MessageDefReads a new instance from the given reader.final voidremoveDefinition(Definition value) Removes a value from thegetDefinitions()list.final voidremoveField(Field value) Removes a value from thegetFields()list.final voidremoveSpecialization(MessageDef value) Removes a value from thegetSpecializations()list.self()voidsetAbstract(boolean value) setComment(String value) setDefinitions(List<? extends Definition> value) setExtendedDef(MessageDef value) setExtends(QName value) setFile(DefinitionFile value) setId(int value) setOptions(Map<String, Option> value) setOuter(MessageDef value) setSpecializations(List<? extends 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, writeContentMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface de.haumacher.msgbuf.generator.MessageDefOperations
container
-
Field Details
-
MESSAGE_DEF__TYPE
Identifier for theMessageDeftype in JSON format.- See Also:
-
ABSTRACT__PROP
- See Also:
-
EXTENDS__PROP
- See Also:
-
DEFINITIONS__PROP
- See Also:
-
FIELDS__PROP
- See Also:
-
SPECIALIZATIONS__PROP
- See Also:
-
EXTENDED_DEF__PROP
- See Also:
-
ID__PROP
- See Also:
-
-
Constructor Details
-
MessageDef
protected MessageDef()Creates aMessageDefinstance.- See Also:
-
-
Method Details
-
create
Creates aMessageDefinstance. -
kind
Description copied from class:WithOptionsThe type code of this instance.- Specified by:
kindin classWithOptions
-
isAbstract
public final boolean isAbstract()Whether this class only serves as super type for other data classes. -
setAbstract
- See Also:
-
internalSetAbstract
protected final void internalSetAbstract(boolean value) Internal setter forisAbstract()without chain call utility. -
getExtends
Optional reference to anotherMessageDefwhoes fields are inherited. -
setExtends
- See Also:
-
internalSetExtends
Internal setter forgetExtends()without chain call utility. -
hasExtends
public final boolean hasExtends()Checks, whethergetExtends()has a value. -
getDefinitions
OhterDefinitions that are local to this data class. -
setDefinitions
- See Also:
-
internalSetDefinitions
Internal setter forgetDefinitions()without chain call utility. -
addDefinition
Adds a value to thegetDefinitions()list. -
internalAddDefinition
Implementation ofaddDefinition(de.haumacher.msgbuf.generator.ast.Definition)without chain call utility. -
removeDefinition
Removes a value from thegetDefinitions()list. -
getFields
AllFields locally defined in this data class.This list does not contain
Fields that areinheritedfrom other data classes.- See Also:
-
setFields
- See Also:
-
internalSetFields
Internal setter forgetFields()without chain call utility. -
addField
Adds a value to thegetFields()list. -
internalAddField
Implementation ofaddField(de.haumacher.msgbuf.generator.ast.Field)without chain call utility. -
removeField
Removes a value from thegetFields()list. -
getSpecializations
Alldata classesthat inherit from this data class. -
setSpecializations
- See Also:
-
internalSetSpecializations
Internal setter forgetSpecializations()without chain call utility. -
addSpecialization
Adds a value to thegetSpecializations()list. -
internalAddSpecialization
Implementation ofaddSpecialization(de.haumacher.msgbuf.generator.ast.MessageDef)without chain call utility. -
removeSpecialization
Removes a value from thegetSpecializations()list. -
getExtendedDef
Reference to thedata class definitionthat is referenced by thegetExtends()clause. -
setExtendedDef
- See Also:
-
internalSetExtendedDef
Internal setter forgetExtendedDef()without chain call utility. -
hasExtendedDef
public final boolean hasExtendedDef()Checks, whethergetExtendedDef()has a value. -
getId
public final int getId()The ID used for distinguishing an instance of this type from instances of other types in the same polymorphic hierarchy. -
setId
- See Also:
-
internalSetId
protected final void internalSetId(int value) Internal setter forgetId()without chain call utility. -
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
- Specified by:
jsonTypein interfaceReflectiveDataObject
-
properties
- Specified by:
propertiesin interfaceReflectiveDataObject- Overrides:
propertiesin classDefinition
-
get
- Specified by:
getin interfaceReflectiveDataObject- Overrides:
getin classDefinition
-
set
- Specified by:
setin interfaceReflectiveDataObject- Overrides:
setin classDefinition
-
readMessageDef
Reads a new instance from the given reader.- Throws:
IOException
-
writeFields
- Overrides:
writeFieldsin classDefinition- Throws:
IOException
-
readField
- Overrides:
readFieldin classDefinition- Throws:
IOException
-
self
- Specified by:
selfin interfaceMessageDefOperations
-
visit
Description copied from class:DefinitionAccepts the given visitor.- Specified by:
visitin classDefinition
-