org.red5.io.object
public class Serializer extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
log |
Constructor and Description |
---|
Serializer() |
Modifier and Type | Method and Description |
---|---|
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
|
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
- Primitivepublic boolean writeComplex(Output out, Object complex)
out
- Output writercomplex
- Complex datatype objectprotected boolean writeListType(Output out, Object listType)
out
- Output writelistType
- List typeprotected 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 typetrue
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
- XMLtrue
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 writetrue
if the object has been written, otherwise
false
public Object preProcessExtension(Object any)
any
- Object to preprocessprotected boolean writeCustomType(Output out, Object obj)
out
- Output writerobj
- Custom datatrue
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 fieldtrue
if the field should be serialized, otherwise
false
Copyright © 2006-2012 The Red5 Project