public class Entities extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
CLASS_PROPERTY |
protected static ERDiscovery |
erDiscovery |
protected static com.fasterxml.jackson.databind.ObjectMapper |
mapper |
| Constructor and Description |
|---|
Entities() |
| Modifier and Type | Method and Description |
|---|---|
static ERDiscovery |
getErdiscovery() |
static String |
marshal(Object resource)
Return the String serialization of a given resource
|
static <T extends OutputStream> |
marshal(Object resource,
T stream)
Write the serialization of a given resource to a given
OutputStream . |
static <T extends Writer> |
marshal(Object resource,
T writer)
Write the serialization of a given resource to a given
Writer . |
static void |
registerSubtypes(Class<?>... classes) |
static <T> T |
unmarshal(Class<T> resourceClass,
InputStream stream)
Creates a resource of given class from its serialization in a given
InputStream. |
static <T> T |
unmarshal(Class<T> resourceClass,
Reader reader)
Creates a resource of given class from its serialization in a given
Reader. |
static <T> T |
unmarshal(Class<T> resourceClass,
String string)
Creates a resource of given class from its serialization in a given String
|
public static final String CLASS_PROPERTY
protected static final com.fasterxml.jackson.databind.ObjectMapper mapper
protected static final ERDiscovery erDiscovery
public static ERDiscovery getErdiscovery()
public static <T extends OutputStream> T marshal(Object resource, T stream) throws com.fasterxml.jackson.core.JsonGenerationException, com.fasterxml.jackson.databind.JsonMappingException, IOException
OutputStream .resource - the resourcestream - the stream in inputIOExceptioncom.fasterxml.jackson.databind.JsonMappingExceptioncom.fasterxml.jackson.core.JsonGenerationExceptionpublic static <T extends Writer> T marshal(Object resource, T writer) throws com.fasterxml.jackson.core.JsonGenerationException, com.fasterxml.jackson.databind.JsonMappingException, IOException
Writer .resource - the resourcewriter - the writer in inputIOExceptioncom.fasterxml.jackson.databind.JsonMappingExceptioncom.fasterxml.jackson.core.JsonGenerationExceptionpublic static String marshal(Object resource) throws com.fasterxml.jackson.core.JsonProcessingException
resource - the resourcecom.fasterxml.jackson.core.JsonProcessingExceptionpublic static <T> T unmarshal(Class<T> resourceClass, Reader reader) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
Reader.resourceClass - the class of the resourcereader - the readercom.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOExceptionpublic static <T> T unmarshal(Class<T> resourceClass, InputStream stream) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
InputStream.resourceClass - the class of the resourcestream - the streamIOExceptioncom.fasterxml.jackson.databind.JsonMappingExceptioncom.fasterxml.jackson.core.JsonParseExceptionpublic static <T> T unmarshal(Class<T> resourceClass, String string) throws com.fasterxml.jackson.core.JsonParseException, com.fasterxml.jackson.databind.JsonMappingException, IOException
resourceClass - the class of the resourcestring - com.fasterxml.jackson.core.JsonParseExceptioncom.fasterxml.jackson.databind.JsonMappingExceptionIOExceptionpublic static void registerSubtypes(Class<?>... classes)
Copyright © 2016. All Rights Reserved.