Class Type
- java.lang.Object
-
- de.haumacher.msgbuf.data.AbstractDataObject
-
- de.haumacher.msgbuf.generator.ast.Type
-
- All Implemented Interfaces:
DataObject,ReflectiveDataObject,Observable
- Direct Known Subclasses:
CustomType,MapType,PrimitiveType
public abstract class Type extends AbstractDataObject implements Observable
Base class for possibleFieldtypes.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classType.TypeKindType codes for theTypehierarchy.static interfaceType.Visitor<R,A>Visitor interface for theTypehierarchy.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidinternalRegisterListener(Listener l)protected voidinternalUnregisterListener(Listener l)abstract Type.TypeKindkind()The type code of this instance.static TypereadType(JsonReader in)Reads a new instance from the given reader.TyperegisterListener(Listener l)TypeunregisterListener(Listener l)abstract <R,A>
Rvisit(Type.Visitor<R,A> v, A arg)Accepts the given visitor.voidwriteTo(JsonWriter out)-
Methods inherited from class de.haumacher.msgbuf.data.AbstractDataObject
readContent, readField, readFields, toString, writeContent, writeFields
-
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
get, jsonType, properties, set, transientProperties
-
-
-
-
Field Detail
-
_listener
protected Listener _listener
-
-
Constructor Detail
-
Type
protected Type()
Creates aTypeinstance.
-
-
Method Detail
-
kind
public abstract Type.TypeKind kind()
The type code of this instance.
-
registerListener
public Type registerListener(Listener l)
- Specified by:
registerListenerin interfaceObservable
-
internalRegisterListener
protected final void internalRegisterListener(Listener l)
-
unregisterListener
public Type unregisterListener(Listener l)
- Specified by:
unregisterListenerin interfaceObservable
-
internalUnregisterListener
protected final void internalUnregisterListener(Listener l)
-
readType
public static Type readType(JsonReader in) throws IOException
Reads a new instance from the given reader.- Throws:
IOException
-
writeTo
public final void writeTo(JsonWriter out) throws IOException
- Specified by:
writeToin interfaceDataObject- Throws:
IOException
-
visit
public abstract <R,A> R visit(Type.Visitor<R,A> v, A arg)
Accepts the given visitor.
-
-