|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.red5.io.object.Serializer
public class Serializer
The Serializer class writes data output and handles the data according to the core data types
Field Summary | |
---|---|
protected static Logger |
log
|
Constructor Summary | |
---|---|
Serializer()
|
Method Summary | |
---|---|
String |
getClassName(Class<?> objectClass)
Handles classes by name, also provides "shortened" class aliases where appropriate. |
Object |
preProcessExtension(Object any)
Pre processes an object TODO // must be implemented |
void |
serialize(Output out,
Field field,
Method getter,
Object object,
Object value)
Serializes output to a core data type object |
void |
serialize(Output out,
Object any)
Serializes output to a core data type object |
boolean |
serializeField(String keyName,
Field field,
Method getter)
Checks whether the field should be serialized or not |
protected boolean |
writeArrayType(Output out,
Object arrType)
Writes array (or collection) out as output Arrays, Collections, etc |
protected boolean |
writeBasic(Output out,
Object basic)
Writes a primitive out as an object |
boolean |
writeComplex(Output out,
Object complex)
Writes a complex type object out |
protected boolean |
writeCustomType(Output out,
Object obj)
Writes a custom data to the output |
protected void |
writeDocument(Output out,
Document doc)
Writes a document to the output |
protected void |
writeIterator(Output out,
Iterator<Object> it)
Writes an iterator out to the output |
protected void |
writeList(Output out,
List<?> list)
Writes a List out as an Object |
protected boolean |
writeListType(Output out,
Object listType)
Writes Lists out as a data type |
protected boolean |
writeObjectType(Output out,
Object obj)
Write typed object to the output |
protected boolean |
writeXMLType(Output out,
Object xml)
Writes an xml type out to the output |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static Logger log
Constructor Detail |
---|
public Serializer()
Method Detail |
---|
public void serialize(Output out, Object any)
out
- Output writerany
- Object to serializepublic void serialize(Output out, Field field, Method getter, Object object, Object value)
out
- Output writerfield
- The field to serializegetter
- The getter method if not a fieldobject
- Parent objectvalue
- Object to serializeprotected boolean writeBasic(Output out, Object basic)
out
- Output writerbasic
- Primitive
public boolean writeComplex(Output out, Object complex)
out
- Output writercomplex
- Complex datatype object
protected boolean writeListType(Output out, Object listType)
out
- Output writelistType
- List type
protected void writeList(Output out, List<?> list)
out
- Output writerlist
- List to write as Objectprotected boolean writeArrayType(Output out, Object arrType)
out
- Output objectarrType
- Array or collection type
true
if the object has been written, otherwise
false
protected void writeIterator(Output out, Iterator<Object> it)
out
- Output writerit
- Iterator to writeprotected boolean writeXMLType(Output out, Object xml)
out
- Output writerxml
- XML
true
if object was successfully written,
false
otherwiseprotected void writeDocument(Output out, Document doc)
out
- Output writerdoc
- Document to writeprotected boolean writeObjectType(Output out, Object obj)
out
- Output writerobj
- Object type to write
true
if the object has been written, otherwise
false
public Object preProcessExtension(Object any)
any
- Object to preprocess
protected boolean writeCustomType(Output out, Object obj)
out
- Output writerobj
- Custom data
true
if the object has been written, otherwise
false
public boolean serializeField(String keyName, Field field, Method getter)
keyName
- key namefield
- The field to be serializedgetter
- Getter method for field
true
if the field should be serialized, otherwise
false
public String getClassName(Class<?> objectClass)
objectClass
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |