c T getOpt() {
>//needs a class object!
>T opt = composite. getFeature();
> return opt;
>}
> }
>
> Hope this helps.
> -Original Message-
> From: nicolas de loof [mailto:[EMAIL PROTECTED]
> Sent: September 28,
object!
T opt = composite. getFeature();
return opt;
}
}
Hope this helps.
-Original Message-
From: nicolas de loof [mailto:[EMAIL PROTECTED]
Sent: September 28, 2007 4:54 AM
To: Struts Users Mailing List
Subject: Re: [ot] help on generics...
T
created with the
> constructor parameters passed. If the constructor throws an error it is
> wrapped in an InvocationTargetException and rethrown. If no constructor
> matches the method returns null.
>
>
> -Original Message-
> From: Giovanni Azua [mailto:[EMAIL PROTECTED
ationTargetException and rethrown. If no constructor matches the
method returns null.
-Original Message-
From: Giovanni Azua [mailto:[EMAIL PROTECTED]
Sent: September 27, 2007 11:56 AM
To: Struts Users Mailing List
Subject: Re: [ot] help on generics...
how about:
public static T
getI
how about:
public static T
getInstance(Class aClass)
{
// TODO:
}
regards,
Giovanni
nicolas de loof wrote:
Hello,
my question is fully off topic, but Struts2 is the only java5 project I know.
I'd like a method to return an instance of a class passed as parameter :
public Object getInst
5 matches
Mail list logo