Package com.bacoder.parser.java.api

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


  @Override
  public TypeArgument adapt(TypeArgumentContext context) {
    TypeContext typeContext = getChild(context, TypeContext.class);
    if (typeContext == null) {
      WildcardTypeArgument wildcardTypeArgument = createNode(context, WildcardTypeArgument.class);
      return wildcardTypeArgument;
    } else {
      Type type = getAdapter(TypeAdapter.class).adapt(typeContext);
      boolean hasExtends = hasTerminalNode(context, JavaParser.EXTENDS);
      boolean hasSuper = hasTerminalNode(context, JavaParser.SUPER);
      if (hasExtends || hasSuper) {
        WildcardTypeArgument wildcardTypeArgument = createNode(context, WildcardTypeArgument.class);
        if (hasExtends) {
          wildcardTypeArgument.setExtendsType(type);
        } else {
          wildcardTypeArgument.setSuperType(type);
        }
        return wildcardTypeArgument;
      } else {
        return type;
      }
View Full Code Here

TOP

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

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.