Class Flag
- java.lang.Object
-
- de.haumacher.msgbuf.data.AbstractDataObject
-
- de.haumacher.msgbuf.generator.ast.Option
-
- de.haumacher.msgbuf.generator.ast.Flag
-
- All Implemented Interfaces:
DataObject,ReflectiveDataObject,Observable
public class Flag extends Option
Optionannotating a boolean 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 StringFLAG__TYPEIdentifier for theFlagtype in JSON format.static StringVALUE__PROP
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Flagcreate()Creates aFlaginstance.Objectget(String field)protected voidinternalSetValue(boolean value)Internal setter forisValue()without chain call utility.booleanisValue()The boolean value assigned to the option.StringjsonType()Option.TypeKindkind()The type code of this instance.List<String>properties()protected voidreadField(JsonReader in, String field)static FlagreadFlag(JsonReader in)Reads a new instance from the given reader.voidset(String field, Object value)FlagsetValue(boolean 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
-
FLAG__TYPE
public static final String FLAG__TYPE
Identifier for theFlagtype in JSON format.- See Also:
- Constant Field Values
-
VALUE__PROP
public static final String VALUE__PROP
- See Also:
isValue(), Constant Field Values
-
-
Method Detail
-
kind
public Option.TypeKind kind()
Description copied from class:OptionThe type code of this instance.
-
isValue
public final boolean isValue()
The boolean value assigned to the option.
-
internalSetValue
protected final void internalSetValue(boolean value)
Internal setter forisValue()without chain call utility.
-
jsonType
public String jsonType()
-
readFlag
public static Flag readFlag(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.
-
-