{
char c;
StringBuffer sb;
Object[] params = { };
Introspector introspector = rsvc.getIntrospector();
/*
* start with get<property>
* this leaves the property name
* as is...
*/
sb = new StringBuffer( "get" );
sb.append( property );
methodUsed = sb.toString();
method = introspector.getMethod( clazz, methodUsed, params);
if (method != null)
return;
/*
* now the convenience, flip the 1st character
*/
sb = new StringBuffer( "get" );
sb.append( property );
c = sb.charAt(3);
if( Character.isLowerCase( c ) )
{
sb.setCharAt( 3 , Character.toUpperCase( c ) );
}
else
{
sb.setCharAt( 3 , Character.toLowerCase( c ) );
}
methodUsed = sb.toString();
method = introspector.getMethod( clazz, methodUsed, params);
if ( method != null)
return;
}