Since get() is a static method there is no relationship (i.e. overriding) between MySession.get() and Session.get(). Hence you do not even need Java 5.
On Tue, Jan 6, 2009 at 10:25 AM, James Carman <[email protected]> wrote: > You don't need a helper if you do what Mr. Swank recommended. With > JDK5, you can have covariant return types. So, just set up a new > get() method that returns your exact session type. > > On Tue, Jan 6, 2009 at 1:11 PM, Per Newgro <[email protected]> wrote: >> If i'm not completly wrong there is a Session.get(). You could write a >> Helper which is casting that session instance. So you could use it >> everywhere you want. >> >> SessionConverter.java >> public static MySession getConverted() { >> return (MySession) Session.get(); >> } >> >> and in component where you want to access it >> MySession s = SessionConverter.getConverted(); >> >> Only an idea. >> Cheers >> Per >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: [email protected] >> For additional commands, e-mail: [email protected] >> >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
