/** * Assign the instrumentables and InstrumentManageables */ public void create( final Object object, final Context context ) throws Exception { if ( m_instrumentEnabled && object instanceof Instrumentable ) { final String instrumentableName = (String) context.get( "component.name" ); final Instrumentable instrumentable = (Instrumentable) object; instrumentable.setInstrumentableName( instrumentableName ); // Get the name from the instrumentable in case it was changed since being set above. m_instrumentManager.registerInstrumentable( instrumentable, instrumentable.getInstrumentableName() ); } if ( m_instrumentEnabled && object instanceof InstrumentManageable ) { ( (InstrumentManageable) object ).setInstrumentManager( m_instrumentManager ); } } }
( (InstrumentManageable)component ).setInstrumentManager( m_instrumentManager );