Class ColorHelper
- java.lang.Object
-
- com.sdicons.json.serializer.helper.impl.AbstractHelper
-
- com.sdicons.json.serializer.helper.impl.ColorHelper
-
- All Implemented Interfaces:
Helper,MarshallHelper
public class ColorHelper extends AbstractHelper
-
-
Constructor Summary
Constructors Constructor Description ColorHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.ClassgetHelpedClass()java.lang.ObjectparseValue(JSONObject aObjectElement, JSONMarshall aMarshall, java.util.HashMap aPool)Convert JSON representation into an instance of a class.voidrenderValue(java.lang.Object aObj, JSONObject aParent, JSONMarshall aMarshall, java.util.HashMap aPool)Convert an element to JSON.-
Methods inherited from class com.sdicons.json.serializer.helper.impl.AbstractHelper
equals
-
-
-
-
Method Detail
-
parseValue
public java.lang.Object parseValue(JSONObject aObjectElement, JSONMarshall aMarshall, java.util.HashMap aPool) throws MarshallException
Description copied from interface:MarshallHelperConvert JSON representation into an instance of a class.- Parameters:
aObjectElement- The source element we have to convert into an object.aMarshall- The marshall we can use to convert sub elements into subobjects to compose our target object.aPool- A pool of objects already encountered. Is used to resolve references.- Returns:
- The newly created object.
- Throws:
MarshallException
-
renderValue
public void renderValue(java.lang.Object aObj, JSONObject aParent, JSONMarshall aMarshall, java.util.HashMap aPool) throws MarshallExceptionDescription copied from interface:MarshallHelperConvert an element to JSON.- Specified by:
renderValuein interfaceMarshallHelper- Overrides:
renderValuein classAbstractHelper- Parameters:
aObj- Instance that should be rendered to JSON.aParent- The parent element where we have to put the rendered information. A helper is allowed to add child elements.aMarshall- The marshall we can use to recursively render parts of our own object.aPool- A pool of objects already encountered. Is used to resolve references.- Throws:
MarshallException
-
getHelpedClass
public java.lang.Class getHelpedClass()
-
-