Class QName
- java.lang.Object
-
- de.haumacher.msgbuf.data.AbstractDataObject
-
- de.haumacher.msgbuf.generator.ast.QName
-
- All Implemented Interfaces:
DataObject,ReflectiveDataObject,Observable
public class QName extends AbstractDataObject implements Observable
A dot-separated qualified name.
-
-
Field Summary
Fields Modifier and Type Field Description protected Listener_listenerstatic StringNAMES__PROPstatic StringQNAME__TYPEIdentifier for theQNametype in JSON format.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description QNameaddName(String value)Adds a value to thegetNames()list.static QNamecreate()Creates aQNameinstance.Objectget(String field)List<String>getNames()The parts that compose this qualified name.protected voidinternalAddName(String value)Implementation ofaddName(String)without chain call utility.protected voidinternalRegisterListener(Listener l)protected voidinternalSetNames(List<? extends String> value)Internal setter forgetNames()without chain call utility.protected voidinternalUnregisterListener(Listener l)StringjsonType()List<String>properties()protected voidreadField(JsonReader in, String field)static QNamereadQName(JsonReader in)Reads a new instance from the given reader.QNameregisterListener(Listener l)voidremoveName(String value)Removes a value from thegetNames()list.voidset(String field, Object value)QNamesetNames(List<? extends String> value)QNameunregisterListener(Listener l)protected voidwriteFields(JsonWriter out)voidwriteTo(JsonWriter out)-
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
-
QNAME__TYPE
public static final String QNAME__TYPE
Identifier for theQNametype in JSON format.- See Also:
- Constant Field Values
-
NAMES__PROP
public static final String NAMES__PROP
- See Also:
getNames(), Constant Field Values
-
_listener
protected Listener _listener
-
-
Method Detail
-
setNames
public QName setNames(List<? extends String> value)
- See Also:
getNames()
-
internalSetNames
protected final void internalSetNames(List<? extends String> value)
Internal setter forgetNames()without chain call utility.
-
addName
public QName addName(String value)
Adds a value to thegetNames()list.
-
internalAddName
protected final void internalAddName(String value)
Implementation ofaddName(String)without chain call utility.
-
removeName
public final void removeName(String value)
Removes a value from thegetNames()list.
-
registerListener
public QName registerListener(Listener l)
- Specified by:
registerListenerin interfaceObservable
-
internalRegisterListener
protected final void internalRegisterListener(Listener l)
-
unregisterListener
public QName unregisterListener(Listener l)
- Specified by:
unregisterListenerin interfaceObservable
-
internalUnregisterListener
protected final void internalUnregisterListener(Listener l)
-
jsonType
public String jsonType()
- Specified by:
jsonTypein interfaceReflectiveDataObject
-
properties
public List<String> properties()
- Specified by:
propertiesin interfaceReflectiveDataObject
-
get
public Object get(String field)
- Specified by:
getin interfaceReflectiveDataObject
-
set
public void set(String field, Object value)
- Specified by:
setin interfaceReflectiveDataObject
-
readQName
public static QName readQName(JsonReader in) throws IOException
Reads a new instance from the given reader.- Throws:
IOException
-
writeTo
public final void writeTo(JsonWriter out) throws IOException
- Specified by:
writeToin interfaceDataObject- 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
-
-