Re: Changes in the JavaPlatform API
Tomas Zezula <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.modules.projects.devel |
|---|---|
| Message-ID | <[email protected]> |
Vitezslav Stejskal wrote: > > > Tomas Zezula wrote: > >>>> The question is what to put into base EditionType, according to me >>>> it should have at least SE type. >>>> > Wouldn't it be enough to use String identification of the platform > instead of introducing special class which is empty anyway and serves > for identification purposes only. It's not clear to me who will use > this identification anyway - PlatformService implementations, the > project when referencing used paltform, ...? > > [snip] I thought about it, but this is not a save way how to do this, the enumeration class, as described in Effective Java, is much more safer and it is scallable as well. > > >>>>> Another thought -- what all functions will the tag serve for ? >>>>> Isn't "aPlatform instanceof the_edition_specific_subtype" >>>>> expression sufficient to lurk for a specific platform edition ? >>>> >>>> >>>> >>>> >>>> I don't want to have a test of edition type using instanceof, for >>>> me it seems better to define an explicit method for that. >>> >>> > Well, but implementation of PlatformService will have to typecast for > specific platform type anyway if it will want to check additional > parameters like specification version, etc. Yes, this is true, but sometimes you are just interested in the type of platform and you don't need a cast. And API based on instanceof testing does not seems to me very good. Tomas > > > -vita > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [email protected] > For additional commands, e-mail: [email protected] >