/** Replies the collection of the elements that must be generated after * the generation process of the current SARL element. * * <p>The differed generation element are the element's components that could be * generated after the complete JVM type is generated. They are extended the * JVM type definition with additionnal elements (annotations...) * * @return the original collection of elements. * @since 0.5 */ public List<Runnable> getPostFinalizationElements() { final GenerationContext prt = getParentContext(); if (prt != null) { return prt.getPostFinalizationElements(); } return this.postFinalization; }
final GenerationContext candidate = iterator.next(); if (Objects.equal(candidate.getTypeIdentifier(), context.getTypeIdentifier())) { runPostElements = candidate.getParentContext() == null; selectedContext = candidate;
/** {@inheritDoc}. * * <p>Overridden for: removing the existing associated body, and delaying the local type inference. */ @Override protected void setBody(JvmExecutable executable, XExpression expression) { final GenerationContext context = getContext( EcoreUtil2.getContainerOfType(executable, JvmType.class)); this.typeBuilder.removeExistingBody(executable); this.associator.associateLogicalContainer(expression, executable); if (expression != null) { if (context.getParentContext() == null) { context.getPostFinalizationElements().add(() -> { initializeLocalTypes(context, executable, expression); }); } else { initializeLocalTypes(context, executable, expression); } } else { initializeLocalTypes(context, executable, expression); } }
&& !source.isAbstract() && !container.isInterface() && (source.isStatic() || source.isFinal() || container.isFinal()) && context.getParentContext() == null && this.annotationFinder.findAnnotation(operation, Inline.class) == null) { context.getPostFinalizationElements().add(