public void generateTypeParameterDeclaration(final JvmTypeParameterDeclarator it, final ITreeAppendable appendable, final GeneratorConfig config) { final Procedure1<LoopParams> _function = (LoopParams it_1) -> { it_1.setPrefix("<"); it_1.setSeparator(", "); it_1.setSuffix("> "); }; final Procedure1<JvmTypeParameter> _function_1 = (JvmTypeParameter it_1) -> { this.generateTypeParameterDeclaration(it_1, appendable, config); }; this._loopExtensions.<JvmTypeParameter>forEach(appendable, it.getTypeParameters(), _function, _function_1); }
public void generateAnnotation(final JvmAnnotationReference it, final ITreeAppendable appendable, final GeneratorConfig config) { appendable.append("@"); appendable.append(it.getAnnotation()); final Procedure1<LoopParams> _function = (LoopParams it_1) -> { it_1.setPrefix("("); it_1.setSeparator(", "); it_1.setSuffix(")"); }; final Procedure1<JvmAnnotationValue> _function_1 = (JvmAnnotationValue it_1) -> { this.toJava(it_1, appendable, config); }; this._loopExtensions.<JvmAnnotationValue>forEach(appendable, it.getExplicitValues(), _function, _function_1); }
/** * Uses curly braces and comma as delimiters. Doesn't use them for single valued iterables. */ public <T extends Object> void forEachWithShortcut(final ITreeAppendable appendable, final Iterable<T> elements, final Procedure1<? super T> procedure) { int _size = IterableExtensions.size(elements); boolean _equals = (_size == 1); if (_equals) { T _head = IterableExtensions.<T>head(elements); ObjectExtensions.<T>operator_doubleArrow(_head, procedure); } else { appendable.append("{"); final Procedure1<LoopParams> _function = (LoopParams it) -> { it.setPrefix(" "); it.setSeparator(", "); it.setSuffix(" "); }; this.<T>forEach(appendable, elements, _function, procedure); appendable.append("}"); } } }
public ITreeAppendable generateMembersInBody(final JvmDeclaredType it, final ITreeAppendable appendable, final GeneratorConfig config) { ITreeAppendable _xblockexpression = null; { appendable.append("{").increaseIndentation(); final Procedure1<LoopParams> _function = (LoopParams it_1) -> { final Function1<ITreeAppendable, ITreeAppendable> _function_1 = (ITreeAppendable it_2) -> { return it_2.newLine(); }; it_1.setSeparator(_function_1); }; final Procedure1<JvmMember> _function_1 = (JvmMember it_1) -> { final ITreeAppendable memberAppendable = this._treeAppendableUtil.traceWithComments(appendable, it_1); memberAppendable.openScope(); this.generateMember(it_1, memberAppendable, config); memberAppendable.closeScope(); }; this._loopExtensions.<JvmMember>forEach(appendable, this.getMembersToBeCompiled(it), _function, _function_1); _xblockexpression = appendable.decreaseIndentation().newLine().append("}"); } return _xblockexpression; }
this.generateEnumLiteral(it_1, childAppendable.trace(it_1), config); }; this._loopExtensions.<JvmEnumerationLiteral>forEach(childAppendable, it.getLiterals(), _function, _function_1); final Function1<JvmMember, Boolean> _function_2 = (JvmMember it_1) -> { return Boolean.valueOf((!(it_1 instanceof JvmEnumerationLiteral))); this.generateMember(it_1, childAppendable.trace(it_1), config); }; this._loopExtensions.<JvmMember>forEach(childAppendable, IterableExtensions.<JvmMember>filter(this.getMembersToBeCompiled(it), _function_2), _function_3, _function_4); childAppendable.decreaseIndentation().newLine().append("}"); ITreeAppendable _xifexpression = null;
memberAppendable.closeScope(); }; this._loopExtensions.<JvmField>forEach(appendable, fieldsWithInitializer, _function_1, _function_2); appendable.decreaseIndentation().newLine().append("}"); memberAppendable.closeScope(); }; this._loopExtensions.<JvmMember>forEach(appendable, this.getMembersToBeCompiled(it), _function_3, _function_4); _xblockexpression = appendable.decreaseIndentation().newLine().append("}");
this._loopExtensions.<JvmMember>forEach(childAppendable, this.getAddedDeclarations(it, anonymousClass), _function_2, _function_3); childAppendable.decreaseIndentation().newLine().append("}"); appendable.newLine();