code: public PropertyDescriptor[] 
      getTeaBeanPropertyDescriptors(Class<?> beanClass) {
  
          // Code taken from KettleUtilities.getPropertyDescriptors(Class)
          
          if (beanClass == null) {
              return NO_PROPERTIES;
          }
  
          PropertyDescriptor[] properties = null;
  
          Map<String, PropertyDescriptor> allProps = null;
          try {
              allProps = BeanAnalyzer.getAllProperties(new GenericType(beanClass));
          }
          catch (Throwable t) {
              return NO_PROPERTIES;           
          }
  
          Collection<PropertyDescriptor> cleanProps = 
              new ArrayList<PropertyDescriptor>(allProps.size());
  
          Iterator<Map.Entry<String, PropertyDescriptor>> it = 
              allProps.entrySet().iterator();
          
          while (it.hasNext()) {
  
              Map.Entry<String, PropertyDescriptor> entry = it.next();
              String name = entry.getKey();
              PropertyDescriptor desc = entry.getValue();
              
              // Discard properties that have no name or should be hidden.
              if (name == null || name.length() == 0 || "class".equals(name)) {
                  continue;
              }
              
              if (desc instanceof KeyedPropertyDescriptor) {
  
                  KeyedPropertyDescriptor keyed = (KeyedPropertyDescriptor) desc;
                  Class<?> type = keyed.getKeyedPropertyType().getRawType().getType();
  
                  try {
                      // Convert the KeyedPropertyDescriptor to a 
                      // ArrayIndexPropertyDescriptor
                      desc = new ArrayIndexPropertyDescriptor(beanClass, type);
                  }
                  catch (Throwable t) {
                      continue;
                  }
              }
              else if (!beanClass.isArray() && desc.getReadMethod() == null) {
                  continue;
              }
              
              cleanProps.add(desc);
          }
  
          properties = cleanProps.toArray(new PropertyDescriptor[cleanProps.size()]);
          
          // Sort 'em!
          sortPropertyDescriptors(properties);
          
          return properties;
      }
docs: A function that returns an array of all the available properties on
  a given class.
  <p>
  <b>NOTE:</b> If possible, the results of this method should be cached
  by the caller.
  
  @param beanClass the bean class to introspect
  
  @return an array of all the available properties on the specified class.