| Modifier and Type | Field and Description |
|---|---|
| private static final Objenesis | |
| private static final Objenesis |
| Access | Constructor and Description |
|---|---|
| private |
| Modifier and Type | Method and Description |
|---|---|
| public static < Type to instantiate T> ObjectInstantiator | Returns: Instantiator dedicated to the classClass to instantiate clazz)Will pick the best instantiator for the provided class. |
| public static < Type to instantiate T extends Serializable> ObjectInstantiator | Returns: Instantiator dedicated to the classClass to instantiate clazz)Same as |
| public static < Type instantiated T> T | Returns: New instance of clazzClass to instantiate clazz)Will create a new object without any constructor being called |
| public static < Type instantiated T extends Serializable> T | Returns: New instance of clazzClass to instantiate clazz)Will create an object just like it's done by ObjectInputStream.readObject (the default constructor of the first non serializable class will be called) |
| OBJENESIS_SERIALIZER | back to summary |
|---|---|
| private static final Objenesis OBJENESIS_SERIALIZER | |
| OBJENESIS_STD | back to summary |
|---|---|
| private static final Objenesis OBJENESIS_STD | |
| ObjenesisHelper | back to summary |
|---|---|
| private ObjenesisHelper() | |
| getInstantiatorOf | back to summary |
|---|---|
| public static <T> ObjectInstantiator Will pick the best instantiator for the provided class. If you need to create a lot of
instances from the same class, it is way more efficient to create them from the same
ObjectInstantiator than calling
| |
| getSerializableObjectInstantiatorOf | back to summary |
|---|---|
| public static <T extends Serializable> ObjectInstantiator Same as
| |
| newInstance | back to summary |
|---|---|
| public static <T> T newInstance(Class<T> clazz) Will create a new object without any constructor being called
| |
| newSerializableInstance | back to summary |
|---|---|
| public static <T extends Serializable> T newSerializableInstance(Class<T> clazz) Will create an object just like it's done by ObjectInputStream.readObject (the default constructor of the first non serializable class will be called)
| |