Class BeanIntrospector

java.lang.Object
org.eclnt.jsfserver.util.BeanIntrospector

public class BeanIntrospector extends Object
Central class for introspecting properties of a class via reflection.
  • Constructor Details

    • BeanIntrospector

      public BeanIntrospector()
  • Method Details

    • resetBuffers

      public static void resetBuffers()
    • readPropertiesAsList

      public static List<BeanIntrospector.PropertyIntrospectionInfo> readPropertiesAsList(Class cl)
      The list of properties is always stable within one virtual machine - so you can use the list for purposes in which the list is required to be stable. Example: if calculating a hash code out of the properties then the sequence of properties must be stable in order to properly calculate the hash code.
    • readProperty

      public static BeanIntrospector.PropertyIntrospectionInfo readProperty(Class cl, String propertyName)
    • readProperties

      public static Map<String,BeanIntrospector.PropertyIntrospectionInfo> readProperties(Class cl)
    • checkIfSimpleDataType

      public static boolean checkIfSimpleDataType(Class cl)
    • buildBeanPropertyNameFromPartialMethodName

      public static String buildBeanPropertyNameFromPartialMethodName(String rawName)
      Derive bean name out of "raw name". The "raw name" is the name of the method without "get" or "is".
    • buildMethodNameFromPropertyName

      public static String buildMethodNameFromPropertyName(String methodPrefix, String propertyName)
      Builds method name out of propertyName for setting/getting properties.
      Parameters:
      methodPrefix - "set,"get","is",...
      propertyName - The property name, e.g. "firstName"
      Returns:
      The full method name e.g. "setFirstName"