Examples of typeArguments()


Examples of com.pogofish.jadt.parser.ParserImpl.typeArguments()

   
    @Test
   public void testTypeArgumentsErrors() throws Exception {
       
        ParserImpl p1 = parserImpl("<>");
        checkError(list(_UnexpectedToken("a type parameter", "'>'", 1)), list("NO_IDENTIFIER@1"), p1.typeArguments(), p1);

        ParserImpl p2 = parserImpl("<A");
        checkError(list(_UnexpectedToken("'>'", "<EOF>", 1)), list("A"), p2.typeArguments(), p2);

        ParserImpl p3 = parserImpl("<");

Examples of com.pogofish.jadt.parser.ParserImpl.typeArguments()

       
        ParserImpl p1 = parserImpl("<>");
        checkError(list(_UnexpectedToken("a type parameter", "'>'", 1)), list("NO_IDENTIFIER@1"), p1.typeArguments(), p1);

        ParserImpl p2 = parserImpl("<A");
        checkError(list(_UnexpectedToken("'>'", "<EOF>", 1)), list("A"), p2.typeArguments(), p2);

        ParserImpl p3 = parserImpl("<");
        checkError(list(_UnexpectedToken("a type parameter", "<EOF>", 1)), list("NO_IDENTIFIER@1"), p3.typeArguments(), p3);

        ParserImpl p4 = parserImpl("<boolean, A>");

Examples of com.pogofish.jadt.parser.ParserImpl.typeArguments()

        ParserImpl p2 = parserImpl("<A");
        checkError(list(_UnexpectedToken("'>'", "<EOF>", 1)), list("A"), p2.typeArguments(), p2);

        ParserImpl p3 = parserImpl("<");
        checkError(list(_UnexpectedToken("a type parameter", "<EOF>", 1)), list("NO_IDENTIFIER@1"), p3.typeArguments(), p3);

        ParserImpl p4 = parserImpl("<boolean, A>");
        checkError(list(_UnexpectedToken("a type parameter", "'boolean'", 1)), list("BAD_IDENTIFIER_boolean@1", "A"), p4.typeArguments(), p4);

        ParserImpl p5 = parserImpl("<A, ,B>");

Examples of com.pogofish.jadt.parser.ParserImpl.typeArguments()

        ParserImpl p3 = parserImpl("<");
        checkError(list(_UnexpectedToken("a type parameter", "<EOF>", 1)), list("NO_IDENTIFIER@1"), p3.typeArguments(), p3);

        ParserImpl p4 = parserImpl("<boolean, A>");
        checkError(list(_UnexpectedToken("a type parameter", "'boolean'", 1)), list("BAD_IDENTIFIER_boolean@1", "A"), p4.typeArguments(), p4);

        ParserImpl p5 = parserImpl("<A, ,B>");
        checkError(list(_UnexpectedToken("a type parameter", "','", 1)), list("A", "NO_IDENTIFIER@1", "B"), p5.typeArguments(), p5);

        ParserImpl p6 = parserImpl("<A B>");

Examples of com.pogofish.jadt.parser.ParserImpl.typeArguments()

        ParserImpl p4 = parserImpl("<boolean, A>");
        checkError(list(_UnexpectedToken("a type parameter", "'boolean'", 1)), list("BAD_IDENTIFIER_boolean@1", "A"), p4.typeArguments(), p4);

        ParserImpl p5 = parserImpl("<A, ,B>");
        checkError(list(_UnexpectedToken("a type parameter", "','", 1)), list("A", "NO_IDENTIFIER@1", "B"), p5.typeArguments(), p5);

        ParserImpl p6 = parserImpl("<A B>");
        checkError(list(_UnexpectedToken("'>'", "'B'", 1)), list("A"), p6.typeArguments(), p6);

    }

Examples of com.pogofish.jadt.parser.ParserImpl.typeArguments()

        ParserImpl p5 = parserImpl("<A, ,B>");
        checkError(list(_UnexpectedToken("a type parameter", "','", 1)), list("A", "NO_IDENTIFIER@1", "B"), p5.typeArguments(), p5);

        ParserImpl p6 = parserImpl("<A B>");
        checkError(list(_UnexpectedToken("'>'", "'B'", 1)), list("A"), p6.typeArguments(), p6);

    }

    /**
     * Make sure a package declaration parse properly

Examples of com.sun.javadoc.ParameterizedType.typeArguments()

        if (typeDocFileName != null) {
            typeString = "<A HREF=\"" + typeDocFileName + "\">" + typeString + "</A>";
        }
        if (type.asParameterizedType() != null) {
            ParameterizedType parametrizedType = type.asParameterizedType();
            final Type[] parameterTypes = parametrizedType.typeArguments();
            if (parameterTypes.length > 0) {
                String[] parametersTypeStrings = new String[parameterTypes.length];
                for (int i = 0; i < parameterTypes.length; i++) {
                    parametersTypeStrings[i] = getTypeString(parameterTypes[i]);
                }

Examples of com.sun.javadoc.ParameterizedType.typeArguments()

    }

    // if parameterized then build map of the param vars
    ParameterizedType pt = type.asParameterizedType();
    if (pt != null) {
      Type[] typeArgs = pt.typeArguments();
      if (typeArgs != null && typeArgs.length > 0) {
        TypeVariable[] vars = classDoc.typeParameters();
        int i = 0;
        for (TypeVariable var : vars) {
          this.varsToTypes.put(var.qualifiedTypeName(), typeArgs[i]);

Examples of com.sun.javadoc.ParameterizedType.typeArguments()

      parseModel(type.type, true);

      // parse paramaterized types
      ParameterizedType pt = type.type.asParameterizedType();
      if (pt != null) {
        Type[] typeArgs = pt.typeArguments();
        if (typeArgs != null) {
          for (Type paramType : typeArgs) {
            parseModel(paramType, true);
          }
        }

Examples of com.sun.javadoc.ParameterizedType.typeArguments()

  private Type getModelType(Type type, boolean nested) {
    if (type != null) {

      ParameterizedType pt = type.asParameterizedType();
      if (pt != null) {
        Type[] typeArgs = pt.typeArguments();
        if (typeArgs != null && typeArgs.length > 0) {
          // if its a generic wrapper type then return the wrapped type
          if (this.options.getGenericWrapperTypes().contains(type.qualifiedTypeName())) {
            return typeArgs[0];
          }
TOP
Copyright © 2018 www.massapi.com. 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.