Class MapType
- java.lang.Object
-
- de.haumacher.msgbuf.data.AbstractDataObject
-
- de.haumacher.msgbuf.generator.ast.Type
-
- de.haumacher.msgbuf.generator.ast.MapType
-
-
Nested Class Summary
-
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 StringKEY_TYPEstatic StringMAP_TYPE__TYPEIdentifier for theMapTypetype in JSON format.static StringVALUE_TYPE
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MapTypecreate()Creates aMapTypeinstance.Objectget(String field)TypegetKeyType()The key type of this map.TypegetValueType()The value type of this map.booleanhasKeyType()Checks, whethergetKeyType()has a value.booleanhasValueType()Checks, whethergetValueType()has a value.protected voidinternalSetKeyType(Type value)Internal setter forgetKeyType()without chain call utility.protected voidinternalSetValueType(Type value)Internal setter forgetValueType()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 MapTypereadMapType(de.haumacher.msgbuf.json.JsonReader in)Reads a new instance from the given reader.voidset(String field, Object value)MapTypesetKeyType(Type value)MapTypesetValueType(Type 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
-
MAP_TYPE__TYPE
public static final String MAP_TYPE__TYPE
Identifier for theMapTypetype in JSON format.- See Also:
- Constant Field Values
-
KEY_TYPE
public static final String KEY_TYPE
- See Also:
getKeyType(), Constant Field Values
-
VALUE_TYPE
public static final String VALUE_TYPE
- See Also:
getValueType(), Constant Field Values
-
-
Method Detail
-
kind
public Type.TypeKind kind()
Description copied from class:TypeThe type code of this instance.
-
getKeyType
public final Type getKeyType()
The key type of this map.
-
setKeyType
public MapType setKeyType(Type value)
- See Also:
getKeyType()
-
internalSetKeyType
protected final void internalSetKeyType(Type value)
Internal setter forgetKeyType()without chain call utility.
-
hasKeyType
public final boolean hasKeyType()
Checks, whethergetKeyType()has a value.
-
getValueType
public final Type getValueType()
The value type of this map.
-
setValueType
public MapType setValueType(Type value)
- See Also:
getValueType()
-
internalSetValueType
protected final void internalSetValueType(Type value)
Internal setter forgetValueType()without chain call utility.
-
hasValueType
public final boolean hasValueType()
Checks, whethergetValueType()has a value.
-
jsonType
public String jsonType()
-
readMapType
public static MapType readMapType(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.
-
-