Package org.aspectj.org.eclipse.jdt.internal.compiler.ast

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.ast.ArrayInitializer


        if (contentsOffset + 3 >= this.contents.length) {
          resizeContents(3);
        }
        contents[contentsOffset++] = (byte) '[';
        if (defaultValue instanceof ArrayInitializer) {
          ArrayInitializer arrayInitializer = (ArrayInitializer) defaultValue;
          int arrayLength = arrayInitializer.expressions != null ? arrayInitializer.expressions.length : 0;
          contents[contentsOffset++] = (byte) (arrayLength >> 8);
          contents[contentsOffset++] = (byte) arrayLength;
          for (int i = 0; i < arrayLength; i++) {
            generateElementValue(arrayInitializer.expressions[i], defaultValueBinding.leafComponentType(), attributeOffset);
View Full Code Here


          this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET, this.preferences.insert_space_before_closing_bracket_in_array_allocation_expression);
        } else {
          this.scribe.printNextToken(TerminalTokens.TokenNameRBRACKET, this.preferences.insert_space_between_empty_brackets_in_array_allocation_expression);
        }
      }
      final ArrayInitializer initializer = arrayAllocationExpression.initializer;
      if (initializer != null) {
        initializer.traverse(this, scope);
      }

      if (numberOfParens > 0) {
        manageClosingParenthesizedExpression(arrayAllocationExpression, numberOfParens);
      }
View Full Code Here

        // generateAnnotation((Annotation) defaultValue,
        // attributeOffset);
      } else if (defaultValueBinding.isArrayType()) {
        // array type
        if (defaultValue instanceof ArrayInitializer) {
          ArrayInitializer arrayInitializer = (ArrayInitializer) defaultValue;
          int arrayLength = arrayInitializer.expressions != null ? arrayInitializer.expressions.length : 0;
          AnnotationValue[] values = new AnnotationValue[arrayLength];
          for (int i = 0; i < arrayLength; i++) {
            values[i] = generateElementValue(arrayInitializer.expressions[i], defaultValueBinding.leafComponentType());// ,
            // attributeOffset
View Full Code Here

        // generateAnnotation((Annotation) defaultValue,
        // attributeOffset);
      } else if (defaultValueBinding.isArrayType()) {
        // array type
        if (defaultValue instanceof ArrayInitializer) {
          ArrayInitializer arrayInitializer = (ArrayInitializer) defaultValue;
          int arrayLength = arrayInitializer.expressions != null ? arrayInitializer.expressions.length : 0;
          AnnotationValue[] values = new AnnotationValue[arrayLength];
          for (int i = 0; i < arrayLength; i++) {
            values[i] = generateElementValue(arrayInitializer.expressions[i], defaultValueBinding.leafComponentType());// ,
            // attributeOffset
View Full Code Here

        if (this.annotations[i] instanceof MarkerAnnotation) {
          return true;
        } else if (this.annotations[i] instanceof SingleMemberAnnotation) {
          SingleMemberAnnotation sma = (SingleMemberAnnotation) this.annotations[i];
          if (sma.memberValue instanceof ArrayInitializer) {
            ArrayInitializer memberValue = (ArrayInitializer) sma.memberValue;
            for (int j = 0; j < memberValue.expressions.length; j++) {
              if (memberValue.expressions[j] instanceof StringLiteral) {
                StringLiteral val = (StringLiteral) memberValue.expressions[j];
                if (new String(val.source()).equals(NOEXPLICITCONSTRUCTORCALL))
                  return true;
View Full Code Here

    if (explicitConstructor == null)
      nExprs = 0;
    else
      nExprs = explicitConstructor.parameters.length;

    ArrayInitializer init = new ArrayInitializer();
    init.expressions = new Expression[nExprs + nParams];
    int index = 0;
    for (int i = 0; i < nExprs; i++) {
      if (i >= (explicitConstructorCall.arguments == null ? 0 : explicitConstructorCall.arguments.length)) {
        init.expressions[index++] = new NullLiteral(0, 0);
View Full Code Here

TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.compiler.ast.ArrayInitializer

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.