Class WithOptions
java.lang.Object
de.haumacher.msgbuf.data.AbstractDataObject
de.haumacher.msgbuf.generator.ast.WithOptions
- All Implemented Interfaces:
DataObject,ReflectiveDataObject,Observable
- Direct Known Subclasses:
DefinitionBase,DefinitionFile,OptionContainer
Base class for object that can be annotated.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumType codes for theWithOptionshierarchy.static interfaceVisitor interface for theWithOptionshierarchy. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionAnnotations to this definition.protected final voidinternalPutOption(String key, Option value) Implementation ofputOption(String, de.haumacher.msgbuf.generator.ast.Option)without chain call utility.protected final voidprotected final voidinternalSetOptions(Map<String, Option> value) Internal setter forgetOptions()without chain call utility.protected final voidabstract WithOptions.TypeKindkind()The type code of this instance.Adds a key value pair to thegetOptions()map.protected voidreadField(JsonReader in, String field) static WithOptionsReads a new instance from the given reader.final voidremoveOption(String key) Removes a key from thegetOptions()map.voidsetOptions(Map<String, Option> value) abstract <R,A> R visit(WithOptions.Visitor<R, A> v, A arg) Accepts the given visitor.protected voidwriteFields(JsonWriter out) final voidwriteTo(JsonWriter out) Methods 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
-
OPTIONS__PROP
- See Also:
-
_listener
-
-
Constructor Details
-
WithOptions
protected WithOptions()Creates aWithOptionsinstance.
-
-
Method Details
-
kind
The type code of this instance. -
getOptions
Annotations to this definition. -
setOptions
- See Also:
-
internalSetOptions
Internal setter forgetOptions()without chain call utility. -
putOption
Adds a key value pair to thegetOptions()map. -
internalPutOption
Implementation ofputOption(String, de.haumacher.msgbuf.generator.ast.Option)without chain call utility. -
removeOption
Removes a key from thegetOptions()map. -
registerListener
- Specified by:
registerListenerin interfaceObservable
-
internalRegisterListener
-
unregisterListener
- Specified by:
unregisterListenerin interfaceObservable
-
internalUnregisterListener
-
properties
- Specified by:
propertiesin interfaceReflectiveDataObject
-
get
- Specified by:
getin interfaceReflectiveDataObject
-
set
- Specified by:
setin interfaceReflectiveDataObject
-
readWithOptions
Reads a new instance from the given reader.- Throws:
IOException
-
writeTo
- Specified by:
writeToin interfaceDataObject- Throws:
IOException
-
writeFields
- Overrides:
writeFieldsin classAbstractDataObject- Throws:
IOException
-
readField
- Overrides:
readFieldin classAbstractDataObject- Throws:
IOException
-
visit
Accepts the given visitor.
-