Class StringOption
- java.lang.Object
-
- de.haumacher.msgbuf.data.AbstractDataObject
-
- de.haumacher.msgbuf.generator.ast.Option
-
- de.haumacher.msgbuf.generator.ast.StringOption
-
-
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
-
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(de.haumacher.msgbuf.json.JsonReader in, String field)static StringOptionreadStringOption(de.haumacher.msgbuf.json.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(de.haumacher.msgbuf.json.JsonWriter out)-
Methods inherited from class de.haumacher.msgbuf.generator.ast.Option
internalRegisterListener, internalUnregisterListener, readOption, registerListener, unregisterListener, writeTo
-
-
-
-
Field Detail
-
STRING_OPTION__TYPE
public static final String STRING_OPTION__TYPE
Identifier for theStringOptiontype in JSON format.- See Also:
- Constant Field Values
-
VALUE
public static final String VALUE
- 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(de.haumacher.msgbuf.json.JsonReader in) throws IOException
Reads a new instance from the given reader.- Throws:
IOException
-
writeFields
protected void writeFields(de.haumacher.msgbuf.json.JsonWriter out) throws IOException- Overrides:
writeFieldsin classde.haumacher.msgbuf.data.AbstractDataObject- Throws:
IOException
-
readField
protected void readField(de.haumacher.msgbuf.json.JsonReader in, String field) throws IOException- Overrides:
readFieldin classde.haumacher.msgbuf.data.AbstractDataObject- Throws:
IOException
-
visit
public <R,A> R visit(Option.Visitor<R,A> v, A arg)
Description copied from class:OptionAccepts the given visitor.
-
-