There are still open issues, and it would also be great to get help on them:
- How to model the parameters of a ParameterizableClass as a Type that
can be used as declaredType. We should add some sort of a local scope to a type. See: http://code.google.com/p/moose-technology/issues/detail?id=495
I would say that ParameterizedClass has a list of parameter types (here:
class Mymap<K,T>
and each type (ex: K or T) could be defined more or less as we define inner classes: a class within the scope of another class (MyMap here).
Parameters may have a super class (not sure of the exact Java syntax here), but this would be handled normally:
class MyMap<K implements Integer,T>
The problem is in the use of the ParameterizedClass, when we specify (possibly partially) what are the parameters to use.
MyMap<Integer,Object> aMap;
This would suggest a new association (Reference, Inheritance) where one would specify the parameters of the ParameterizedClass. Not very satisfying but I couldn't think of any better solution. The association would have a list of parameters where order is significant (the same as in the ParameterizedClass). The actual parameters in the Reference could be "real" ("concrete") types or new parameter types if we specify only partially the parameters:
class MyStringMap<T> implements MyMap<String,T> ...
Since Interfaces may also be parameterized, we may want to raise all this at the level of Types (ParameterizedType) instead of classes.
Or may be we can use Traits?
nicolas
- I would like to have an explicit FAMIXInterface, but it is slightly
more difficult now that we have ParameterizableClass. See: http://code.google.com/p/moose-technology/issues/detail?id=526