Package org.nustaq.serialization
Class FSTObjenesisInstantiator
java.lang.Object
org.nustaq.serialization.FSTObjenesisInstantiator
- All Implemented Interfaces:
FSTClassInstantiator
public class FSTObjenesisInstantiator extends Object implements FSTClassInstantiator
Created by ruedi on 12.12.14.
Used for Android as does not require sun.* or Unsafe to instantiate classes.
Might be slower for some cases (probably executes field init)
-
Constructor Summary
Constructors Constructor Description FSTObjenesisInstantiator(org.objenesis.Objenesis objenesis, Class clazz) -
Method Summary
Modifier and Type Method Description ConstructorfindConstructorForExternalize(Class clazz)ConstructorfindConstructorForSerializable(Class clazz)ObjectnewInstance(Class clazz, Constructor cons, boolean doesRequireInit, boolean unsafeAsLastResort)
-
Constructor Details
-
Method Details
-
newInstance
public Object newInstance(Class clazz, Constructor cons, boolean doesRequireInit, boolean unsafeAsLastResort)- Specified by:
newInstancein interfaceFSTClassInstantiator
-
findConstructorForExternalize
- Specified by:
findConstructorForExternalizein interfaceFSTClassInstantiator
-
findConstructorForSerializable
- Specified by:
findConstructorForSerializablein interfaceFSTClassInstantiator
-