Examples of JvmTypeReference


Examples of org.eclipse.xtext.common.types.JvmTypeReference

   * Gives scope and live to the expression.
   */
  protected JvmOperation toRouteConditionMethod(final Route route) {
    String _nameOfRouteMethod = this.nameOfRouteMethod(route);
    String _plus = (_nameOfRouteMethod + "Condition");
    JvmTypeReference _typeRef = this._typeReferenceBuilder.typeRef(Boolean.TYPE);
    final Procedure1<JvmOperation> _function = new Procedure1<JvmOperation>() {
      public void apply(final JvmOperation it) {
        EList<JvmFormalParameter> _parameters = it.getParameters();
        JvmTypeReference _typeRef = RouteJvmModelInferrer.this._typeReferenceBuilder.typeRef(RouteJvmModelInferrer.HTTP_REQUEST);
        JvmFormalParameter _parameter = RouteJvmModelInferrer.this._jvmTypesBuilder.toParameter(route, "request", _typeRef);
        RouteJvmModelInferrer.this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters, _parameter);
        EList<JvmFormalParameter> _parameters_1 = it.getParameters();
        JvmTypeReference _typeRef_1 = RouteJvmModelInferrer.this._typeReferenceBuilder.typeRef(RouteJvmModelInferrer.HTTP_RESPONSE);
        JvmFormalParameter _parameter_1 = RouteJvmModelInferrer.this._jvmTypesBuilder.toParameter(route, "response", _typeRef_1);
        RouteJvmModelInferrer.this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters_1, _parameter_1);
        URL _url = route.getUrl();
        EList<Variable> _variables = _url.getVariables();
        for (final Variable variable : _variables) {
          EList<JvmFormalParameter> _parameters_2 = it.getParameters();
          String _name = variable.getName();
          JvmTypeReference _typeRef_2 = RouteJvmModelInferrer.this._typeReferenceBuilder.typeRef(String.class);
          JvmFormalParameter _parameter_2 = RouteJvmModelInferrer.this._jvmTypesBuilder.toParameter(variable, _name, _typeRef_2);
          RouteJvmModelInferrer.this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters_2, _parameter_2);
        }
        XExpression _condition = route.getCondition();
        RouteJvmModelInferrer.this._jvmTypesBuilder.setBody(it, _condition);
View Full Code Here

