Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5055963

A wildcard is not a reference type

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: P3
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0
    • Component/s: tools
    • Labels:
    • Subcomponent:
      apt
    • Resolved In Build:
      b56
    • CPU:
      sparc
    • OS:
      solaris_9

      Description


      Currently, WildcardType extends the marker interface ReferenceType.
      This doesn't accurately reflect the treatment of wildcards in the
      upcoming JLS 3. It should directly extend TypeMirror instead.
      This has the added advantage of aligning the interface more closely
      with its java.lang.reflect counterpart.

      Since ReferenceType is a marker interface, there's basically no code
      that needs to be changed; mostly it's just signatures being changed.
      In the following updated spec, the relevent occurrences of ReferenceType
      have been changed to TypeMirror:

      In WildcardType itself:

          public interface WildcardType extends TypeMirror

      In DeclaredType:

          public Collection<TypeMirror> getActualTypeArguments();

      In the Types utility interface:

          getDeclaredType(TypeDeclaration decl, TypeMirror... typeArgs) ;
          getDeclaredType(DeclaredType containing,
      TypeDeclaration decl, TypeMirror... typeArgs);

      In SimpleTypeVisitor.java:

          /**
           * Visits a wildcard type.
           * The implementation simply invokes visitTypeMirror.
           */
          public void visitWildcardType(WildcardType t);

      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              sseligmasunw Scott Seligman (Inactive)
              Reporter:
              sseligmasunw Scott Seligman (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: