Class StringOption
- java.lang.Object
-
- de.haumacher.msgbuf.data.AbstractDataObject
-
- de.haumacher.msgbuf.generator.ast.Option
-
- de.haumacher.msgbuf.generator.ast.StringOption
-
- All Implemented Interfaces:
DataObject,ReflectiveDataObject,Observable
public class StringOption extends Option
Optionannotating a string value
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.haumacher.msgbuf.generator.ast.Option
Option.TypeKind, Option.Visitor<R,A>
-
-
Field Summary
Fields Modifier and Type Field Description static StringSTRING_OPTION__TYPEIdentifier for theStringOptiontype in JSON format.static StringVALUE__PROP
-
Constructor Summary
Constructors Modifier Constructor Description protectedStringOption()Creates aStringOptioninstance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static StringOptioncreate()Creates aStringOptioninstance.Objectget(String field)StringgetValue()The string value assigned to the option.protected voidinternalSetValue(String value)Internal setter forgetValue()without chain call utility.StringjsonType()Option.TypeKindkind()The type code of this instance.List<String>properties()protected voidreadField(JsonReader in, String field)static StringOptionreadStringOption(JsonReader in)Reads a new instance from the given reader.voidset(String field, Object value)StringOptionsetValue(String value)<R,A>
Rvisit(Option.Visitor<R,A> v, A arg)Accepts the given visitor.protected voidwriteFields(JsonWriter out)-
Methods inherited from class de.haumacher.msgbuf.generator.ast.Option
internalRegisterListener, internalUnregisterListener, readOption, registerListener, unregisterListener, writeTo
-
Methods inherited from class de.haumacher.msgbuf.data.AbstractDataObject
readContent, readFields, toString, writeContent
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface de.haumacher.msgbuf.data.ReflectiveDataObject
transientProperties
-
-
-
-
Field Detail
-
STRING_OPTION__TYPE
public static final String STRING_OPTION__TYPE
Identifier for theStringOptiontype in JSON format.- See Also:
- Constant Field Values
-
VALUE__PROP
public static final String VALUE__PROP
- See Also:
getValue(), Constant Field Values
-
-
Constructor Detail
-
StringOption
protected StringOption()
Creates aStringOptioninstance.- See Also:
create()
-
-
Method Detail
-
create
public static StringOption create()
Creates aStringOptioninstance.
-
kind
public Option.TypeKind kind()
Description copied from class:OptionThe type code of this instance.
-
getValue
public final String getValue()
The string value assigned to the option.
-
setValue
public StringOption setValue(String value)
- See Also:
getValue()
-
internalSetValue
protected final void internalSetValue(String value)
Internal setter forgetValue()without chain call utility.
-
jsonType
public String jsonType()
-
readStringOption
public static StringOption readStringOption(JsonReader in) throws IOException
Reads a new instance from the given reader.- Throws:
IOException
-
writeFields
protected void writeFields(JsonWriter out) throws IOException
- Overrides:
writeFieldsin classAbstractDataObject- Throws:
IOException
-
readField
protected void readField(JsonReader in, String field) throws IOException
- Overrides:
readFieldin classAbstractDataObject- Throws:
IOException
-
visit
public <R,A> R visit(Option.Visitor<R,A> v, A arg)
Description copied from class:OptionAccepts the given visitor.
-
-