uk.ac.ed.inf.utils
Class ReflectionUtils

java.lang.Object
  extended by uk.ac.ed.inf.utils.ReflectionUtils

public class ReflectionUtils
extends java.lang.Object

Class

Version:
24 Feb 2011
Author:
Luna De Ferrari luna.deferrari-at-ed.ac.uk

Constructor Summary
ReflectionUtils()
           
 
Method Summary
static java.lang.reflect.Field[] classFieldNames(java.lang.Object o)
          public static String classFieldsNamesAndValuesString(Object o){ TreeMap map = ReflectionUtils.classFieldsNamesAndValues(o); String fieldsValues = "Fields of " + o.getClass().getName() + "\n"; Set> entries = map.entrySet(); Iterator> it = entries.iterator(); while(it.hasNext()){ Entry entry = it.next(); fieldsValues += entry.getKey() } return fieldsValues; }
static java.util.TreeMap<java.lang.String,java.lang.String> classFieldsNamesAndValues(java.lang.Object o)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ReflectionUtils

public ReflectionUtils()
Method Detail

classFieldNames

public static java.lang.reflect.Field[] classFieldNames(java.lang.Object o)
public static String classFieldsNamesAndValuesString(Object o){ TreeMap map = ReflectionUtils.classFieldsNamesAndValues(o); String fieldsValues = "Fields of " + o.getClass().getName() + "\n"; Set> entries = map.entrySet(); Iterator> it = entries.iterator(); while(it.hasNext()){ Entry entry = it.next(); fieldsValues += entry.getKey() } return fieldsValues; }


classFieldsNamesAndValues

public static java.util.TreeMap<java.lang.String,java.lang.String> classFieldsNamesAndValues(java.lang.Object o)