Class CustomType
- java.lang.Object
-
- de.haumacher.msgbuf.data.AbstractDataObject
-
- de.haumacher.msgbuf.generator.ast.Type
-
- de.haumacher.msgbuf.generator.ast.CustomType
-
- All Implemented Interfaces:
de.haumacher.msgbuf.data.DataObject,de.haumacher.msgbuf.data.ReflectiveDataObject,de.haumacher.msgbuf.observer.Observable
public class CustomType extends Type
-
-
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 StringCUSTOM_TYPE__TYPEIdentifier for theCustomTypetype in JSON format.static StringDEFINITIONstatic StringNAME
-
Constructor Summary
Constructors Modifier Constructor Description protectedCustomType()Creates aCustomTypeinstance.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static CustomTypecreate()Creates aCustomTypeinstance.Objectget(String field)DefinitiongetDefinition()Resolved reference of theDefinitiondefining thereferenced type.QNamegetName()The name of the reference type.booleanhasDefinition()Checks, whethergetDefinition()has a value.booleanhasName()Checks, whethergetName()has a value.protected voidinternalSetDefinition(Definition value)Internal setter forgetDefinition()without chain call utility.protected voidinternalSetName(QName value)Internal setter forgetName()without chain call utility.StringjsonType()Type.TypeKindkind()The type code of this instance.List<String>properties()static CustomTypereadCustomType(de.haumacher.msgbuf.json.JsonReader in)Reads a new instance from the given reader.protected voidreadField(de.haumacher.msgbuf.json.JsonReader in, String field)voidset(String field, Object value)CustomTypesetDefinition(Definition value)CustomTypesetName(QName 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
-
CUSTOM_TYPE__TYPE
public static final String CUSTOM_TYPE__TYPE
Identifier for theCustomTypetype in JSON format.- See Also:
- Constant Field Values
-
NAME
public static final String NAME
- See Also:
getName(), Constant Field Values
-
DEFINITION
public static final String DEFINITION
- See Also:
getDefinition(), Constant Field Values
-
-
Constructor Detail
-
CustomType
protected CustomType()
Creates aCustomTypeinstance.- See Also:
create()
-
-
Method Detail
-
create
public static CustomType create()
Creates aCustomTypeinstance.
-
kind
public Type.TypeKind kind()
Description copied from class:TypeThe type code of this instance.
-
getName
public final QName getName()
The name of the reference type.
-
setName
public CustomType setName(QName value)
- See Also:
getName()
-
internalSetName
protected final void internalSetName(QName value)
Internal setter forgetName()without chain call utility.
-
hasName
public final boolean hasName()
Checks, whethergetName()has a value.
-
getDefinition
public final Definition getDefinition()
Resolved reference of theDefinitiondefining thereferenced type.
-
setDefinition
public CustomType setDefinition(Definition value)
- See Also:
getDefinition()
-
internalSetDefinition
protected final void internalSetDefinition(Definition value)
Internal setter forgetDefinition()without chain call utility.
-
hasDefinition
public final boolean hasDefinition()
Checks, whethergetDefinition()has a value.
-
jsonType
public String jsonType()
-
readCustomType
public static CustomType readCustomType(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.
-
-