| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| private static Long | |
| private Class | |
| public Object[] | Returns: Instances of methodTypes in orderClasses to instantiate methodTypes)Get some default instances of provided classes |
| public Constructor | Returns: Constructor to useClass in which constructor is searched clazz)Return the constructor considered the best to use with this class. |
| private static Long | |
| private static byte[] | |
| private boolean | Returns: If the class is serializableClass to check clazz)Tells if the provided class is serializable |
| public Object | newInstance(Class<?>
Class to instantiate c)Implements org. |
| private static Object | |
| private RuntimeException |
| EMPTY | back to summary |
|---|---|
| private static final Class<?>[] EMPTY | |
| DefaultClassInstantiator | back to summary |
|---|---|
| public DefaultClassInstantiator() | |
| callLongMethod | back to summary |
|---|---|
| private static Long callLongMethod(Class<?> clazz, String methodName) | |
| classToPrint | back to summary |
|---|---|
| private Class | |
| getArgsForTypes | back to summary |
|---|---|
| public Object[] getArgsForTypes(Class<?>[] methodTypes) throws InstantiationException Get some default instances of provided classes
| |
| getConstructorToUse | back to summary |
|---|---|
| public Constructor Return the constructor considered the best to use with this class. Algorithm is: No args constructor and then first constructor defined in the class
| |
| getSerializableUID | back to summary |
|---|---|
| private static Long getSerializableUID(Class<?> clazz) | |
| getSerializedBytes | back to summary |
|---|---|
| private static byte[] getSerializedBytes(Class<?> clazz) throws IOException | |
| isSerializable | back to summary |
|---|---|
| private boolean isSerializable(Class<?> clazz) Tells if the provided class is serializable
| |
| newInstance | back to summary |
|---|---|
| public Object newInstance(Class<?> c) throws InstantiationException Implements org. Try to instantiate a class without using a special constructor. See documentation for the algorithm.
| |
| readObject | back to summary |
|---|---|
| private static Object readObject(byte[] bytes) throws IOException, ClassNotFoundException | |
| runtimeException | back to summary |
|---|---|
| private RuntimeException runtimeException(Class<?> c, Exception e) | |