Class DefinitionBase
java.lang.Object
de.haumacher.msgbuf.data.AbstractDataObject
de.haumacher.msgbuf.generator.ast.WithOptions
de.haumacher.msgbuf.generator.ast.DefinitionBase
- All Implemented Interfaces:
DataObject,ReflectiveDataObject,Observable
- Direct Known Subclasses:
Definition,Part
Base class for type and field definitions.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceVisitor interface for theDefinitionBasehierarchy.Nested classes/interfaces inherited from class de.haumacher.msgbuf.generator.ast.WithOptions
WithOptions.TypeKind -
Field Summary
FieldsFields inherited from class de.haumacher.msgbuf.generator.ast.WithOptions
_listener, OPTIONS__PROP -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal StringThe documentation comment for this definition.protected final voidinternalSetComment(String value) Internal setter forgetComment()without chain call utility.Adds a key value pair to theWithOptions.getOptions()map.static DefinitionBaseReads a new instance from the given reader.protected voidreadField(JsonReader in, String field) voidsetComment(String value) setOptions(Map<String, Option> value) abstract <R,A> R visit(DefinitionBase.Visitor<R, A> v, A arg) Accepts the given visitor.final <R,A> R visit(WithOptions.Visitor<R, A> v, A arg) Accepts the given visitor.protected voidwriteFields(JsonWriter out) Methods inherited from class de.haumacher.msgbuf.generator.ast.WithOptions
getOptions, internalPutOption, internalRegisterListener, internalSetOptions, internalUnregisterListener, kind, 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.data.ReflectiveDataObject
jsonType
-
Field Details
-
COMMENT__PROP
- See Also:
-
-
Constructor Details
-
DefinitionBase
protected DefinitionBase()Creates aDefinitionBaseinstance.
-
-
Method Details
-
getComment
The documentation comment for this definition. -
setComment
- See Also:
-
internalSetComment
Internal setter forgetComment()without chain call utility. -
setOptions
- Overrides:
setOptionsin classWithOptions- See Also:
-
putOption
Description copied from class:WithOptionsAdds a key value pair to theWithOptions.getOptions()map.- Overrides:
putOptionin classWithOptions
-
properties
- Specified by:
propertiesin interfaceReflectiveDataObject- Overrides:
propertiesin classWithOptions
-
get
- Specified by:
getin interfaceReflectiveDataObject- Overrides:
getin classWithOptions
-
set
- Specified by:
setin interfaceReflectiveDataObject- Overrides:
setin classWithOptions
-
readDefinitionBase
Reads a new instance from the given reader.- Throws:
IOException
-
writeFields
- Overrides:
writeFieldsin classWithOptions- Throws:
IOException
-
readField
- Overrides:
readFieldin classWithOptions- Throws:
IOException
-
visit
Accepts the given visitor. -
visit
Description copied from class:WithOptionsAccepts the given visitor.- Specified by:
visitin classWithOptions
-