Package org.fest.util

Class Introspection


  • public final class Introspection
    extends java.lang.Object
    Utility methods related to JavaBeans Introspection.
    Author:
    Alex Ruiz
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.beans.PropertyDescriptor getProperty​(java.lang.String propertyName, java.lang.Object target)
      Returns a PropertyDescriptor for a property matching the given name in the given object.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getProperty

        public static java.beans.PropertyDescriptor getProperty​(java.lang.String propertyName,
                                                                java.lang.Object target)
        Returns a PropertyDescriptor for a property matching the given name in the given object.
        Parameters:
        propertyName - the given property name.
        target - the given object.
        Returns:
        a PropertyDescriptor for a property matching the given name in the given object.
        Throws:
        java.lang.NullPointerException - if the given property name is null.
        java.lang.IllegalArgumentException - if the given property name is empty.
        java.lang.NullPointerException - if the given object is null.
        IntrospectionError - if a matching property cannot be found or accessed.