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:
DataObject,ReflectiveDataObject,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 StringDEFINITION__PROPstatic StringNAME__PROP
-
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(JsonReader in)Reads a new instance from the given reader.protected voidreadField(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(JsonWriter out)-
Methods inherited from class de.haumacher.msgbuf.generator.ast.Type
internalRegisterListener, internalUnregisterListener, readType, registerListener, unregisterListener, writeTo
-
Methods inherited from class de.haumacher.msgbuf.data.AbstractDataObject
readContent, readFields, toString, writeContent
-
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
transientProperties
-
-
-
-
Field Detail
-
CUSTOM_TYPE__TYPE
public static final String CUSTOM_TYPE__TYPE
Identifier for theCustomTypetype in JSON format.- See Also:
- Constant Field Values
-
NAME__PROP
public static final String NAME__PROP
- See Also:
getName(), Constant Field Values
-
DEFINITION__PROP
public static final String DEFINITION__PROP
- 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(JsonReader in) throws IOException
Reads a new instance from the given reader.- Throws:
IOException
-
writeFields
protected void writeFields(JsonWriter out) throws IOException
- Overrides:
writeFieldsin classAbstractDataObject- Throws:
IOException
-
readField
protected void readField(JsonReader in, String field) throws IOException
- Overrides:
readFieldin classAbstractDataObject- Throws:
IOException
-
visit
public <R,A> R visit(Type.Visitor<R,A> v, A arg)
Description copied from class:TypeAccepts the given visitor.
-
-