/** Create a support based on the property name. * The getter and setter methods are constructed by capitalizing the first * letter in the name of propety and prefixing it with <code>get</code> and * <code>set</code>, respectively. * * @param instance object to work on * @param valueType type of the property * @param property name of property * @exception NoSuchMethodException if the getter or setter methods cannot be found */ public Reflection(Object instance, Class<T> valueType, String property) throws NoSuchMethodException { this( instance, valueType, findGetter(instance, valueType, property), findAccessibleClass(instance.getClass()).getMethod( firstLetterToUpperCase(property, "set"), valueType ) ); }
/** Create a support based on the property name. * The getter and setter methods are constructed by capitalizing the first * letter in the name of propety and prefixing it with <code>get</code> and * <code>set</code>, respectively. * * @param instance object to work on * @param valueType type of the property * @param property name of property * @exception NoSuchMethodException if the getter or setter methods cannot be found */ public Reflection (Object instance, Class valueType, String property) throws NoSuchMethodException { this ( instance, valueType, findGetter( instance, valueType, property ), findAccessibleClass (instance.getClass ()).getMethod ( firstLetterToUpperCase (property, "set"), new Class[] { valueType } ) ); }
/** Create a support based on the property name. * The getter and setter methods are constructed by capitalizing the first * letter in the name of propety and prefixing it with <code>get</code> and * <code>set</code>, respectively. * * @param instance object to work on * @param valueType type of the property * @param property name of property * @exception NoSuchMethodException if the getter or setter methods cannot be found */ public Reflection (Object instance, Class valueType, String property) throws NoSuchMethodException { this ( instance, valueType, findGetter( instance, valueType, property ), findAccessibleClass (instance.getClass ()).getMethod ( firstLetterToUpperCase (property, "set"), new Class[] { valueType } ) ); }