container/services/src/main/java/org/mobicents/slee/container/deployment/ConcreteSbbGenerator.java
protected void createGetProfileCMPMethods(
			Collection<GetProfileCMPMethodDescriptor> cmpProfiles) {
		if (cmpProfiles == null) {
			if (logger.isTraceEnabled()) {
	            logger.trace("no CMP Profile method implementation to generate.");
			}
			return;
		}
		for (GetProfileCMPMethodDescriptor cmpProfile : cmpProfiles) {
			String methodName = cmpProfile.getProfileCmpMethodName();
			CtMethod method = (CtMethod) abstractMethods.get(methodName);
			if (method == null)
				method = (CtMethod) superClassesAbstractMethods.get(methodName);
			if (method != null)
				try {
					// copy method from abstract to concrete class
					CtMethod concreteMethod = CtNewMethod.copy(method,
							sbbConcreteClass, null);
					// create the method body
					String concreteMethodBody = "{ return "
							+ SbbAbstractMethodHandler.class.getName()
							+ ".getProfileCMPMethod(sbbEntity,\"" + methodName
							+ "\",$1); }";
					if (logger.isTraceEnabled()) {
			            logger.trace("Generated method " + methodName
								+ " , body = " + concreteMethodBody);
					}
					concreteMethod.setBody(concreteMethodBody);
					sbbConcreteClass.addMethod(concreteMethod);
				} catch (CannotCompileException cce) {
					throw new SLEEException("Cannot compile method "
							+ method.getName(), cce);
				}
		}
	}
protected void createGetProfileCMPMethods(
			Collection<GetProfileCMPMethodDescriptor> cmpProfiles) {
		if (cmpProfiles == null) {
			if (logger.isTraceEnabled()) {
	            logger.trace("no CMP Profile method implementation to generate.");
			}
			return;
		}
		for (GetProfileCMPMethodDescriptor cmpProfile : cmpProfiles) {
			String methodName = cmpProfile.getProfileCmpMethodName();
			CtMethod method = (CtMethod) abstractMethods.get(methodName);
			if (method == null)
				method = (CtMethod) superClassesAbstractMethods.get(methodName);
			if (method != null)
				try {
					// copy method from abstract to concrete class
					CtMethod concreteMethod = CtNewMethod.copy(method,
							sbbConcreteClass, null);
					// create the method body
					String concreteMethodBody = "{ return "
							+ SbbAbstractMethodHandler.class.getName()
							+ ".getProfileCMPMethod(sbbEntity,\"" + methodName
							+ "\",$1); }";
					if (logger.isTraceEnabled()) {
			            logger.trace("Generated method " + methodName
								+ " , body = " + concreteMethodBody);
					}
					concreteMethod.setBody(concreteMethodBody);
					sbbConcreteClass.addMethod(concreteMethod);
				} catch (CannotCompileException cce) {
					throw new SLEEException("Cannot compile method "
							+ method.getName(), cce);
				}
		}
	}
protected void createGetProfileCMPMethods ( Collection < GetProfileCMPMethodDescriptor > cmpProfiles ) { if ( cmpProfiles == null ) { if ( logger . isTraceEnabled ( ) ) { logger . trace ( "no CMP Profile method implementation to generate." ) ; } return ; } for ( GetProfileCMPMethodDescriptor cmpProfile : cmpProfiles ) { String methodName = cmpProfile . getProfileCmpMethodName ( ) ; CtMethod method = ( CtMethod ) abstractMethods . get ( methodName ) ; if ( method == null ) method = ( CtMethod ) superClassesAbstractMethods . get ( methodName ) ; if ( method != null ) try { // copy method from abstract to concrete class CtMethod concreteMethod = CtNewMethod . copy ( method , sbbConcreteClass , null ) ; // create the method body String concreteMethodBody = "{ return " + SbbAbstractMethodHandler . class . getName ( ) + ".getProfileCMPMethod(sbbEntity,\"" + methodName + "\",$1); }" ; if ( logger . isTraceEnabled ( ) ) { logger . trace ( "Generated method " + methodName + " , body = " + concreteMethodBody ) ; } concreteMethod . setBody ( concreteMethodBody ) ; sbbConcreteClass . addMethod ( concreteMethod ) ; } catch ( CannotCompileException cce ) { throw new SLEEException ( "Cannot compile method " + method . getName ( ) , cce ) ; } } }
Create the get profile CMP method (this method redirects the call to a
profile cmp interceptor)

@param cmpProfiles
the CMP Profiles method to add to the concrete class
Create the get profile CMP method ( this method redirects the call to a profile cmp interceptor )