Examples of org.eclipse.xtext.common.types.JvmTypeReference

 
  /**
   * Creates a servlet request handling method for the given routes
   */
  protected JvmOperation toRequestHandlerMethod(final Model model, final String name, final Iterable<Route> routes) {
    JvmTypeReference _typeRef = this._typeReferenceBuilder.typeRef(Void.TYPE);
    final Procedure1<JvmOperation> _function = new Procedure1<JvmOperation>() {
      public void apply(final JvmOperation it) {
        EList<JvmAnnotationReference> _annotations = it.getAnnotations();
        JvmAnnotationReference _annotationRef = RouteJvmModelInferrer.this._annotationTypesBuilder.annotationRef(Override.class);
        RouteJvmModelInferrer.this._jvmTypesBuilder.<JvmAnnotationReference>operator_add(_annotations, _annotationRef);
        EList<JvmFormalParameter> _parameters = it.getParameters();
        JvmTypeReference _typeRef = RouteJvmModelInferrer.this._typeReferenceBuilder.typeRef(RouteJvmModelInferrer.HTTP_REQUEST);
        JvmFormalParameter _parameter = RouteJvmModelInferrer.this._jvmTypesBuilder.toParameter(model, "request", _typeRef);
        RouteJvmModelInferrer.this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters, _parameter);
        EList<JvmFormalParameter> _parameters_1 = it.getParameters();
        JvmTypeReference _typeRef_1 = RouteJvmModelInferrer.this._typeReferenceBuilder.typeRef(RouteJvmModelInferrer.HTTP_RESPONSE);
        JvmFormalParameter _parameter_1 = RouteJvmModelInferrer.this._jvmTypesBuilder.toParameter(model, "response", _typeRef_1);
        RouteJvmModelInferrer.this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters_1, _parameter_1);
        StringConcatenationClient _client = new StringConcatenationClient() {
          @Override
          protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
View Full Code Here

Examples of org.eclipse.xtext.common.types.JvmTypeReference

    final Procedure1<JvmGenericType> _function = new Procedure1<JvmGenericType>() {
      public void apply(final JvmGenericType it) {
        String _documentation = GuiceModulesJvmModelInferrer.this.builder.getDocumentation(module);
        GuiceModulesJvmModelInferrer.this.builder.setDocumentation(it, _documentation);
        EList<JvmTypeReference> _superTypes = it.getSuperTypes();
        JvmTypeReference _typeRef = GuiceModulesJvmModelInferrer.this._typeReferenceBuilder.typeRef(Module.class);
        GuiceModulesJvmModelInferrer.this.builder.<JvmTypeReference>operator_add(_superTypes, _typeRef);
        EList<ModuleAST> _mixins = module.getMixins();
        for (final ModuleAST mixin : _mixins) {
          boolean _eIsProxy = mixin.eIsProxy();
          boolean _not = (!_eIsProxy);
          if (_not) {
            EList<JvmMember> _members = it.getMembers();
            String _simpleName = GuiceModulesJvmModelInferrer.this.simpleName(mixin);
            QualifiedName _fullyQualifiedName = GuiceModulesJvmModelInferrer.this._iQualifiedNameProvider.getFullyQualifiedName(mixin);
            String _string = _fullyQualifiedName.toString();
            JvmTypeReference _newTypeRef = GuiceModulesJvmModelInferrer.this.builder.newTypeRef(it, _string);
            final Procedure1<JvmField> _function = new Procedure1<JvmField>() {
              public void apply(final JvmField it) {
                StringConcatenationClient _client = new StringConcatenationClient() {
                  @Override
                  protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
                    _builder.append("new ");
                    String _name = mixin.getName();
                    _builder.append(_name, "");
                    _builder.append("()");
                  }
                };
                GuiceModulesJvmModelInferrer.this.builder.setInitializer(it, _client);
              }
            };
            JvmField _field = GuiceModulesJvmModelInferrer.this.builder.toField(mixin, _simpleName, _newTypeRef, _function);
            GuiceModulesJvmModelInferrer.this.builder.<JvmField>operator_add(_members, _field);
          }
        }
        EList<BindingAST> _bindings = module.getBindings();
        for (final BindingAST binding : _bindings) {
          {
            XExpression _toInstance = binding.getToInstance();
            boolean _notEquals = (!Objects.equal(_toInstance, null));
            if (_notEquals) {
              EList<JvmMember> _members_1 = it.getMembers();
              String _syntheticToInstanceName = GuiceModulesJvmModelInferrer.this.syntheticToInstanceName(binding);
              KeyAST _from = binding.getFrom();
              JvmTypeReference _type = _from.getType();
              final Procedure1<JvmOperation> _function_1 = new Procedure1<JvmOperation>() {
                public void apply(final JvmOperation it) {
                  it.setVisibility(JvmVisibility.PRIVATE);
                  XExpression _toInstance = binding.getToInstance();
                  GuiceModulesJvmModelInferrer.this.builder.setBody(it, _toInstance);
                }
              };
              JvmOperation _method = GuiceModulesJvmModelInferrer.this.builder.toMethod(binding, _syntheticToInstanceName, _type, _function_1);
              GuiceModulesJvmModelInferrer.this.builder.<JvmOperation>operator_add(_members_1, _method);
            }
            KeyAST _to = binding.getTo();
            XAnnotation _annotation = null;
            if (_to!=null) {
              _annotation=_to.getAnnotation();
            }
            boolean _notEquals_1 = (!Objects.equal(_annotation, null));
            if (_notEquals_1) {
              EList<JvmMember> _members_2 = it.getMembers();
              KeyAST _to_1 = binding.getTo();
              String _syntheticName = GuiceModulesJvmModelInferrer.this.syntheticName(_to_1);
              KeyAST _to_2 = binding.getTo();
              JvmTypeReference _type_1 = _to_2.getType();
              final Procedure1<JvmField> _function_2 = new Procedure1<JvmField>() {
                public void apply(final JvmField it) {
                  KeyAST _to = binding.getTo();
                  XAnnotation _annotation = _to.getAnnotation();
                  GuiceModulesJvmModelInferrer.this.builder.addAnnotation(it, _annotation);
                  it.setVisibility(JvmVisibility.PRIVATE);
                }
              };
              JvmField _field_1 = GuiceModulesJvmModelInferrer.this.builder.toField(binding, _syntheticName, _type_1, _function_2);
              GuiceModulesJvmModelInferrer.this.builder.<JvmField>operator_add(_members_2, _field_1);
            }
            KeyAST _from_1 = binding.getFrom();
            XAnnotation _annotation_1 = _from_1.getAnnotation();
            boolean _notEquals_2 = (!Objects.equal(_annotation_1, null));
            if (_notEquals_2) {
              EList<JvmMember> _members_3 = it.getMembers();
              KeyAST _from_2 = binding.getFrom();
              String _syntheticName_1 = GuiceModulesJvmModelInferrer.this.syntheticName(_from_2);
              KeyAST _from_3 = binding.getFrom();
              JvmTypeReference _type_2 = _from_3.getType();
              final Procedure1<JvmField> _function_3 = new Procedure1<JvmField>() {
                public void apply(final JvmField it) {
                  KeyAST _from = binding.getFrom();
                  XAnnotation _annotation = _from.getAnnotation();
                  GuiceModulesJvmModelInferrer.this.builder.addAnnotation(it, _annotation);
                  it.setVisibility(JvmVisibility.PRIVATE);
                }
              };
              JvmField _field_2 = GuiceModulesJvmModelInferrer.this.builder.toField(binding, _syntheticName_1, _type_2, _function_3);
              GuiceModulesJvmModelInferrer.this.builder.<JvmField>operator_add(_members_3, _field_2);
            }
          }
        }
        EList<JvmMember> _members_1 = it.getMembers();
        JvmTypeReference _typeRef_1 = GuiceModulesJvmModelInferrer.this._typeReferenceBuilder.typeRef(void.class);
        final Procedure1<JvmOperation> _function_1 = new Procedure1<JvmOperation>() {
          public void apply(final JvmOperation it) {
            EList<JvmFormalParameter> _parameters = it.getParameters();
            JvmTypeReference _typeRef = GuiceModulesJvmModelInferrer.this._typeReferenceBuilder.typeRef(Binder.class);
            JvmFormalParameter _parameter = GuiceModulesJvmModelInferrer.this.builder.toParameter(module, "binder", _typeRef);
            GuiceModulesJvmModelInferrer.this.builder.<JvmFormalParameter>operator_add(_parameters, _parameter);
            StringConcatenationClient _client = new StringConcatenationClient() {
              @Override
              protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
                _builder.append("configure(binder, new ");
                _builder.append(HashSet.class, "");
                _builder.append("<");
                JvmTypeReference _wildcard = GuiceModulesJvmModelInferrer.this._typeReferenceBuilder.wildcard();
                JvmTypeReference _typeRef = GuiceModulesJvmModelInferrer.this._typeReferenceBuilder.typeRef(Key.class, _wildcard);
                _builder.append(_typeRef, "");
                _builder.append(">());");
                _builder.newLineIfNotEmpty();
              }
            };
            GuiceModulesJvmModelInferrer.this.builder.setBody(it, _client);
          }
        };
        JvmOperation _method = GuiceModulesJvmModelInferrer.this.builder.toMethod(module, "configure", _typeRef_1, _function_1);
        GuiceModulesJvmModelInferrer.this.builder.<JvmOperation>operator_add(_members_1, _method);
        EList<JvmMember> _members_2 = it.getMembers();
        JvmTypeReference _typeRef_2 = GuiceModulesJvmModelInferrer.this._typeReferenceBuilder.typeRef(void.class);
        final Procedure1<JvmOperation> _function_2 = new Procedure1<JvmOperation>() {
          public void apply(final JvmOperation it) {
            GuiceModulesJvmModelInferrer.this.builder.setDocumentation(it, "Registers bindings for keys not present in the given set.");
            EList<JvmFormalParameter> _parameters = it.getParameters();
            JvmTypeReference _typeRef = GuiceModulesJvmModelInferrer.this._typeReferenceBuilder.typeRef(Binder.class);
            JvmFormalParameter _parameter = GuiceModulesJvmModelInferrer.this.builder.toParameter(module, "bind", _typeRef);
            GuiceModulesJvmModelInferrer.this.builder.<JvmFormalParameter>operator_add(_parameters, _parameter);
            EList<JvmFormalParameter> _parameters_1 = it.getParameters();
            JvmTypeReference _wildcard = GuiceModulesJvmModelInferrer.this._typeReferenceBuilder.wildcard();
            JvmTypeReference _typeRef_1 = GuiceModulesJvmModelInferrer.this._typeReferenceBuilder.typeRef(Key.class, _wildcard);
            JvmTypeReference _typeRef_2 = GuiceModulesJvmModelInferrer.this._typeReferenceBuilder.typeRef(Set.class, _typeRef_1);
            JvmFormalParameter _parameter_1 = GuiceModulesJvmModelInferrer.this.builder.toParameter(module, "usedKeys", _typeRef_2);
            GuiceModulesJvmModelInferrer.this.builder.<JvmFormalParameter>operator_add(_parameters_1, _parameter_1);
            StringConcatenationClient _client = new StringConcatenationClient() {
              @Override
              protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
                _builder.append("try {");
                _builder.newLine();
                {
                  EList<BindingAST> _bindings = module.getBindings();
                  for(final BindingAST b : _bindings) {
                    _builder.append("\t");
                    _builder.append("{");
                    _builder.newLine();
                    _builder.append("\t");
                    _builder.append("\t");
                    KeyAST _from = b.getFrom();
                    JvmTypeReference _type = _from.getType();
                    JvmTypeReference _typeRef = GuiceModulesJvmModelInferrer.this._typeReferenceBuilder.typeRef(Key.class, _type);
                    _builder.append(_typeRef, "\t\t");
                    _builder.append(" key = ");
                    KeyAST _from_1 = b.getFrom();
                    StringConcatenationClient _guiceKey = GuiceModulesJvmModelInferrer.this.guiceKey(_from_1);
                    _builder.append(_guiceKey, "\t\t");
View Full Code Here

Examples of org.eclipse.xtext.common.types.JvmTypeReference

      protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
        _builder.append(Key.class, "");
        _builder.append(".get(new ");
        _builder.append(TypeLiteral.class, "");
        _builder.append("<");
        JvmTypeReference _type = it.getType();
        _builder.append(_type, "");
        _builder.append(">(){}");
        {
          XAnnotation _annotation = it.getAnnotation();
          boolean _notEquals = (!Objects.equal(_annotation, null));
View Full Code Here

Examples of org.eclipse.xtext.common.types.JvmTypeReference

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetType(JvmTypeReference newType, NotificationChain msgs)
  {
    JvmTypeReference oldType = type;
    type = newType;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TemplatePackage.PARAMETER__TYPE, oldType, newType);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of org.eclipse.xtext.common.types.JvmTypeReference

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetReturnType(JvmTypeReference newReturnType, NotificationChain msgs)
  {
    JvmTypeReference oldReturnType = returnType;
    returnType = newReturnType;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, TortoiseShellPackage.SUB_PROGRAM__RETURN_TYPE, oldReturnType, newReturnType);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of org.eclipse.xtext.common.types.JvmTypeReference

    final String simpleName = Strings.lastToken(qualifiedName, ".");
    JvmGenericType _class = this._jvmTypesBuilder.toClass(file, qualifiedName);
    final Procedure1<JvmGenericType> _function = new Procedure1<JvmGenericType>() {
      public void apply(final JvmGenericType it) {
        EList<JvmTypeReference> _superTypes = it.getSuperTypes();
        JvmTypeReference _typeRef = BuildDSLJvmModelInferrer.this._typeReferenceBuilder.typeRef(BuildScript.class);
        BuildDSLJvmModelInferrer.this._jvmTypesBuilder.<JvmTypeReference>operator_add(_superTypes, _typeRef);
        Iterable<Parameter> _parameters = BuildDSLJvmModelInferrer.this.getParameters(file);
        for (final Parameter declaredParameter : _parameters) {
          {
            JvmTypeReference _elvis = null;
            JvmTypeReference _elvis_1 = null;
            JvmTypeReference _type = declaredParameter.getType();
            if (_type != null) {
              _elvis_1 = _type;
            } else {
              XExpression _init = null;
              if (declaredParameter!=null) {
                _init=declaredParameter.getInit();
              }
              JvmTypeReference _inferredType = null;
              if (_init!=null) {
                _inferredType=BuildDSLJvmModelInferrer.this._jvmTypesBuilder.inferredType(_init);
              }
              _elvis_1 = _inferredType;
            }
            if (_elvis_1 != null) {
              _elvis = _elvis_1;
            } else {
              JvmTypeReference _typeRef_1 = BuildDSLJvmModelInferrer.this._typeReferenceBuilder.typeRef(String.class);
              _elvis = _typeRef_1;
            }
            final JvmTypeReference type = _elvis;
            EList<JvmMember> _members = it.getMembers();
            String _name = declaredParameter.getName();
            final Procedure1<JvmField> _function = new Procedure1<JvmField>() {
              public void apply(final JvmField it) {
                it.setVisibility(JvmVisibility.PUBLIC);
                EList<JvmAnnotationReference> _annotations = it.getAnnotations();
                JvmAnnotationReference _annotation = BuildDSLJvmModelInferrer.this._jvmTypesBuilder.toAnnotation(declaredParameter, Param.class);
                BuildDSLJvmModelInferrer.this._jvmTypesBuilder.<JvmAnnotationReference>operator_add(_annotations, _annotation);
                XExpression _init = declaredParameter.getInit();
                BuildDSLJvmModelInferrer.this._jvmTypesBuilder.setInitializer(it, _init);
              }
            };
            JvmField _field = BuildDSLJvmModelInferrer.this._jvmTypesBuilder.toField(declaredParameter, _name, type, _function);
            BuildDSLJvmModelInferrer.this._jvmTypesBuilder.<JvmField>operator_add(_members, _field);
          }
        }
        JvmTypeReference _typeRef_1 = BuildDSLJvmModelInferrer.this._typeReferenceBuilder.typeRef(String.class);
        final JvmTypeReference stringArray = BuildDSLJvmModelInferrer.this._jvmTypesBuilder.addArrayTypeDimension(_typeRef_1);
        EList<JvmMember> _members = it.getMembers();
        JvmTypeReference _typeRef_2 = BuildDSLJvmModelInferrer.this._typeReferenceBuilder.typeRef(Void.TYPE);
        final Procedure1<JvmOperation> _function = new Procedure1<JvmOperation>() {
          public void apply(final JvmOperation it) {
            EList<JvmFormalParameter> _parameters = it.getParameters();
            JvmFormalParameter _parameter = BuildDSLJvmModelInferrer.this._jvmTypesBuilder.toParameter(it, "args", stringArray);
            BuildDSLJvmModelInferrer.this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters, _parameter);
            it.setVarArgs(true);
            it.setStatic(true);
            StringConcatenationClient _client = new StringConcatenationClient() {
              @Override
              protected void appendTo(StringConcatenationClient.TargetStringConcatenation _builder) {
                _builder.append(simpleName, "");
                _builder.append(" script = new ");
                _builder.append(simpleName, "");
                _builder.append("();");
                _builder.newLineIfNotEmpty();
                _builder.append("if (script.showHelp(args)) {");
                _builder.newLine();
                _builder.append("\t");
                _builder.append("System.exit(HELP);");
                _builder.newLine();
                _builder.append("}");
                _builder.newLine();
                _builder.append("System.exit(script.doBuild(args));");
                _builder.newLine();
              }
            };
            BuildDSLJvmModelInferrer.this._jvmTypesBuilder.setBody(it, _client);
          }
        };
        JvmOperation _method = BuildDSLJvmModelInferrer.this._jvmTypesBuilder.toMethod(file, "main", _typeRef_2, _function);
        BuildDSLJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
        EList<JvmMember> _members_1 = it.getMembers();
        Iterable<Task> _tasks = BuildDSLJvmModelInferrer.this.getTasks(file);
        final Function1<Task, JvmOperation> _function_1 = new Function1<Task, JvmOperation>() {
          public JvmOperation apply(final Task task) {
            String _methodName = BuildDSLJvmModelInferrer.this.getMethodName(task);
            JvmTypeReference _typeRef = BuildDSLJvmModelInferrer.this._typeReferenceBuilder.typeRef(Void.TYPE);
            final Procedure1<JvmOperation> _function = new Procedure1<JvmOperation>() {
              public void apply(final JvmOperation it) {
                it.setVisibility(JvmVisibility.PROTECTED);
                EList<JvmAnnotationReference> _annotations = it.getAnnotations();
                EList<Task> _depends = task.getDepends();
View Full Code Here

Examples of org.eclipse.xtext.common.types.JvmTypeReference

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetType(JvmTypeReference newType, NotificationChain msgs)
  {
    JvmTypeReference oldType = type;
    type = newType;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, ModelQueryLanguagePackage.XMETHOD_DECLARATION__TYPE, oldType, newType);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

Examples of org.eclipse.xtext.common.types.JvmTypeReference

    JvmGenericType _class = this._jvmTypesBuilder.toClass(model, IModelQueryConstants.INFERRED_CLASS_NAME);
    IPostIndexingInitializing<JvmGenericType> _accept = acceptor.<JvmGenericType>accept(_class);
    final Procedure1<JvmGenericType> _function = new Procedure1<JvmGenericType>() {
        public void apply(final JvmGenericType it) {
          EList<JvmMember> _members = it.getMembers();
          JvmTypeReference _typeForName = ModelQueryLanguageJvmModelInferrer.this._typeReferences.getTypeForName(IResourceDescriptions.class, model);
          JvmField _field = ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.toField(model, IModelQueryConstants.INDEX, _typeForName);
          ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.<JvmField>operator_add(_members, _field);
          EList<JvmMember> _members_1 = it.getMembers();
          JvmTypeReference _typeForName_1 = ModelQueryLanguageJvmModelInferrer.this._typeReferences.getTypeForName(ResourceSet.class, model);
          JvmField _field_1 = ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.toField(model, IModelQueryConstants.RESOURCESET, _typeForName_1);
          ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.<JvmField>operator_add(_members_1, _field_1);
          EList<JvmMember> _members_2 = it.getMembers();
          JvmTypeReference _typeForName_2 = ModelQueryLanguageJvmModelInferrer.this._typeReferences.getTypeForName(Injector.class, model);
          JvmField _field_2 = ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.toField(model, IModelQueryConstants.INJECTOR, _typeForName_2);
          ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.<JvmField>operator_add(_members_2, _field_2);
          EList<JvmMember> _members_3 = it.getMembers();
          JvmTypeReference _typeForName_3 = ModelQueryLanguageJvmModelInferrer.this._typeReferences.getTypeForName(Void.TYPE, model);
          final Procedure1<JvmOperation> _function = new Procedure1<JvmOperation>() {
              public void apply(final JvmOperation it) {
                XBlockExpression _body = model.getBody();
                ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.setBody(it, _body);
                EList<JvmTypeReference> _exceptions = it.getExceptions();
                JvmTypeReference _typeForName = ModelQueryLanguageJvmModelInferrer.this._typeReferences.getTypeForName(Exception.class, model);
                ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.<JvmTypeReference>operator_add(_exceptions, _typeForName);
              }
            };
          JvmOperation _method = ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.toMethod(model, "main", _typeForName_3, _function);
          ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members_3, _method);
          EList<XMethodDeclaration> _methods = model.getMethods();
          for (final XMethodDeclaration op : _methods) {
            EList<JvmMember> _members_4 = it.getMembers();
            String _name = op.getName();
            JvmTypeReference _elvis = null;
            JvmTypeReference _type = op.getType();
            if (_type != null) {
              _elvis = _type;
            } else {
              JvmTypeReference _inferredType = ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.inferredType();
              _elvis = ObjectExtensions.<JvmTypeReference>operator_elvis(_type, _inferredType);
            }
            final Procedure1<JvmOperation> _function_1 = new Procedure1<JvmOperation>() {
                public void apply(final JvmOperation it) {
                  EList<JvmFormalParameter> _parameters = op.getParameters();
                  for (final JvmFormalParameter p : _parameters) {
                    EList<JvmFormalParameter> _parameters_1 = it.getParameters();
                    String _name = p.getName();
                    JvmTypeReference _parameterType = p.getParameterType();
                    JvmFormalParameter _parameter = ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.toParameter(p, _name, _parameterType);
                    ModelQueryLanguageJvmModelInferrer.this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters_1, _parameter);
                  }
                  EList<JvmTypeParameter> _typeParameters = op.getTypeParameters();
                  ModelQueryLanguageJvmModelInferrer.this.copyAndFixTypeParameters(_typeParameters, it);
View Full Code Here

Examples of org.eclipse.xtext.common.types.JvmTypeReference

   * <!-- end-user-doc -->
   * @generated
   */
  public NotificationChain basicSetReturnType(JvmTypeReference newReturnType, NotificationChain msgs)
  {
    JvmTypeReference oldReturnType = returnType;
    returnType = newReturnType;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, JexTestPackage.METHOD__RETURN_TYPE, oldReturnType, newReturnType);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.