[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Japitools status - Savannah and v5 support
From: |
Stuart Ballard |
Subject: |
Re: Japitools status - Savannah and v5 support |
Date: |
Wed, 27 Oct 2004 12:28:53 -0400 |
User-agent: |
Mozilla Thunderbird 0.8 (X11/20040926) |
Stuart Ballard wrote:
- In what ways is it legal to modify generic type parameters while
retaining binary backward compatibility? java.lang.Class<T> and the
collections APIs demonstrate that adding generic parameters to a
previously non-generic class is okay. How about...
- adding new generic parameters to a class that did have them before?
- Changing the constraining class to be more specific?
- Less specific?
- Anything special happen if either the parameter or the class
*with* the parameter is actually an interface?
- What about removing a generic type parameter - that's presumably
forbidden?
Ooh, some more:
- Changing a field, method parameter or return value from a
concrete class to a generic parameter that's constrained to the same
class as the concrete class used to be? (presumably legal based on
collections)
- That's constrained to a more specific class?
- That's constrained to a less specific class?
- Changing from a generic parameter class to it's concrete
constraining class?
- To a more specific class?
- To a less specific class?
- Can a throws clause contain a generic parameter? Presumably if
it does that type has to be constrained to something under Throwable. If
so, in what ways can it be legally modified?
- Can a class inherit from a generic class with parameters?
Implement a generic interface with parameters? Can the parameters passed
there be generic parameter types themselves, or constructed from them?
(class Foo<T> implements List<Map<T,String>>)? If so, what changes to
the superclass and interfaces are binary compatible, and what aren't?
(deliberately being vague here because there seem to be so many possible
changes that they're hard to pin down)
Sure there are more too... it's a big mess, AFAICT.
Stuart.
--
Stuart Ballard, Senior Web Developer
NetReach, Inc.
(215) 283-2300, ext. 126
http://www.netreach.com/