@Check public void checkDeclaredExceptions(XtendConstructor constructor){ JvmConstructor jvmConstructor = associations.getInferredConstructor(constructor); if (jvmConstructor != null) { checkExceptions(constructor, jvmConstructor.getExceptions(), XtendPackage.Literals.XTEND_EXECUTABLE__EXCEPTIONS); } }
InternalEList<JvmTypeReference> exceptions = (InternalEList<JvmTypeReference>)result.getExceptions(); for (Type exceptionType : exceptionTypes) { exceptions.addUnique(createTypeReference(exceptionType));
InternalEList<JvmTypeReference> exceptions = (InternalEList<JvmTypeReference>)result.getExceptions(); for (Type exceptionType : exceptionTypes) { exceptions.addUnique(createTypeReference(exceptionType));
for (JvmTypeReference exception : superConstructor.getExceptions()) constructor.getExceptions().add(typesBuilder.cloneWithProxies(exception));
String _groupClassName = PatternGroupClassInferrer.this.groupClassName(model); it.setSimpleName(_groupClassName); EList<JvmTypeReference> _exceptions = it.getExceptions(); PatternGroupClassInferrer.this._eMFJvmTypesBuilder.<JvmTypeReference>operator_add(_exceptions, incQueryException); StringConcatenationClient _client = new StringConcatenationClient() {
protected SignatureHashBuilder appendSignature(JvmConstructor operation) { appendVisibility(operation.getVisibility()).appendTypeParameters(operation).append("("); for (JvmFormalParameter p : operation.getParameters()) { appendType(p.getParameterType()).append(" "); } append(") "); for (JvmTypeReference ex : operation.getExceptions()) { appendType(ex).append(" "); } return this; }
protected void transform(XtendConstructor source, JvmGenericType container) { JvmConstructor constructor = typesFactory.createJvmConstructor(); container.getMembers().add(constructor); associator.associatePrimary(source, constructor); JvmVisibility visibility = source.getVisibility(); constructor.setSimpleName(container.getSimpleName()); constructor.setVisibility(visibility); for (XtendParameter parameter : source.getParameters()) { translateParameter(constructor, parameter); } copyAndFixTypeParameters(source.getTypeParameters(), constructor); for (JvmTypeReference exception : source.getExceptions()) { constructor.getExceptions().add(jvmTypesBuilder.cloneWithProxies(exception)); } translateAnnotationsTo(source.getAnnotations(), constructor); setBody(constructor, source.getExpression()); jvmTypesBuilder.copyDocumentationTo(source, constructor); }
@Override public void apply(final JvmConstructor it) { String _matcherClassName = PatternMatcherClassInferrer.this._eMFPatternLanguageJvmModelInferrerUtil.matcherClassName(pattern); it.setSimpleName(_matcherClassName); EList<JvmAnnotationReference> _annotations = it.getAnnotations(); JvmAnnotationReference _annotationRef = PatternMatcherClassInferrer.this.annBuilder.annotationRef(Deprecated.class); PatternMatcherClassInferrer.this._eMFJvmTypesBuilder.<JvmAnnotationReference>operator_add(_annotations, _annotationRef); it.setVisibility(JvmVisibility.PUBLIC); CharSequence _javadocMatcherConstructorEngine = PatternMatcherClassInferrer.this._javadocInferrer.javadocMatcherConstructorEngine(pattern); String _string = _javadocMatcherConstructorEngine.toString(); PatternMatcherClassInferrer.this._eMFJvmTypesBuilder.setDocumentation(it, _string); EList<JvmFormalParameter> _parameters = it.getParameters(); JvmTypeReference _typeRef = PatternMatcherClassInferrer.this.builder.typeRef(IncQueryEngine.class); JvmFormalParameter _parameter = PatternMatcherClassInferrer.this._eMFJvmTypesBuilder.toParameter(pattern, "engine", _typeRef); PatternMatcherClassInferrer.this._eMFJvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters, _parameter); EList<JvmTypeReference> _exceptions = it.getExceptions(); JvmTypeReference _typeRef_1 = PatternMatcherClassInferrer.this.builder.typeRef(IncQueryException.class); PatternMatcherClassInferrer.this._eMFJvmTypesBuilder.<JvmTypeReference>operator_add(_exceptions, _typeRef_1); StringConcatenationClient _client = new StringConcatenationClient() { @Override protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { _builder.append("super(engine, querySpecification());"); } }; PatternMatcherClassInferrer.this._eMFJvmTypesBuilder.setBody(it, _client); } };
@Override public void apply(final JvmConstructor it) { String _matcherClassName = PatternMatcherClassInferrer.this._eMFPatternLanguageJvmModelInferrerUtil.matcherClassName(pattern); it.setSimpleName(_matcherClassName); EList<JvmAnnotationReference> _annotations = it.getAnnotations(); JvmAnnotationReference _annotationRef = PatternMatcherClassInferrer.this.annBuilder.annotationRef(Deprecated.class); PatternMatcherClassInferrer.this._eMFJvmTypesBuilder.<JvmAnnotationReference>operator_add(_annotations, _annotationRef); it.setVisibility(JvmVisibility.PUBLIC); CharSequence _javadocMatcherConstructorNotifier = PatternMatcherClassInferrer.this._javadocInferrer.javadocMatcherConstructorNotifier(pattern); String _string = _javadocMatcherConstructorNotifier.toString(); PatternMatcherClassInferrer.this._eMFJvmTypesBuilder.setDocumentation(it, _string); EList<JvmFormalParameter> _parameters = it.getParameters(); JvmTypeReference _typeRef = PatternMatcherClassInferrer.this.builder.typeRef(Notifier.class); JvmFormalParameter _parameter = PatternMatcherClassInferrer.this._eMFJvmTypesBuilder.toParameter(pattern, "emfRoot", _typeRef); PatternMatcherClassInferrer.this._eMFJvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters, _parameter); EList<JvmTypeReference> _exceptions = it.getExceptions(); JvmTypeReference _typeRef_1 = PatternMatcherClassInferrer.this.builder.typeRef(IncQueryException.class); PatternMatcherClassInferrer.this._eMFJvmTypesBuilder.<JvmTypeReference>operator_add(_exceptions, _typeRef_1); StringConcatenationClient _client = new StringConcatenationClient() { @Override protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) { _builder.append("this("); _builder.append(IncQueryEngine.class, ""); _builder.append(".on(emfRoot));"); } }; PatternMatcherClassInferrer.this._eMFJvmTypesBuilder.setBody(it, _client); } };
constructor.getExceptions().add(this.typeBuilder.cloneWithProxies(exception));