Package org.applause.lang.applauseDsl

Examples of org.applause.lang.applauseDsl.Type


      final NamedElement stringType = IterableExtensions.<NamedElement>findFirst(_elements_2, _function_1);
      final Attribute firstAttribute = IterableExtensions.<Attribute>head(attributes);
      String _name = firstAttribute.getName();
      Matcher<String> _is_1 = CoreMatchers.<String>is("name");
      Assert.<String>assertThat(_name, _is_1);
      Type _type = firstAttribute.getType();
      Matcher<NamedElement> _is_2 = CoreMatchers.<NamedElement>is(stringType);
      Assert.<Type>assertThat(_type, _is_2);
      final Attribute secondAttribute = IterableExtensions.<Attribute>last(attributes);
      String _name_1 = secondAttribute.getName();
      Matcher<String> _is_3 = CoreMatchers.<String>is("birthdate");
      Assert.<String>assertThat(_name_1, _is_3);
      Type _type_1 = secondAttribute.getType();
      Matcher<NamedElement> _is_4 = CoreMatchers.<NamedElement>is(dateType);
      Assert.<Type>assertThat(_type_1, _is_4);
    } catch (Throwable _e) {
      throw Exceptions.sneakyThrow(_e);
    }
View Full Code Here


 
  public String parameterList(final DataSourceAccessMethod it) {
    EList<Parameter> _declaredParameters = it.getDeclaredParameters();
    final Function1<Parameter,String> _function = new Function1<Parameter,String>() {
      public String apply(final Parameter param) {
        Type _type = param.getType();
        String _typeName = EntityDataAccessExtensions.this._typeExtensions.typeName(_type);
        String _plus = (_typeName + " *");
        Type _type_1 = param.getType();
        String _parameterName = EntityDataAccessExtensions.this.parameterName(_type_1);
        String _plus_1 = (_plus + _parameterName);
        return _plus_1;
      }
    };
View Full Code Here

   * <!-- end-user-doc -->
   * @generated
   */
  public void setType(Type newType)
  {
    Type oldType = type;
    type = newType;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.PARAMETER__TYPE, oldType, type));
  }
View Full Code Here

  }
 
  public Object scope_EntityMemberCall_head(final ScreenListItemCell ctx, final EReference ref) {
    Object _xblockexpression = null;
    {
      Type _elvis = null;
      RESTMethodCall _restMethod = null;
      if (ctx!=null) {
        _restMethod=ctx.getRestMethod();
      }
      DataSourceCall _datasource = null;
      if (_restMethod!=null) {
        _datasource=_restMethod.getDatasource();
      }
      DataSource _datasource_1 = null;
      if (_datasource!=null) {
        _datasource_1=_datasource.getDatasource();
      }
      Entity _resourceType = null;
      if (_datasource_1!=null) {
        _resourceType=_datasource_1.getResourceType();
      }
      if (_resourceType != null) {
        _elvis = _resourceType;
      } else {
        Screen _screen = this.screen(ctx);
        Parameter _inputParameter = _screen.getInputParameter();
        Type _type = _inputParameter.getType();
        _elvis = ObjectExtensions.<Type>operator_elvis(_resourceType, _type);
      }
      final Type type = _elvis;
      Object _attributesScope = this.attributesScope(type);
      _xblockexpression = (_attributesScope);
    }
    return _xblockexpression;
  }
View Full Code Here

  }
 
  public Object scope_EntityMemberCallTail_head(final EntityMemberCall ctx, final EReference ref) {
    Object _xblockexpression = null;
    {
      Type _elvis = null;
      Attribute _head = ctx.getHead();
      Type _type = _head.getType();
      if (_type != null) {
        _elvis = _type;
      } else {
        Screen _screen = this.screen(ctx);
        Parameter _inputParameter = _screen.getInputParameter();
        Type _type_1 = _inputParameter.getType();
        _elvis = ObjectExtensions.<Type>operator_elvis(_type, _type_1);
      }
      final Type type = _elvis;
      Object _attributesScope = this.attributesScope(type);
      _xblockexpression = (_attributesScope);
    }
    return _xblockexpression;
  }
View Full Code Here

   * <!-- end-user-doc -->
   * @generated
   */
  public void setType(Type newType)
  {
    Type oldType = type;
    type = newType;
    if (eNotificationRequired())
      eNotify(new ENotificationImpl(this, Notification.SET, ApplauseDslPackage.ATTRIBUTE__TYPE, oldType, type));
  }
View Full Code Here

    return _xifexpression;
  }
 
  public String typeName(final Attribute it) {
    String _switchResult = null;
    Type _type = it.getType();
    String _name = _type.getName();
    final String _switchValue = _name;
    boolean _matched = false;
    if (!_matched) {
      if (Objects.equal(_switchValue,"String")) {
        _matched=true;
        _switchResult = "NSString";
      }
    }
    if (!_matched) {
      if (Objects.equal(_switchValue,"Bool")) {
        _matched=true;
        _switchResult = "BOOL";
      }
    }
    if (!_matched) {
      if (Objects.equal(_switchValue,"Date")) {
        _matched=true;
        _switchResult = "NSDate";
      }
    }
    if (!_matched) {
      if (Objects.equal(_switchValue,"Integer")) {
        _matched=true;
        _switchResult = "NSNumber";
      }
    }
    if (!_matched) {
      Type _type_1 = it.getType();
      String _name_1 = _type_1.getName();
      _switchResult = _name_1;
    }
    return _switchResult;
  }
View Full Code Here

    return _switchResult;
  }
 
  public boolean isScalar(final Attribute it) {
    boolean _switchResult = false;
    Type _type = it.getType();
    String _name = _type.getName();
    final String _switchValue = _name;
    boolean _matched = false;
    if (!_matched) {
      if (Objects.equal(_switchValue,"Bool")) {
        _matched=true;
View Full Code Here

import org.eclipse.xtext.xbase.lib.StringExtensions;

@SuppressWarnings("all")
public class AttributeExtensions {
  public String typeName(final Attribute it) {
    Type _type = it.getType();
    String _name = _type.getName();
    return _name;
  }
View Full Code Here

TOP

Related Classes of org.applause.lang.applauseDsl.Type

Copyright © 2018 www.massapicom. 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.