Class PrimitiveType
- java.lang.Object
-
- de.haumacher.msgbuf.data.AbstractDataObject
-
- de.haumacher.msgbuf.generator.ast.Type
-
- de.haumacher.msgbuf.generator.ast.PrimitiveType
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classPrimitiveType.KindSupported built-in types.-
Nested classes/interfaces inherited from class de.haumacher.msgbuf.generator.ast.Type
Type.TypeKind, Type.Visitor<R,A>
-
-
Field Summary
Fields Modifier and Type Field Description static StringKINDstatic StringPRIMITIVE_TYPE__TYPEIdentifier for thePrimitiveTypetype in JSON format.
-
Constructor Summary
Constructors Modifier Constructor Description protectedPrimitiveType()Creates aPrimitiveTypeinstance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static PrimitiveTypecreate()Creates aPrimitiveTypeinstance.Objectget(String field)PrimitiveType.KindgetKind()The type kind.protected voidinternalSetKind(PrimitiveType.Kind value)Internal setter forgetKind()without chain call utility.StringjsonType()Type.TypeKindkind()The type code of this instance.List<String>properties()protected voidreadField(de.haumacher.msgbuf.json.JsonReader in, String field)static PrimitiveTypereadPrimitiveType(de.haumacher.msgbuf.json.JsonReader in)Reads a new instance from the given reader.voidset(String field, Object value)PrimitiveTypesetKind(PrimitiveType.Kind value)<R,A>
Rvisit(Type.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.Type
internalRegisterListener, internalUnregisterListener, readType, registerListener, unregisterListener, writeTo
-
-
-
-
Field Detail
-
PRIMITIVE_TYPE__TYPE
public static final String PRIMITIVE_TYPE__TYPE
Identifier for thePrimitiveTypetype in JSON format.- See Also:
- Constant Field Values
-
KIND
public static final String KIND
- See Also:
getKind(), Constant Field Values
-
-
Constructor Detail
-
PrimitiveType
protected PrimitiveType()
Creates aPrimitiveTypeinstance.- See Also:
create()
-
-
Method Detail
-
create
public static PrimitiveType create()
Creates aPrimitiveTypeinstance.
-
kind
public Type.TypeKind kind()
Description copied from class:TypeThe type code of this instance.
-
getKind
public final PrimitiveType.Kind getKind()
The type kind.
-
setKind
public PrimitiveType setKind(PrimitiveType.Kind value)
- See Also:
getKind()
-
internalSetKind
protected final void internalSetKind(PrimitiveType.Kind value)
Internal setter forgetKind()without chain call utility.
-
jsonType
public String jsonType()
-
readPrimitiveType
public static PrimitiveType readPrimitiveType(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(Type.Visitor<R,A> v, A arg)
Description copied from class:TypeAccepts the given visitor.
-
-