Class MapType
java.lang.Object
de.haumacher.msgbuf.data.AbstractDataObject
de.haumacher.msgbuf.generator.ast.Type
de.haumacher.msgbuf.generator.ast.MapType
- All Implemented Interfaces:
DataObject,ReflectiveDataObject,Observable
A
Type that is composed of a key and a value.-
Nested Class Summary
Nested classes/interfaces inherited from class de.haumacher.msgbuf.generator.ast.Type
Type.TypeKind, Type.Visitor<R,A> -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic MapTypecreate()Creates aMapTypeinstance.final TypeThe key type of this map.final TypeThe value type of this map.final booleanChecks, whethergetKeyType()has a value.final booleanChecks, whethergetValueType()has a value.protected final voidinternalSetKeyType(Type value) Internal setter forgetKeyType()without chain call utility.protected final voidinternalSetValueType(Type value) Internal setter forgetValueType()without chain call utility.jsonType()kind()The type code of this instance.protected voidreadField(JsonReader in, String field) static MapTypeReads a new instance from the given reader.voidsetKeyType(Type value) setValueType(Type value) <R,A> R visit(Type.Visitor<R, A> v, A arg) Accepts the given visitor.protected voidwriteFields(JsonWriter out) Methods inherited from class de.haumacher.msgbuf.generator.ast.Type
internalRegisterListener, internalUnregisterListener, readType, registerListener, unregisterListener, writeToMethods inherited from class de.haumacher.msgbuf.data.AbstractDataObject
readContent, readFields, toString, writeContent
-
Field Details
-
MAP_TYPE__TYPE
Identifier for theMapTypetype in JSON format.- See Also:
-
KEY_TYPE__PROP
- See Also:
-
VALUE_TYPE__PROP
- See Also:
-
-
Constructor Details
-
Method Details
-
create
Creates aMapTypeinstance. -
kind
Description copied from class:TypeThe type code of this instance. -
getKeyType
The key type of this map. -
setKeyType
- See Also:
-
internalSetKeyType
Internal setter forgetKeyType()without chain call utility. -
hasKeyType
public final boolean hasKeyType()Checks, whethergetKeyType()has a value. -
getValueType
The value type of this map. -
setValueType
- See Also:
-
internalSetValueType
Internal setter forgetValueType()without chain call utility. -
hasValueType
public final boolean hasValueType()Checks, whethergetValueType()has a value. -
jsonType
-
properties
-
get
-
set
-
readMapType
Reads a new instance from the given reader.- Throws:
IOException
-
writeFields
- Overrides:
writeFieldsin classAbstractDataObject- Throws:
IOException
-
readField
- Overrides:
readFieldin classAbstractDataObject- Throws:
IOException
-
visit
Description copied from class:TypeAccepts the given visitor.
-