Package com.bacoder.parser.java.api

Examples of com.bacoder.parser.java.api.ArrayAccess


    if (hasTerminalNode(context, JavaParser.DOT)) {
      return processScopedExpression(context);
    }

    if (hasTerminalNode(context, JavaParser.LBRACK)) {
      ArrayAccess arrayAccess = createNode(context, ArrayAccess.class);

      if (context.getChildCount() > 0 && context.getChild(0) instanceof ExpressionContext) {
        ExpressionContext expressionContext = (ExpressionContext) context.getChild(0);
        arrayAccess.setArray(getAdapter(ExpressionAdapter.class).adapt(expressionContext));
      }

      if (context.getChildCount() > 2 && context.getChild(2) instanceof ExpressionContext) {
        ExpressionContext expressionContext = (ExpressionContext) context.getChild(2);
        arrayAccess.setIndex(getAdapter(ExpressionAdapter.class).adapt(expressionContext));
      }

      return arrayAccess;
    }
View Full Code Here

TOP

Related Classes of com.bacoder.parser.java.api.ArrayAccess

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.