org.granite.util
Class Introspector

java.lang.Object
  extended by org.granite.util.Introspector

public class Introspector
extends Object

Basic bean introspector Required for Android environment which does not include java.beans.Intropector


Constructor Summary
Introspector()
           
 
Method Summary
static String decapitalize(String name)
          Decapitalizes a given string according to the rule: If the first or only character is Upper Case, it is made Lower Case UNLESS the second character is also Upper Case, when the String is returned unchanged
static void flushCaches()
          Flushes all BeanInfo caches.
static void flushFromCaches(Class<?> clazz)
          Flushes the BeanInfo caches of the specified bean class
static PropertyDescriptor[] getPropertyDescriptors(Class<?> beanClass)
          Gets the BeanInfo object which contains the information of the properties, events and methods of the specified bean class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Introspector

public Introspector()
Method Detail

decapitalize

public static String decapitalize(String name)
Decapitalizes a given string according to the rule:

flushCaches

public static void flushCaches()
Flushes all BeanInfo caches.


flushFromCaches

public static void flushFromCaches(Class<?> clazz)
Flushes the BeanInfo caches of the specified bean class

Parameters:
clazz - the specified bean class

getPropertyDescriptors

public static PropertyDescriptor[] getPropertyDescriptors(Class<?> beanClass)
Gets the BeanInfo object which contains the information of the properties, events and methods of the specified bean class.

The Introspector will cache the BeanInfo object. Subsequent calls to this method will be answered with the cached data.

Parameters:
beanClass - the specified bean class.
Returns:
the BeanInfo of the bean class.
Throws:
IntrospectionException