| java.lang.Object | |||
| ↳ | java.util.AbstractMap<K, V> | ||
| ↳ | java.util.HashMap<K, V> | ||
| ↳ | com.microstrategy.utils.ReflectionHelper | ||
A helper class that allows creating new object instances and getting/setting object's properties via reflection
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| ReflectionHelper() | |||||||||||
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| static Class |
classForName(String className)
Return a Class object for the class with the given name.
| ||||||||||
| static Object |
get(Object ob, String name)
Gets the object's property value
| ||||||||||
| static String |
getEnumerationValue(String enumValue)
Returns the value of the constant defined in the Java fully
qualified class name and constant name received as a parameter.
| ||||||||||
| static Method | getSetterMethod(Class type, String name) | ||||||||||
| static Object | invokeGetter(Object ob, String name) | ||||||||||
| static Object |
newInstance(String className, Class[] parameterTypes, Object[] initargs)
Creates a new instance for the class with the given name.
| ||||||||||
| static Object |
newInstance(String className)
Creates a new instance for the class with the given name.
| ||||||||||
| static void |
set(Object ob, String propName, Object value)
Gets the object's property value
| ||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.util.HashMap
| |||||||||||
From class
java.util.AbstractMap
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
java.util.Map
| |||||||||||
Return a Class object for the class with the given name.
| className | A fully qualified class name |
|---|
| ClassNotFoundException | If the class is not found in the class-path (this includes the extended class path that includes all customizations). |
|---|
Gets the object's property value
| ob | object |
|---|---|
| name | property name |
Returns the value of the constant defined in the Java fully qualified class name and constant name received as a parameter. The value is always returned as a String regardless of the original data type. If the class cannot be resolved or the data member does not exist, null is returned.
| enumValue | FCN of the data member to resolved. i.e. com.microstrategy.web.beans.EnumReportBeanEvents.REPORT_EVENT_EXECUTE |
|---|
Creates a new instance for the class with the given name. The class is created using a constructor that expects the given list of parameters.
| className | A fully qualified class name |
|---|---|
| parameterTypes | An array with the parameter types |
| initargs | An array with the values that shall be passed to the contructor. Clearly each argument needs to match the types passed in parameterTypes. |
| ClassNotFoundException | If the class is not found in the class path |
|---|---|
| NoSuchMethodException |
Creates a new instance for the class with the given name. The corresponding class needs to have a public non arguments constructor in order to successfully use this method.
| className | A fully qualified class name |
|---|
| ClassNotFoundException | If the class is not found in the class path |
|---|
Gets the object's property value
| ob | object |
|---|---|
| propName | property name |
| value | new value |