src/main/java/org/jboss/util/Classes.java
public final static Method getAttributeSetter(Class cls, String attr, Class type) throws NoSuchMethodException
   {
      StringBuffer buf = new StringBuffer(attr.length() + 3);
      buf.append("set");
      if(Character.isLowerCase(attr.charAt(0)))
      {
         buf.append(Character.toUpperCase(attr.charAt(0)))
            .append(attr.substring(1));
      }
      else
      {
         buf.append(attr);
      }

      return cls.getMethod(buf.toString(), new Class[]{type});
   }
public final static Method getAttributeSetter(Class cls, String attr, Class type) throws NoSuchMethodException
   {
      StringBuffer buf = new StringBuffer(attr.length() + 3);
      buf.append("set");
      if(Character.isLowerCase(attr.charAt(0)))
      {
         buf.append(Character.toUpperCase(attr.charAt(0)))
            .append(attr.substring(1));
      }
      else
      {
         buf.append(attr);
      }

      return cls.getMethod(buf.toString(), new Class[]{type});
   }
public final static Method getAttributeSetter ( Class cls , String attr , Class type ) throws NoSuchMethodException { StringBuffer buf = new StringBuffer ( attr . length ( ) + 3 ) ; buf . append ( "set" ) ; if ( Character . isLowerCase ( attr . charAt ( 0 ) ) ) { buf . append ( Character . toUpperCase ( attr . charAt ( 0 ) ) ) . append ( attr . substring ( 1 ) ) ; } else { buf . append ( attr ) ; } return cls . getMethod ( buf . toString ( ) , new Class [ ] { type } ) ; }
Returns attribute's setter method. If the method not found then NoSuchMethodException will be thrown.
@param cls   the class the attribute belongs to
@param attr  the attribute's name
@param type  the attribute's type
@return  attribute's setter method
@throws NoSuchMethodException  if the setter was not found
Returns attribute s setter method . If the method not found then NoSuchMethodException will be thrown .