public final class RuntimeEnv
extends java.lang.Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RuntimeEnv.Instantiator<T> |
| Modifier and Type | Field and Description |
|---|---|
static boolean |
ALLOW_NULL_ARRAY_ELEMENT
Disabled by default.
|
static boolean |
ALWAYS_USE_SUN_REFLECTION_FACTORY
If true, the constructor will always be obtained from
ReflectionFactory.newConstructorFromSerialization. |
static boolean |
AUTO_LOAD_POLYMORPHIC_CLASSES
Enabled by default.
|
static boolean |
COLLECTION_SCHEMA_ON_REPEATED_FIELDS
On repeated fields, the List/Collection itself is not serialized (only its values).
|
static boolean |
ENUMS_BY_NAME
Returns true if serializing enums by name is activated.
|
static IdStrategy |
ID_STRATEGY |
static boolean |
MIX_MESSAGE_SCHEMA
If true, an existing message schema is used instead of creating a new one.
|
static boolean |
MORPH_COLLECTION_INTERFACES
Disabled by default.
|
static boolean |
MORPH_MAP_INTERFACES
Disabled by default.
|
static boolean |
MORPH_NON_FINAL_POJOS
Disabled by default.
|
static boolean |
USE_SUN_MISC_UNSAFE
If true, sun.misc.Unsafe is used to access the fields of the objects instead of
plain java reflections.
|
| Modifier and Type | Method and Description |
|---|---|
static <T> RuntimeEnv.Instantiator<T> |
newInstantiator(java.lang.Class<T> clazz)
Returns an instatiator for the specified
clazz. |
public static final boolean ENUMS_BY_NAME
public static final boolean AUTO_LOAD_POLYMORPHIC_CLASSES
public static final boolean ALLOW_NULL_ARRAY_ELEMENT
public static final boolean MORPH_NON_FINAL_POJOS
public static final boolean MORPH_COLLECTION_INTERFACES
Collection = ArrayList List = ArrayList Set = HashSet SortedSet = TreeSet NavigableSet = TreeSet Queue = LinkedList BlockingQueue = LinkedBlockingQueue Deque = LinkedList BlockingDequeue = LinkedBlockingDequeYou can optionally enable only for a particular field by annotation it with
Morph.public static final boolean MORPH_MAP_INTERFACES
Map = HashMap SortedMap = TreeMap NavigableMap = TreeMap ConcurrentMap = ConcurrentHashMap ConcurrentNavigableMap = ConcurrentSkipListMapYou can optionally enable only for a particular field by annotation it with
Morph.public static final boolean COLLECTION_SCHEMA_ON_REPEATED_FIELDS
Object.equals(Object) on your
pojos.
Disabled by default for protobuf compatibility.public static final boolean USE_SUN_MISC_UNSAFE
public static final boolean MIX_MESSAGE_SCHEMA
public static final boolean ALWAYS_USE_SUN_REFLECTION_FACTORY
ReflectionFactory.newConstructorFromSerialization.
Disabled by default, which means that if the pojo has a no-args constructor,
that will be used instead.
Enable this if you intend to avoid deserializing objects whose no-args constructor
initializes (unwanted) internal state. This applies to complex/framework objects.
If you intend to fill default field values using your default constructor,
leave this disabled. This normally applies to java beans/data objects.public static final IdStrategy ID_STRATEGY
public static <T> RuntimeEnv.Instantiator<T> newInstantiator(java.lang.Class<T> clazz)
clazz.Copyright © 2009-2023. All Rights Reserved.