docs: protected void transform(final SarlBehaviorUnit source, JvmGenericType container) {
  		final GenerationContext context = getContext(container);
  		if (source.getName() != null && !Strings.isNullOrEmpty(source.getName().getSimpleName()) && context != null) {
  			final XExpression guard = source.getGuard();
  
  			final boolean isTrueGuard;
  
  			// Check the guard value
  			if (guard == null) {
  				isTrueGuard = true;
  			} else if (guard instanceof XBooleanLiteral) {
  				final XBooleanLiteral literal = (XBooleanLiteral) guard;
  				if (literal.isIsTrue()) {
  					isTrueGuard = true;
  				} else {
  					// The guard is always false => no need to generate the code
  					return;
  				}
  			} else {
  				isTrueGuard = false;
  			}
  
  			final JvmTypeReference voidType = this._typeReferenceBuilder.typeRef(Void.TYPE);
  
  			//----------------
  			// Body function
  			//----------------
  			// Name
  			final String bodyMethodName = Utils.createNameForHiddenEventHandlerMethod(source.getName().getSimpleName(),
  					context.getBehaviorUnitIndex());
  			// Operation
  			final JvmOperation bodyOperation = this.typesFactory.createJvmOperation();
  			bodyOperation.setAbstract(false);
  			bodyOperation.setNative(false);
  			bodyOperation.setSynchronized(false);
  			bodyOperation.setStrictFloatingPoint(false);
  			bodyOperation.setFinal(false);
  			bodyOperation.setVisibility(JvmVisibility.PRIVATE);
  			bodyOperation.setStatic(false);
  			bodyOperation.setSimpleName(bodyMethodName);
  			bodyOperation.setReturnType(voidType);
  			// Add to container
  			container.getMembers().add(bodyOperation);
  			this.associator.associatePrimary(source, bodyOperation);
  			// First parameter: occurrence
  			JvmFormalParameter jvmParam = this.typesFactory.createJvmFormalParameter();
  			jvmParam.setName(this.grammarKeywordAccess.getOccurrenceKeyword());
  			jvmParam.setParameterType(this.typeBuilder.cloneWithProxies(source.getName()));
  			this.associator.associate(source, jvmParam);
  			bodyOperation.getParameters().add(jvmParam);
  			// Body
  			setBody(bodyOperation, source.getExpression());
  			// Annotations
  			translateAnnotationsTo(source.getAnnotations(), bodyOperation);
  			if (context.getGeneratorConfig2().isGeneratePureAnnotation()
  					&& !this.services.getExpressionHelper().hasSideEffects(source.getExpression())) {
  				addAnnotationSafe(bodyOperation, Pure.class);
  			}
  
  			final Collection<Procedure1<? super ITreeAppendable>> evaluators = context.getGuardEvalationCodeFor(source);
  			assert evaluators != null;
  
  			if (isTrueGuard) {
  				evaluators.add(it -> {
  					it.append(RUNNABLE_COLLECTION);
  					it.append(".add(() -> "); //$NON-NLS-1$
  					it.append(bodyMethodName);
  					it.append("("); //$NON-NLS-1$
  					it.append(this.grammarKeywordAccess.getOccurrenceKeyword());
  					it.append("));"); //$NON-NLS-1$
  				});
  			} else {
  				assert guard != null;
  
  				//----------------
  				// Guard function
  				//----------------
  				// Name
  				final String guardMethodName = Utils.createNameForHiddenGuardEvaluatorMethod(source.getName().getSimpleName(),
  						context.getBehaviorUnitIndex());
  				// Operation
  				final JvmOperation guardOperation = this.typesFactory.createJvmOperation();
  				guardOperation.setAbstract(false);
  				guardOperation.setNative(false);
  				guardOperation.setSynchronized(false);
  				guardOperation.setStrictFloatingPoint(false);
  				guardOperation.setFinal(false);
  				guardOperation.setVisibility(JvmVisibility.PRIVATE);
  				guardOperation.setStatic(false);
  				guardOperation.setSimpleName(guardMethodName);
  				guardOperation.setReturnType(this._typeReferenceBuilder.typeRef(Boolean.TYPE));
  				// Add to container
  				container.getMembers().add(guardOperation);
  				this.associator.associate(source, guardOperation);
  				this.associator.associatePrimary(guard, guardOperation);
  				// First parameter: it
  				jvmParam = this.typesFactory.createJvmFormalParameter();
  				jvmParam.setName(this.grammarKeywordAccess.getItKeyword());
  				jvmParam.setParameterType(this.typeBuilder.cloneWithProxies(source.getName()));
  				this.associator.associate(source, jvmParam);
  				guardOperation.getParameters().add(jvmParam);
  				// Second parameter: occurrence
  				jvmParam = this.typesFactory.createJvmFormalParameter();
  				jvmParam.setName(this.grammarKeywordAccess.getOccurrenceKeyword());
  				jvmParam.setParameterType(this.typeBuilder.cloneWithProxies(source.getName()));
  				this.associator.associate(source, jvmParam);
  				guardOperation.getParameters().add(jvmParam);
  				// Body
  				setBody(guardOperation, guard);
  				// Annotations
  				appendGeneratedAnnotation(guardOperation, context);
  				if (context.getGeneratorConfig2().isGeneratePureAnnotation()) {
  					addAnnotationSafe(guardOperation, Pure.class);
  				}
  
  				//------------------
  				// Handler function
  				//------------------
  				evaluators.add(it -> {
  					it.append("if ("); //$NON-NLS-1$
  					it.append(guardMethodName);
  					it.append("("); //$NON-NLS-1$
  					it.append(this.grammarKeywordAccess.getOccurrenceKeyword());
  					it.append(", "); //$NON-NLS-1$
  					it.append(this.grammarKeywordAccess.getOccurrenceKeyword());
  					it.append(")) {"); //$NON-NLS-1$
  					it.increaseIndentation();
  					it.newLine();
  					it.append(RUNNABLE_COLLECTION);
  					it.append(".add(() -> "); //$NON-NLS-1$
  					it.append(bodyMethodName);
  					it.append("("); //$NON-NLS-1$
  					it.append(this.grammarKeywordAccess.getOccurrenceKeyword());
  					it.append("));"); //$NON-NLS-1$
  					it.decreaseIndentation();
  					it.newLine();
  					it.append("}"); //$NON-NLS-1$
  				});
  			}
  
  			context.setBehaviorUnitIndex(context.getBehaviorUnitIndex() + 1);
  			context.incrementSerial(bodyMethodName.hashCode());
  		} else {
  			logInternalError(Messages.SARLJvmModelInferrer_10);
  		}
  	}