@Override public ITreeAppendable compile(final JvmExecutable executable, final XExpression expression, final JvmTypeReference returnType, final ITreeAppendable appendable, final GeneratorConfig config) { ITreeAppendable _xblockexpression = null; { this.compileLocalTypeStubs(executable, appendable, config); _xblockexpression = super.compile(executable, expression, returnType, appendable, config); } return _xblockexpression; }
@Override public void doGenerate(final Resource input, final IFileSystemAccess fsa) { this.jvmModelGenerator.doGenerate(input, fsa); this.pluginXmlGenerator.doGenerate(input, fsa); } }
protected ITreeAppendable _generateModifier(final JvmDeclaredType it, final ITreeAppendable appendable, final GeneratorConfig config) { return this.generateVisibilityModifier(it, appendable); }
protected ITreeAppendable _generateBody(final JvmGenericType it, final ITreeAppendable appendable, final GeneratorConfig config) { ITreeAppendable _xblockexpression = null; { this.generateJavaDoc(it, appendable, config); final ITreeAppendable childAppendable = appendable.trace(it); this.generateAnnotations(it.getAnnotations(), childAppendable, true, config); this.generateModifier(it, childAppendable, config); boolean _isInterface = it.isInterface(); if (_isInterface) { childAppendable.append("interface "); } else { childAppendable.append("class "); } this._treeAppendableUtil.traceSignificant(childAppendable, it).append(this.makeJavaIdentifier(it.getSimpleName())); this.generateTypeParameterDeclaration(it, childAppendable, config); boolean _isEmpty = it.getTypeParameters().isEmpty(); if (_isEmpty) { childAppendable.append(" "); } this.generateExtendsClause(it, childAppendable, config); this.generateMembersInBody(it, childAppendable, config); ITreeAppendable _xifexpression = null; if (((!it.isAnonymous()) && (!(it.eContainer() instanceof JvmType)))) { _xifexpression = appendable.newLine(); } _xblockexpression = _xifexpression; } return _xblockexpression; }
boolean _tripleNotEquals = (_compilationStrategy != null); if (_tripleNotEquals) { Iterable<Issue> errors = this.getDirectErrorsOrLogicallyContainedErrors(op); boolean _isEmpty = IterableExtensions.isEmpty(errors); if (_isEmpty) { appendable.decreaseIndentation().newLine().append("}"); } else { this.generateBodyWithIssues(op, appendable, errors); boolean _tripleNotEquals_1 = (_compilationTemplate != null); if (_tripleNotEquals_1) { final Iterable<Issue> errors_1 = this.getDirectErrorsOrLogicallyContainedErrors(op); boolean _isEmpty_1 = IterableExtensions.isEmpty(errors_1); if (_isEmpty_1) { appendable.increaseIndentation().append("{").newLine(); this.appendCompilationTemplate(appendable, op); appendable.decreaseIndentation().newLine().append("}"); } else { this.generateBodyWithIssues(op, appendable, errors_1); this.compile(op, expression, returnType, appendable, config); appendable.decreaseIndentation().newLine().append("}"); } else { this.generateBodyWithIssues(op, appendable, errors_2);
_xifexpression = super.generateMembersInBody(it, appendable, config);
public Iterable<JvmMember> getMembersToBeCompiled(final JvmDeclaredType type) { if (type instanceof JvmEnumerationType) { return _getMembersToBeCompiled((JvmEnumerationType)type); } else if (type instanceof JvmGenericType) { return _getMembersToBeCompiled((JvmGenericType)type); } else if (type != null) { return _getMembersToBeCompiled(type); } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(type).toString()); } } }
public ITreeAppendable generateBody(final JvmDeclaredType it, final ITreeAppendable appendable, final GeneratorConfig config) { if (it instanceof JvmAnnotationType) { return _generateBody((JvmAnnotationType)it, appendable, config); } else if (it instanceof JvmEnumerationType) { return _generateBody((JvmEnumerationType)it, appendable, config); } else if (it instanceof JvmGenericType) { return _generateBody((JvmGenericType)it, appendable, config); } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(it, appendable, config).toString()); } }
public ITreeAppendable generateMember(final JvmMember it, final ITreeAppendable appendable, final GeneratorConfig config) { if (it instanceof JvmConstructor) { return _generateMember((JvmConstructor)it, appendable, config); } else if (it instanceof JvmOperation) { return _generateMember((JvmOperation)it, appendable, config); } else if (it instanceof JvmField) { return _generateMember((JvmField)it, appendable, config); } else if (it instanceof JvmDeclaredType) { return _generateMember((JvmDeclaredType)it, appendable, config); } else if (it != null) { return _generateMember(it, appendable, config); } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(it, appendable, config).toString()); } }
public ITreeAppendable generateModifier(final JvmMember it, final ITreeAppendable appendable, final GeneratorConfig config) { if (it instanceof JvmConstructor) { return _generateModifier((JvmConstructor)it, appendable, config); } else if (it instanceof JvmOperation) { return _generateModifier((JvmOperation)it, appendable, config); } else if (it instanceof JvmField) { return _generateModifier((JvmField)it, appendable, config); } else if (it instanceof JvmGenericType) { return _generateModifier((JvmGenericType)it, appendable, config); } else if (it instanceof JvmDeclaredType) { return _generateModifier((JvmDeclaredType)it, appendable, config); } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(it, appendable, config).toString()); } }
public void internalDoGenerate(final EObject type, final IFileSystemAccess fsa) { if (type instanceof JvmDeclaredType) { _internalDoGenerate((JvmDeclaredType)type, fsa); return; } else if (type != null) { _internalDoGenerate(type, fsa); return; } else { throw new IllegalArgumentException("Unhandled parameter types: " + Arrays.<Object>asList(type, fsa).toString()); } }
public void toJavaLiteral(final JvmAnnotationValue value, final ITreeAppendable appendable, final GeneratorConfig config) { if (value instanceof JvmAnnotationAnnotationValue) { _toJavaLiteral((JvmAnnotationAnnotationValue)value, appendable, config); return; } else if (value instanceof JvmBooleanAnnotationValue) { _toJavaLiteral((JvmBooleanAnnotationValue)value, appendable, config); return; } else if (value instanceof JvmByteAnnotationValue) { _toJavaLiteral((JvmByteAnnotationValue)value, appendable, config); return; } else if (value instanceof JvmCharAnnotationValue) { _toJavaLiteral((JvmCharAnnotationValue)value, appendable, config); return; } else if (value instanceof JvmCustomAnnotationValue) { _toJavaLiteral((JvmCustomAnnotationValue)value, appendable, config); return; } else if (value instanceof JvmDoubleAnnotationValue) { _toJavaLiteral((JvmDoubleAnnotationValue)value, appendable, config); return; } else if (value instanceof JvmEnumAnnotationValue) { _toJavaLiteral((JvmEnumAnnotationValue)value, appendable, config); return; } else if (value instanceof JvmFloatAnnotationValue) { _toJavaLiteral((JvmFloatAnnotationValue)value, appendable, config); return; } else if (value instanceof JvmIntAnnotationValue) { _toJavaLiteral((JvmIntAnnotationValue)value, appendable, config); return; } else if (value instanceof JvmLongAnnotationValue) { _toJavaLiteral((JvmLongAnnotationValue)value, appendable, config);
protected Iterable<JvmMember> _getMembersToBeCompiled(final JvmGenericType it) { Iterable<JvmMember> _xifexpression = null; boolean _isAnonymous = it.isAnonymous(); if (_isAnonymous) { final Function1<JvmMember, Boolean> _function = (JvmMember it_1) -> { return Boolean.valueOf((!(it_1 instanceof JvmConstructor))); }; _xifexpression = IterableExtensions.<JvmMember>filter(it.getMembers(), _function); } else { _xifexpression = this._getMembersToBeCompiled(((JvmDeclaredType) it)); } return _xifexpression; }
protected ITreeAppendable _generateModifier(final JvmConstructor it, final ITreeAppendable appendable, final GeneratorConfig config) { return this.generateVisibilityModifier(it, appendable); }
@Override public void doGenerate(final Resource input, final IFileSystemAccess fsa) { super.doGenerate(input, fsa); this.callMacroProcessors(input); }
@Override public ITreeAppendable generateVisibilityModifier(final JvmMember it, final ITreeAppendable result) { ITreeAppendable _xblockexpression = null; { JvmVisibility _visibility = it.getVisibility(); boolean _equals = Objects.equal(_visibility, JvmVisibility.PRIVATE); if (_equals) { JvmDeclaredType _declaringType = it.getDeclaringType(); boolean _tripleEquals = (_declaringType == null); if (_tripleEquals) { return result; } if ((it.getDeclaringType().isLocal() && (it instanceof JvmOperation))) { JvmDeclaredType _declaringType_1 = it.getDeclaringType(); final JvmGenericType declarator = ((JvmGenericType) _declaringType_1); boolean _isAnonymous = declarator.isAnonymous(); boolean _not = (!_isAnonymous); if (_not) { return result; } } } _xblockexpression = super.generateVisibilityModifier(it, result); } return _xblockexpression; }
protected ITreeAppendable _generateModifier(final JvmField it, final ITreeAppendable appendable, final GeneratorConfig config) { ITreeAppendable _xblockexpression = null; { this.generateVisibilityModifier(it, appendable); boolean _isStatic = it.isStatic(); if (_isStatic) { appendable.append("static "); } boolean _isFinal = it.isFinal(); if (_isFinal) { appendable.append("final "); } boolean _isTransient = it.isTransient(); if (_isTransient) { appendable.append("transient "); } ITreeAppendable _xifexpression = null; boolean _isVolatile = it.isVolatile(); if (_isVolatile) { _xifexpression = appendable.append("volatile "); } _xblockexpression = _xifexpression; } return _xblockexpression; }
protected ITreeAppendable _generateModifier(final JvmGenericType it, final ITreeAppendable appendable, final GeneratorConfig config) { ITreeAppendable _xblockexpression = null; { this.generateVisibilityModifier(it, appendable); boolean _isInterface = it.isInterface(); boolean _not = (!_isInterface); if (_not) { boolean _isStatic = it.isStatic(); if (_isStatic) { appendable.append("static "); } boolean _isAbstract = it.isAbstract(); if (_isAbstract) { appendable.append("abstract "); } } boolean _isFinal = it.isFinal(); if (_isFinal) { appendable.append("final "); } ITreeAppendable _xifexpression = null; boolean _isStrictFloatingPoint = it.isStrictFloatingPoint(); if (_isStrictFloatingPoint) { _xifexpression = appendable.append("strictfp "); } _xblockexpression = _xifexpression; } return _xblockexpression; }
protected ITreeAppendable _generateModifier(final JvmOperation it, final ITreeAppendable appendable, final GeneratorConfig config) { ITreeAppendable _xblockexpression = null; this.generateVisibilityModifier(it, appendable); boolean _isAbstract = it.isAbstract(); if (_isAbstract) {