Package com.bacoder.parser.java.JavaParser

Examples of com.bacoder.parser.java.JavaParser.NonWildcardTypeArgumentsContext


          int size = identifierWithTypeArguments.size();
          if (size > 0) {
            IdentifierWithTypeArguments element = identifierWithTypeArguments.get(size - 1);
            setNodeAttributes(element, null, input);

            NonWildcardTypeArgumentsContext nonWildcardTypeArgumentsContext =
                (NonWildcardTypeArgumentsContext) input;
            element.setTypeArguments(getAdapter(NonWildcardTypeArgumentsAdapter.class).adapt(
                nonWildcardTypeArgumentsContext));
          }
        }
View Full Code Here


      List<Expression> arguments = Collections.emptyList();
      List<ClassMemberDeclaration> classMemberDeclarations = Collections.emptyList();
      List<ArrayCreationDimension> arrayDimensions = null;
      ArrayInitializer arrayInitializer = null;

      NonWildcardTypeArgumentsContext nonWildcardTypeArgumentsContext =
          getChild(creatorContext, NonWildcardTypeArgumentsContext.class);
      if (nonWildcardTypeArgumentsContext != null) {
        nonWildcardTypeArguments =
            getAdapter(NonWildcardTypeArgumentsAdapter.class).adapt(
                nonWildcardTypeArgumentsContext);
View Full Code Here

    TerminalNode newNode = getTerminalNode(context, JavaParser.NEW);
    if (newNode != null) {
      ClassInstantiation newInvocation = createNode(newNode, context, ClassInstantiation.class);

      NonWildcardTypeArgumentsContext nonWildcardTypeArgumentsContext =
          getChild(context, NonWildcardTypeArgumentsContext.class);
      if (nonWildcardTypeArgumentsContext != null) {
        newInvocation.setTypeArguments(getAdapter(NonWildcardTypeArgumentsAdapter.class).adapt(
            nonWildcardTypeArgumentsContext));
      }

      InnerCreatorContext innerCreatorContext = getChild(context, InnerCreatorContext.class);
      if (innerCreatorContext != null) {
        TerminalNode typeIdentifierNode =
            getTerminalNode(innerCreatorContext, JavaParser.Identifier);
        NonWildcardTypeArgumentsOrDiamondContext nonWildcardTypeArgumentsOrDiamondContext =
            getChild(innerCreatorContext, NonWildcardTypeArgumentsOrDiamondContext.class);
        TypeWithArguments typeWithArguments =
            createNode(typeIdentifierNode,
                nonWildcardTypeArgumentsOrDiamondContext == null
                    ? typeIdentifierNode
                    : nonWildcardTypeArgumentsOrDiamondContext,
                TypeWithArguments.class);
        typeWithArguments.setIdentifiersWithTypeArguments(
            convertIdentifiersWithTypeArguments(innerCreatorContext));
        newInvocation.setType(typeWithArguments);

        ClassCreatorRestContext classCreatorRestContext =
            getChild(innerCreatorContext, ClassCreatorRestContext.class);
        if (classCreatorRestContext != null) {
          ArgumentsContext arguments = getChild(classCreatorRestContext, ArgumentsContext.class);
          if (arguments != null) {
            newInvocation.setArguments(getAdapter(ArgumentsAdapter.class).adapt(arguments));
          }

          ClassBodyContext classBodyContext =
              getChild(classCreatorRestContext, ClassBodyContext.class);
          if (classBodyContext != null) {
            newInvocation.setMemberDeclarations(
                getAdapter(ClassBodyAdapter.class).adapt(classBodyContext));
          }
        }
      }

      scopedExpression.setExpression(newInvocation);
      return scopedExpression;
    }

    TerminalNode superNode = getTerminalNode(context, JavaParser.SUPER);
    if (superNode != null) {
      SuperInvocation superInvocation = createNode(superNode, context, SuperInvocation.class);

      SuperSuffixContext superSuffixContext = getChild(context, SuperSuffixContext.class);
      if (superSuffixContext != null) {
        superInvocation =
            getAdapter(SuperSuffixAdapter.class).adapt(superSuffixContext, superInvocation);
      }

      scopedExpression.setExpression(superInvocation);
      return scopedExpression;
    }

    ExplicitGenericInvocationContext explicitGenericInvocationContext =
        getChild(context, ExplicitGenericInvocationContext.class);
    if (explicitGenericInvocationContext != null) {
      List<Type> typeList = Collections.emptyList();

      NonWildcardTypeArgumentsContext nonWildcardTypeArgumentsContext =
          getChild(explicitGenericInvocationContext, NonWildcardTypeArgumentsContext.class);
      if (nonWildcardTypeArgumentsContext != null) {
        typeList = getAdapter(NonWildcardTypeArgumentsAdapter.class).adapt(
            nonWildcardTypeArgumentsContext);
      }
View Full Code Here

    return processInvocationExpression(context);
  }

  protected Invocation processInvocationExpression(PrimaryContext context) {
    NonWildcardTypeArgumentsContext nonWildcardTypeArgumentsContext =
        getChild(context, NonWildcardTypeArgumentsContext.class);
    if (nonWildcardTypeArgumentsContext != null) {
      List<Type> typeList =
          getAdapter(NonWildcardTypeArgumentsAdapter.class).adapt(nonWildcardTypeArgumentsContext);
View Full Code Here

TOP

Related Classes of com.bacoder.parser.java.JavaParser.NonWildcardTypeArgumentsContext

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.