public class Dl4jReflection
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
static java.lang.reflect.Field[] |
getAllFields(java.lang.Class<?> clazz) |
static java.lang.reflect.Constructor<?> |
getEmptyConstructor(java.lang.Class<?> clazz)
Gets the empty constructor from a class
|
static java.util.Properties |
getFieldsAsProperties(java.lang.Object obj,
java.lang.Class<?>[] clazzes)
Get fields as properties
|
static void |
setProperties(java.lang.Object obj,
java.util.Properties props)
Sets the properties of the given object
|
public static java.lang.reflect.Constructor<?> getEmptyConstructor(java.lang.Class<?> clazz)
clazz
- the class to getFromOrigin the constructor frompublic static java.lang.reflect.Field[] getAllFields(java.lang.Class<?> clazz)
public static void setProperties(java.lang.Object obj, java.util.Properties props) throws java.lang.Exception
obj
- the object o setprops
- the properties to setjava.lang.Exception
public static java.util.Properties getFieldsAsProperties(java.lang.Object obj, java.lang.Class<?>[] clazzes) throws java.lang.Exception
obj
- the object to get fields forclazzes
- the classes to use for reflection and properties.
Tjava.lang.Exception