Class ScxObject
java.lang.Object
cool.scx.object.ScxObject
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> TconvertValue(Object value, cool.scx.reflect.TypeInfo type) static <T> TconvertValue(Object value, cool.scx.reflect.TypeReference<T> type) static <T> TconvertValue(Object value, Class<T> type) static Nodestatic Nodestatic <T> Tstatic <T> Tstatic <T> Tstatic Nodestatic Nodestatic <T> Tstatic <T> Tstatic <T> Tstatic <T> TnodeToValue(Node node, cool.scx.reflect.TypeInfo type) static <T> TnodeToValue(Node node, cool.scx.reflect.TypeInfo type, FromNodeOptionsImpl fromNodeOptions) static Stringstatic Stringstatic StringtoJson(Object object, ToNodeOptionsImpl toNodeOptions) static Stringstatic Stringstatic StringtoXml(Object object, ToNodeOptionsImpl toNodeOptions) static NodevalueToNode(Object value) static NodevalueToNode(Object value, ToNodeOptionsImpl toNodeOptions)
-
Constructor Details
-
ScxObject
public ScxObject()
-
-
Method Details
-
fromJson
- Throws:
NodeParseException
-
fromXml
- Throws:
NodeParseException
-
fromJson
- Throws:
IOExceptionNodeParseException
-
fromXml
- Throws:
IOExceptionNodeParseException
-
toJson
- Throws:
NodeSerializeException
-
toXml
- Throws:
NodeSerializeException
-
valueToNode
public static Node valueToNode(Object value, ToNodeOptionsImpl toNodeOptions) throws NodeMappingException - Throws:
NodeMappingException
-
nodeToValue
public static <T> T nodeToValue(Node node, cool.scx.reflect.TypeInfo type, FromNodeOptionsImpl fromNodeOptions) throws NodeMappingException - Throws:
NodeMappingException
-
valueToNode
- Throws:
NodeMappingException
-
nodeToValue
public static <T> T nodeToValue(Node node, cool.scx.reflect.TypeInfo type) throws NodeMappingException - Throws:
NodeMappingException
-
convertValue
public static <T> T convertValue(Object value, cool.scx.reflect.TypeInfo type) throws NodeMappingException - Throws:
NodeMappingException
-
fromJson
public static <T> T fromJson(String json, cool.scx.reflect.TypeInfo type) throws NodeMappingException, NodeParseException -
fromJson
public static <T> T fromJson(String json, Class<T> type) throws NodeMappingException, NodeParseException -
fromJson
public static <T> T fromJson(String json, cool.scx.reflect.TypeReference<T> type) throws NodeMappingException, NodeParseException -
toJson
-
toJson
public static String toJson(Object object, ToNodeOptionsImpl toNodeOptions) throws NodeMappingException, NodeSerializeException -
fromXml
public static <T> T fromXml(String xml, cool.scx.reflect.TypeInfo type) throws NodeMappingException, NodeParseException -
fromXml
public static <T> T fromXml(String xml, Class<T> type) throws NodeMappingException, NodeParseException -
fromXml
public static <T> T fromXml(String xml, cool.scx.reflect.TypeReference<T> type) throws NodeMappingException, NodeParseException -
toXml
-
toXml
public static String toXml(Object object, ToNodeOptionsImpl toNodeOptions) throws NodeMappingException, NodeSerializeException -
convertValue
public static <T> T convertValue(Object value, cool.scx.reflect.TypeReference<T> type) throws NodeMappingException - Throws:
NodeMappingException
-
convertValue
- Throws:
NodeMappingException
-