public class Serializer extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
log |
| Modifier and Type | Method and Description |
|---|---|
static String |
getClassName(Class<?> objectClass)
Handles classes by name, also provides "shortened" class aliases where appropriate.
|
static void |
serialize(Output out,
Field field,
Method getter,
Object object,
Object value)
Serializes output to a core data type object
|
static void |
serialize(Output out,
Object any)
Serializes output to a core data type object
|
static boolean |
serializeField(String keyName,
Field field,
Method getter)
Checks whether the field should be serialized or not
|
protected static boolean |
writeArrayType(Output out,
Object arrType)
Writes array (or collection) out as output Arrays, Collections, etc
|
protected static boolean |
writeBasic(Output out,
Object basic)
Writes a primitive out as an object
|
static boolean |
writeComplex(Output out,
Object complex)
Writes a complex type object out
|
protected static boolean |
writeCustomType(Output out,
Object obj)
Writes a custom data to the output
|
protected static void |
writeDocument(Output out,
Document doc)
Writes a document to the output
|
protected static void |
writeIterator(Output out,
Iterator<Object> it)
Writes an iterator out to the output
|
protected static void |
writeList(Output out,
List<?> list)
Writes a List out as an Object
|
protected static boolean |
writeListType(Output out,
Object listType)
Writes Lists out as a data type
|
protected static boolean |
writeObjectType(Output out,
Object obj)
Write typed object to the output
|
protected static boolean |
writeXMLType(Output out,
Object xml)
Writes an xml type out to the output
|
public static void serialize(Output out, Object any)
out - Output writerany - Object to serializepublic static 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 static boolean writeBasic(Output out, Object basic)
out - Output writerbasic - Primitivepublic static boolean writeComplex(Output out, Object complex)
out - Output writercomplex - Complex datatype objectprotected static boolean writeListType(Output out, Object listType)
out - Output writelistType - List typeprotected static void writeList(Output out, List<?> list)
out - Output writerlist - List to write as Objectprotected static boolean writeArrayType(Output out, Object arrType)
out - Output objectarrType - Array or collection typeprotected static void writeIterator(Output out, Iterator<Object> it)
out - Output writerit - Iterator to writeprotected static boolean writeXMLType(Output out, Object xml)
out - Output writerxml - XMLprotected static void writeDocument(Output out, Document doc)
out - Output writerdoc - Document to writeprotected static boolean writeObjectType(Output out, Object obj)
out - Output writerobj - Object type to writeprotected static boolean writeCustomType(Output out, Object obj)
out - Output writerobj - Custom datapublic static boolean serializeField(String keyName, Field field, Method getter)
keyName - key namefield - The field to be serializedgetter - Getter method for fieldCopyright © 2005–2017 Red5. All rights reserved.