|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.dyuproject.protostuff.runtime.RuntimeEnv
public final class RuntimeEnv
The runtime environment.
| Nested Class Summary | |
|---|---|
static class |
RuntimeEnv.Instantiator<T>
|
| Field Summary | |
|---|---|
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 |
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. |
| Method Summary | ||
|---|---|---|
static
|
newInstantiator(java.lang.Class<T> clazz)
Returns an instatiator for the specified clazz. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final boolean ENUMS_BY_NAME
public static final boolean AUTO_LOAD_POLYMORPHIC_CLASSES
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 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
| Method Detail |
|---|
public static <T> RuntimeEnv.Instantiator<T> newInstantiator(java.lang.Class<T> clazz)
clazz.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||