try {
Enumeration en=attMap.keys();
while( en.hasMoreElements() ) {
String name=(String)en.nextElement();
AttributeInfo ai=new AttributeInfo();
ai.setName( name );
Method gm=(Method)getAttMap.get(name);
if( gm!=null ) {
//ai.setGetMethodObj( gm );
ai.setGetMethod( gm.getName());
Class t=gm.getReturnType();
if( t!=null )
ai.setType( t.getName() );
}
Method sm=(Method)setAttMap.get(name);
if( sm!=null ) {
//ai.setSetMethodObj(sm);
Class t=sm.getParameterTypes()[0];
if( t!=null )
ai.setType( t.getName());
ai.setSetMethod( sm.getName());
}
ai.setDescription("Introspected attribute " + name);
if( log.isDebugEnabled()) log.debug("Introspected attribute " +
name + " " + gm + " " + sm);
if( gm==null )
ai.setReadable(false);
if( sm==null )
ai.setWriteable(false);
if( sm!=null || gm!=null )
mbean.addAttribute(ai);
}
en=invokeAttMap.keys();