public void generateClass() throws Exception {
		
		ProfileSpecificationDescriptor descriptor = component.getDescriptor();
		ClassPool pool = component.getClassPool();
				
		String profileCmpInterfaceName = descriptor.getProfileCMPInterface().getProfileCmpInterfaceName();
		String wrapperClassName =  profileCmpInterfaceName + "Slee10Wrapper" ;
		CtClass profileCmpInterface = null;
		CtClass wrapperClass = null;
		try {
			profileCmpInterface = pool.get(profileCmpInterfaceName);
			wrapperClass = pool.makeClass(wrapperClassName);
			wrapperClass.setSuperclass(pool.get(AbstractProfileCmpSlee10Wrapper.class.getName()));
			wrapperClass.addInterface(profileCmpInterface);			
		} catch (Exception e) {
			throw new SLEEException(e.getMessage(),e);
		}
		
		// implement only methods from profile cmp and management interface that are also on user defined local object interface
		Map<String, CtMethod> methodsToImplement = ClassUtils.getInterfaceMethodsFromInterface(profileCmpInterface);
		
	    // implement methods delegating to an object casted to the profile cmp concrete class generated by SLEE
	    String profileCmpConcreteClassName = component.getProfileCmpConcreteClass().getName();
	    for (CtMethod ctMethod : methodsToImplement.values()) {
			implementMethod(wrapperClass, ctMethod,"(("+profileCmpConcreteClassName+")profileObject.getProfileConcrete())");
		}
		// generate class file
		try {
			wrapperClass.writeFile(component.getDeploymentDir().getAbsolutePath());			
		}
		catch (Exception e) {
			throw new SLEEException(e.getMessage(), e);
		}
		finally {
			wrapperClass.defrost();
		}
		// load it and store it in the component
		try {			
			component.setProfileCmpSlee10WrapperClass(component.getClassLoader().loadClass(wrapperClassName));
		}
		catch (ClassNotFoundException e) {
			throw new SLEEException(e.getMessage(),e);
		}
	}
public void generateClass ( ) throws Exception { ProfileSpecificationDescriptor descriptor = component . getDescriptor ( ) ; ClassPool pool = component . getClassPool ( ) ; String profileCmpInterfaceName = descriptor . getProfileCMPInterface ( ) . getProfileCmpInterfaceName ( ) ; String wrapperClassName = profileCmpInterfaceName + "Slee10Wrapper" ; CtClass profileCmpInterface = null ; CtClass wrapperClass = null ; try { profileCmpInterface = pool . get ( profileCmpInterfaceName ) ; wrapperClass = pool . makeClass ( wrapperClassName ) ; wrapperClass . setSuperclass ( pool . get ( AbstractProfileCmpSlee10Wrapper . class . getName ( ) ) ) ; wrapperClass . addInterface ( profileCmpInterface ) ; } catch ( Exception e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } Map < String , CtMethod > methodsToImplement = ClassUtils . getInterfaceMethodsFromInterface ( profileCmpInterface ) ; String profileCmpConcreteClassName = component . getProfileCmpConcreteClass ( ) . getName ( ) ; for ( CtMethod ctMethod : methodsToImplement . values ( ) ) { implementMethod ( wrapperClass , ctMethod , "((" + profileCmpConcreteClassName + ")profileObject.getProfileConcrete())" ) ; } try { wrapperClass . writeFile ( component . getDeploymentDir ( ) . getAbsolutePath ( ) ) ; } catch ( Exception e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } finally { wrapperClass . defrost ( ) ; } try { component . setProfileCmpSlee10WrapperClass ( component . getClassLoader ( ) . loadClass ( wrapperClassName ) ) ; } catch ( ClassNotFoundException e ) { throw new SLEEException ( e . getMessage ( ) , e ) ; } }
@throws Exception