Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #25704

Re: limitations on using enum as generic parameter

From Lew <lew@lewscanon.com>
Newsgroups comp.lang.java.programmer
Subject Re: limitations on using enum as generic parameter
Date 2011-02-09 10:07 -0800
Organization http://groups.google.com
Message-ID <0ce0b055-08e5-4c55-99b7-e00656c368d2@o39g2000prb.googlegroups.com> (permalink)
References (2 earlier) <iis5qe$6o3$1@news.eternal-september.org> <4d519c14$1@news.x-privat.org> <iis6ki$ad9$1@news.eternal-september.org> <0492d06b-9d2a-4b7f-9baa-a4f124cc2690@x5g2000prf.googlegroups.com> <iisgvs$fhm$1@news.eternal-september.org>

Show all headers | View raw


On Feb 8, 5:44 pm, Daniele Futtorovic
<da.futt.n...@laposte.net.invalid> wrote:
> On 08/02/2011 21:31, Lew allegedly wrote:
>
> > "Ken Wesson" allegedly wrote:
> >>> In the special case of an enum there's getEnumConstants.
>
> > Daniele Futtorovic wrote:
> >> Which doesn't work via reflection, FWIW
>
> > Would you explain what you mean by that?  'getEnumConstants()' is
> > itself a method of reflection.
>
> It means what it says and, upon verification, turns out to be my
>

If I understood what it said, I wouldn't have had to ask.

> mistake. I had assumed there was some VM support for the enum constants.
> Hadn't checked well enough. Thanks for pointing it out.
>

What does the VM have to do with it?  This is a Java question, not a
VM question.

My question is what you mean by "via reflection"?  I understand the
term to mean the use of methods that reveal information about a type
without direct use of the type as such.  So whatever the VM does or
does not do, 'getEnumConstants()' is a reflective method.

Because your stsatement seems well founded on an understanding that is
different from mine, I ask again what you mean.

--
Lew

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Re: limitations on using enum as generic parameter Daniele Futtorovic <da.futt.news@laposte.net.invalid> - 2011-02-08 20:33 +0100
  Re: limitations on using enum as generic parameter Lew <lew@lewscanon.com> - 2011-02-09 10:07 -0800
  Re: limitations on using enum as generic parameter Daniele Futtorovic <da.futt.news@laposte.net.invalid> - 2011-02-08 23:44 +0100
  Re: limitations on using enum as generic parameter Daniele Futtorovic <da.futt.news@laposte.net.invalid> - 2011-02-08 20:47 +0100
    Re: limitations on using enum as generic parameter Lew <lew@lewscanon.com> - 2011-02-08 12:31 -0800
  Re: limitations on using enum as generic parameter Ken Wesson <kwesson@gmail.com> - 2011-02-08 20:40 +0100

csiph-web