Class Option
- java.lang.Object
-
- de.haumacher.msgbuf.data.AbstractDataObject
-
- de.haumacher.msgbuf.generator.ast.Option
-
- All Implemented Interfaces:
de.haumacher.msgbuf.data.DataObject,de.haumacher.msgbuf.data.ReflectiveDataObject,de.haumacher.msgbuf.observer.Observable
- Direct Known Subclasses:
Flag,NumberOption,StringOption
public abstract class Option extends de.haumacher.msgbuf.data.AbstractDataObject implements de.haumacher.msgbuf.observer.ObservableBase class for an option annotation.- See Also:
StringOption,NumberOption,Flag
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classOption.TypeKindType codes for theOptionhierarchy.static interfaceOption.Visitor<R,A>Visitor interface for theOptionhierarchy.
-
Field Summary
Fields Modifier and Type Field Description protected de.haumacher.msgbuf.observer.Listener_listener
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidinternalRegisterListener(de.haumacher.msgbuf.observer.Listener l)protected voidinternalUnregisterListener(de.haumacher.msgbuf.observer.Listener l)abstract Option.TypeKindkind()The type code of this instance.static OptionreadOption(de.haumacher.msgbuf.json.JsonReader in)Reads a new instance from the given reader.OptionregisterListener(de.haumacher.msgbuf.observer.Listener l)OptionunregisterListener(de.haumacher.msgbuf.observer.Listener l)abstract <R,A>
Rvisit(Option.Visitor<R,A> v, A arg)Accepts the given visitor.voidwriteTo(de.haumacher.msgbuf.json.JsonWriter out)-
Methods inherited from class de.haumacher.msgbuf.data.AbstractDataObject
readField, readFields, toString, writeContent, writeFields
-
-
-
-
Constructor Detail
-
Option
protected Option()
Creates aOptioninstance.
-
-
Method Detail
-
kind
public abstract Option.TypeKind kind()
The type code of this instance.
-
registerListener
public Option registerListener(de.haumacher.msgbuf.observer.Listener l)
- Specified by:
registerListenerin interfacede.haumacher.msgbuf.observer.Observable
-
internalRegisterListener
protected final void internalRegisterListener(de.haumacher.msgbuf.observer.Listener l)
-
unregisterListener
public Option unregisterListener(de.haumacher.msgbuf.observer.Listener l)
- Specified by:
unregisterListenerin interfacede.haumacher.msgbuf.observer.Observable
-
internalUnregisterListener
protected final void internalUnregisterListener(de.haumacher.msgbuf.observer.Listener l)
-
readOption
public static Option readOption(de.haumacher.msgbuf.json.JsonReader in) throws IOException
Reads a new instance from the given reader.- Throws:
IOException
-
writeTo
public final void writeTo(de.haumacher.msgbuf.json.JsonWriter out) throws IOException- Specified by:
writeToin interfacede.haumacher.msgbuf.data.DataObject- Throws:
IOException
-
visit
public abstract <R,A> R visit(Option.Visitor<R,A> v, A arg)
Accepts the given visitor.
-
-