Examples of JvmTypeReference


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

    JvmOperation _method = this._jvmTypesBuilder.toMethod(operation, _name, _returnType, _function);
    return this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
  }
 
  protected JvmTypeReference getJvmType(final MongoProperty property) {
    JvmTypeReference _xifexpression = null;
    MongoBean _inlineType = property.getInlineType();
    boolean _notEquals = (!Objects.equal(_inlineType, null));
    if (_notEquals) {
      MongoBean _inlineType_1 = property.getInlineType();
      Set<EObject> _jvmElements = this.associations.getJvmElements(_inlineType_1);
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, MongoBeansPackage.MONGO_OPERATION__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

   * <!-- 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, RoutePackage.DEPENDENCY__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 basicSetType(JvmTypeReference newType, NotificationChain msgs)
  {
    JvmTypeReference oldType = type;
    type = newType;
    if (eNotificationRequired())
    {
      ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, BuildPackage.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

    final Procedure1<JvmGenericType> _function = new Procedure1<JvmGenericType>() {
      public void apply(final JvmGenericType it) {
        EList<Parameter> _params = element.getParams();
        for (final Parameter param : _params) {
          {
            JvmTypeReference _elvis = null;
            JvmTypeReference _elvis_1 = null;
            JvmTypeReference _type = param.getType();
            if (_type != null) {
              _elvis_1 = _type;
            } else {
              XExpression _defaultexp = param.getDefaultexp();
              JvmTypeReference _inferredType = null;
              if (_defaultexp!=null) {
                _inferredType=TemplateJvmModelInferrer.this._jvmTypesBuilder.inferredType(_defaultexp);
              }
              _elvis_1 = _inferredType;
            }
            if (_elvis_1 != null) {
              _elvis = _elvis_1;
            } else {
              JvmTypeReference _typeRef = TemplateJvmModelInferrer.this._typeReferenceBuilder.typeRef(String.class);
              _elvis = _typeRef;
            }
            final JvmTypeReference type = _elvis;
            EList<JvmMember> _members = it.getMembers();
            String _name = param.getName();
            final Procedure1<JvmField> _function = new Procedure1<JvmField>() {
              public void apply(final JvmField it) {
                XExpression _defaultexp = param.getDefaultexp();
                boolean _notEquals = (!Objects.equal(_defaultexp, null));
                if (_notEquals) {
                  XExpression _defaultexp_1 = param.getDefaultexp();
                  TemplateJvmModelInferrer.this._jvmTypesBuilder.setInitializer(it, _defaultexp_1);
                }
              }
            };
            JvmField _field = TemplateJvmModelInferrer.this._jvmTypesBuilder.toField(param, _name, type, _function);
            TemplateJvmModelInferrer.this._jvmTypesBuilder.<JvmField>operator_add(_members, _field);
            EList<JvmMember> _members_1 = it.getMembers();
            String _name_1 = param.getName();
            JvmOperation _setter = TemplateJvmModelInferrer.this._jvmTypesBuilder.toSetter(param, _name_1, type);
            TemplateJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members_1, _setter);
            EList<JvmMember> _members_2 = it.getMembers();
            String _name_2 = param.getName();
            JvmOperation _getter = TemplateJvmModelInferrer.this._jvmTypesBuilder.toGetter(param, _name_2, type);
            TemplateJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members_2, _getter);
          }
        }
        EList<JvmMember> _members = it.getMembers();
        JvmTypeReference _newTypeRef = TemplateJvmModelInferrer.this._jvmTypesBuilder.newTypeRef(element, CharSequence.class);
        final Procedure1<JvmOperation> _function = new Procedure1<JvmOperation>() {
          public void apply(final JvmOperation it) {
            it.setVisibility(JvmVisibility.PRIVATE);
            XBlockExpression _body = element.getBody();
            TemplateJvmModelInferrer.this._jvmTypesBuilder.setBody(it, _body);
          }
        };
        JvmOperation _method = TemplateJvmModelInferrer.this._jvmTypesBuilder.toMethod(element, "generate", _newTypeRef, _function);
        TemplateJvmModelInferrer.this._jvmTypesBuilder.<JvmOperation>operator_add(_members, _method);
        EList<JvmMember> _members_1 = it.getMembers();
        JvmTypeReference _newTypeRef_1 = TemplateJvmModelInferrer.this._jvmTypesBuilder.newTypeRef(element, String.class);
        final Procedure1<JvmOperation> _function_1 = new Procedure1<JvmOperation>() {
          public void apply(final JvmOperation it) {
            EList<JvmFormalParameter> _parameters = it.getParameters();
            JvmTypeReference _typeRef = TemplateJvmModelInferrer.this._typeReferenceBuilder.typeRef(javaClass);
            JvmTypeReference _typeRef_1 = TemplateJvmModelInferrer.this._typeReferenceBuilder.typeRef(Procedure1.class, _typeRef);
            JvmFormalParameter _parameter = TemplateJvmModelInferrer.this._jvmTypesBuilder.toParameter(element,
              "init", _typeRef_1);
            TemplateJvmModelInferrer.this._jvmTypesBuilder.<JvmFormalParameter>operator_add(_parameters, _parameter);
            StringConcatenationClient _client = new StringConcatenationClient() {
              @Override
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, GuiceModulesPackage.KEY_AST__TYPE, oldType, newType);
      if (msgs == null) msgs = notification; else msgs.add(notification);
View Full Code Here

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

    super(delegate);
  }
 
  public String text(final Dependency dep) {
    StringConcatenation _builder = new StringConcatenation();
    JvmTypeReference _type = dep.getType();
    String _simpleName = _type.getSimpleName();
    _builder.append(_simpleName, "");
    _builder.append(" ");
    String _name = dep.getName();
    _builder.append(_name, "");
    return _builder.toString();
View Full Code Here

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

    String _javaClassName = this.javaClassName(model);
    JvmGenericType _class = this._jvmTypesBuilder.toClass(model, _javaClassName);
    final Procedure1<JvmGenericType> _function = new Procedure1<JvmGenericType>() {
      public void apply(final JvmGenericType it) {
        EList<JvmTypeReference> _superTypes = it.getSuperTypes();
        JvmTypeReference _typeRef = RouteJvmModelInferrer.this._typeReferenceBuilder.typeRef(RouteJvmModelInferrer.HTTP_SERVLET);
        RouteJvmModelInferrer.this._jvmTypesBuilder.<JvmTypeReference>operator_add(_superTypes, _typeRef);
        EList<JvmAnnotationReference> _annotations = it.getAnnotations();
        JvmAnnotationReference _annotationRef = RouteJvmModelInferrer.this._annotationTypesBuilder.annotationRef(SuppressWarnings.class, "serial");
        RouteJvmModelInferrer.this._jvmTypesBuilder.<JvmAnnotationReference>operator_add(_annotations, _annotationRef);
        EList<AbstractDeclaration> _declarations = model.getDeclarations();
        Iterable<Dependency> _filter = Iterables.<Dependency>filter(_declarations, Dependency.class);
        for (final Dependency field : _filter) {
          EList<JvmMember> _members = it.getMembers();
          String _name = field.getName();
          JvmTypeReference _type = field.getType();
          final Procedure1<JvmField> _function = new Procedure1<JvmField>() {
            public void apply(final JvmField it) {
              EList<JvmAnnotationReference> _annotations = it.getAnnotations();
              JvmAnnotationReference _annotationRef = RouteJvmModelInferrer.this._annotationTypesBuilder.annotationRef(Inject.class);
              RouteJvmModelInferrer.this._jvmTypesBuilder.<JvmAnnotationReference>operator_add(_annotations, _annotationRef);
View Full Code Here

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

   * Creates a method for the route's target call.
   * Gives scope and live to the expression.
   */
  protected JvmOperation toRouteCallMethod(final Route route) {
    String _nameOfRouteMethod = this.nameOfRouteMethod(route);
    JvmTypeReference _typeRef = this._typeReferenceBuilder.typeRef(void.class);
    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 _call = route.getCall();
        RouteJvmModelInferrer.this._jvmTypesBuilder.setBody(it, _call);
View Full Code Here

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

   */
  protected JvmField toRoutePatternField(final Route route) {
    URL _url = route.getUrl();
    int _index = this.index(route);
    String _plus = ("_pattern" + Integer.valueOf(_index));
    JvmTypeReference _typeRef = this._typeReferenceBuilder.typeRef(Pattern.class);
    final Procedure1<JvmField> _function = new Procedure1<JvmField>() {
      public void apply(final JvmField it) {
        it.setStatic(true);
        StringConcatenationClient _client = new StringConcatenationClient() {
          @Override
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.