Package com.bacoder.parser.java.api

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


    super(adapters);
  }

  @Override
  public TypeParameter adapt(TypeParameterContext context) {
    TypeParameter typeParameter = createNode(context);

    TerminalNode identifierNode = getTerminalNode(context, JavaParser.Identifier);
    if (identifierNode != null) {
      typeParameter.setName(getAdapter(IdentifierAdapter.class).adapt(identifierNode));
    }

    TypeBoundContext typeBoundContext = getChild(context, TypeBoundContext.class);
    if (typeBoundContext != null) {
      List<Type> extendsTypes =
          transform(typeBoundContext, TypeContext.class, new Function<TypeContext, Type>() {
            @Override
            public Type apply(TypeContext context) {
              return getAdapter(TypeAdapter.class).adapt(context);
            }
          });
      typeParameter.setExtendsTypes(extendsTypes);
    }

    return typeParameter;
  }
View Full Code Here

TOP

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

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.