Speaking of that, I have a doubt:
If I have a declaration: Map<String,Object> anAttribute;
I will create a ParameterizedType (named Map) with TypeParameters String and Object; and
pointing to its ParameterizableClass Map (this time the generic definition).
What should be the container of the ParameterizedType?
At first, I thought I would define it as an internal type of the class owning
'anAttribute' because the parameterizedType is actually created at this very
moment.
But then it could also be owned by 'java.lang' the package that owns the
ParameterizableClass Map.
Having 'anAttribute' appearing in moose with:
"DeclaredType:
some::package::A_Class::Map<java::lang::String,java::lang::Object>"
can be confusing. And it would get even worst if we were considering a method's
parameter, whereas:
"DeclaredType: java::util::Map<java::lang::String,java::lang::Object>"
seems to be more intuitive.
But on the other hand, we loose some information in the second case.
nicolas
----- Mail original -----
De: "Tudor Girba"
<tudor.girba(a)gmail.com>
À: "Moose-related development" <moose-dev(a)iam.unibe.ch>
Envoyé: Mercredi 30 Mars 2011 19:59:55
Objet: [Moose-dev] Re: FAMIX and Java Generics
Hi Diego,
This part is under works.
First, FAMIX now supports Java Generics with ParameterizedType and
ParameterizableClass. Second, both inFusion and VerveineJ will
populate this information in the actual models.
Cheers,
Doru
On 30 Mar 2011, at 16:43, Diego Fernandez wrote:
Hi all, using inFusion to get an MSE model from
Java, I saw that the
tool generates a FAMIX.Class for generic types used in parameters,
for example:
public interface AnInterface<T> {
void doSomething(T param);
}
Will generate a FAMIX.Class for T, and a reference to that class for
the declaredType of "param".
Is this the way to describe generic parameters in an MSE file or is
a bug?
Thanks,
Diego
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev
--
www.tudorgirba.com
"Value is always contextual."
_______________________________________________
Moose-dev mailing list
Moose-dev(a)iam.unibe.ch
https://www.iam.unibe.ch/mailman/listinfo/moose-dev