Package org.eclipse.xtend.lib.macro.expression

Examples of org.eclipse.xtend.lib.macro.expression.Expression


            _and_2 = _equals;
          }
          if (!_and_2) {
            _and_1 = false;
          } else {
            Expression _initializer = it.getInitializer();
            boolean _equals_1 = Objects.equal(_initializer, null);
            _and_1 = _equals_1;
          }
          if (!_and_1) {
            _and = false;
View Full Code Here


      boolean _not = (!_isEmpty_1);
      if (_not) {
        this.context.addError(it, "Parameter list must be empty");
      }
      boolean _and = false;
      Expression _body = it.getBody();
      boolean _tripleNotEquals = (_body != null);
      if (!_tripleNotEquals) {
        _and = false;
      } else {
        Expression _body_1 = it.getBody();
        String _string = _body_1.toString();
        Matcher _matcher = FinalFieldsConstructorProcessor.Util.EMPTY_BODY.matcher(_string);
        boolean _matches = _matcher.matches();
        boolean _not_1 = (!_matches);
        _and = _not_1;
      }
View Full Code Here

    TypeReference _type = field.getType();
    boolean _isPrimitive = _type.isPrimitive();
    if (_isPrimitive) {
      context.addError(field, "Primitives can\'t be used as event.");
    }
    Expression _initializer = field.getInitializer();
    boolean _tripleNotEquals = (_initializer != null);
    if (_tripleNotEquals) {
      context.addError(field, "Listener event dont\'t need an initializer");
    }
    final TypeReference eventType = field.getType();
View Full Code Here

                }
              };
              IterableExtensions.forEach(_parameters, _function);
              Iterable<? extends TypeReference> _exceptions = MethodMemoizer.this.method.getExceptions();
              init.setExceptions(((TypeReference[])Conversions.unwrapArray(_exceptions, TypeReference.class)));
              Expression _body = MethodMemoizer.this.method.getBody();
              init.setBody(_body);
            }
          };
          it.addMethod(_initMethodName, _function);
          String _cacheFieldName = MethodMemoizer.this.cacheFieldName();
View Full Code Here

              TypeReference _extendedClass = inheritor.getExtendedClass();
              boolean _tripleEquals = (_extendedClass == null);
              _or = _tripleEquals;
            }
            if (_or) {
              Expression _body = original.getBody();
              boolean _tripleNotEquals = (_body != null);
              if (_tripleNotEquals) {
                Expression _body_1 = original.getBody();
                method.setBody(_body_1);
              } else {
                final CompilationStrategy _function_1 = new CompilationStrategy() {
                  public CharSequence compile(final CompilationStrategy.CompilationContext it) {
                    StringConcatenation _builder = new StringConcatenation();
View Full Code Here

    TypeReference _type = field.getType();
    boolean _isPrimitive = _type.isPrimitive();
    if (_isPrimitive) {
      context.addError(field, "Fields with primitives are not supported by @Lazy");
    }
    Expression _initializer = field.getInitializer();
    boolean _tripleEquals = (_initializer == null);
    if (_tripleEquals) {
      context.addError(field, "A lazy field must have an initializer.");
    }
    MutableTypeDeclaration _declaringType = field.getDeclaringType();
    String _simpleName = field.getSimpleName();
    String _plus = ("_init" + _simpleName);
    final Procedure1<MutableMethodDeclaration> _function = new Procedure1<MutableMethodDeclaration>() {
      public void apply(final MutableMethodDeclaration it) {
        it.setVisibility(Visibility.PRIVATE);
        TypeReference _type = field.getType();
        it.setReturnType(_type);
        Expression _initializer = field.getInitializer();
        it.setBody(_initializer);
      }
    };
    _declaringType.addMethod(_plus, _function);
    MutableTypeDeclaration _declaringType_1 = field.getDeclaringType();
View Full Code Here

TOP

Related Classes of org.eclipse.xtend.lib.macro.expression.Expression

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.