|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.eclipse.emf.mwe.internal.core.debug.mwe.ReflectionUtil
public class ReflectionUtil
Provides static helper methods to deal with element fields using reflection.
Method Summary | |
---|---|
static boolean |
checkFields(java.lang.Object element)
check if the element has member fields. |
static java.util.List<java.lang.String> |
getFieldNames(java.lang.Object element)
returns a list of names of the fields. |
static java.lang.Object |
getFieldValue(java.lang.Object object,
java.lang.String name)
Returns the value of a field of an object. For primitives it returns a string representation. It returns null in case of any exceptions. |
static java.lang.String |
getNameToString(java.lang.Object element)
Null save toString |
static java.lang.String |
getSimpleName(java.lang.Object element)
return a String representation of the element. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.String getSimpleName(java.lang.Object element)
element
- the element
public static java.lang.String getNameToString(java.lang.Object element)
element
- the element
public static boolean checkFields(java.lang.Object element)
element
- the element
public static java.util.List<java.lang.String> getFieldNames(java.lang.Object element)
element
-
public static java.lang.Object getFieldValue(java.lang.Object object, java.lang.String name)
object
- the questioned objectname
- the name of the field
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |