Package de.mhus.lib.core.json
Class TransformHelper
- java.lang.Object
-
- de.mhus.lib.core.json.TransformHelper
-
- Direct Known Subclasses:
SecurityTransformHelper
public class TransformHelper extends Object
-
-
Field Summary
Fields Modifier and Type Field Description protected Stringprefixprotected TransformStrategystrategy
-
Constructor Summary
Constructors Constructor Description TransformHelper()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancheckLevel()Return true if the level is okObjectcreateArray(int length, Class<?> type)ObjectcreateObject(Class<?> type)PojoModelcreatePojoModel(Object from)TransformHelperdecLevel()ClassLoadergetClassLoader()StringgetPrefix()TransformStrategygetStrategy()Class<?>getType(String clazz)TransformHelperincLevel()booleanisArrayType(String type)voidlog(String msg)voidlog(String string, Throwable t)voidpostToJson(Object from, org.codehaus.jackson.JsonNode to)voidpostToPojo(org.codehaus.jackson.JsonNode from, Object to)voidsetPrefix(String in)
-
-
-
Field Detail
-
prefix
protected String prefix
-
strategy
protected TransformStrategy strategy
-
-
Method Detail
-
incLevel
public TransformHelper incLevel()
-
postToJson
public void postToJson(Object from, org.codehaus.jackson.JsonNode to)
-
getType
public Class<?> getType(String clazz) throws IllegalAccessException
- Throws:
IllegalAccessException
-
isArrayType
public boolean isArrayType(String type)
-
getClassLoader
public ClassLoader getClassLoader()
-
decLevel
public TransformHelper decLevel()
-
createObject
public Object createObject(Class<?> type) throws InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException
-
getPrefix
public String getPrefix()
-
setPrefix
public void setPrefix(String in)
-
log
public void log(String msg)
-
checkLevel
public boolean checkLevel()
Return true if the level is ok- Returns:
- true if level is ok
-
getStrategy
public TransformStrategy getStrategy()
-
postToPojo
public void postToPojo(org.codehaus.jackson.JsonNode from, Object to)
-
-