Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.java.programmer > #31570
| From | Jeff Higgins <jeff@invalid.invalid> |
|---|---|
| Newsgroups | comp.lang.java.programmer |
| Subject | Re: What is this? (Java syntax) |
| Date | 2015-04-14 13:24 -0400 |
| Organization | A noiseless patient Spider |
| Message-ID | <mgjiej$1et$1@dont-email.me> (permalink) |
| References | <syntax-20150414183627@ram.dialup.fu-berlin.de> <mgjhj1$t0n$1@dont-email.me> |
On 04/14/2015 01:09 PM, Jeff Higgins wrote:
> On 04/14/2015 12:43 PM, Stefan Ram wrote:
>> I found this on a web page:
>>
>> private enum WinRegistryMethod {
>> OpenKey("WindowsRegOpenKey", int.class, byte[].class, int.class) {
>> @Override
>> protected void verifyReturnValue(Object retValue)
>> ...
>>
>> What is the part beginning at »OpenKey«?
>
> A constructor for the enum constant OpenKey of enum type WinRegistryMethod.
An example:
<http://www.basilv.com/psd/blog/2006/advanced-uses-of-java-5-enums>
>
>>
>> I would understand this if there was a »new« in front of
>> »OpenKey«. In this case, it would be an instance creation
>> expression (anonymous inner class). But there is no »new«.
>>
>> According to the web page, the above code is Java code and it
>> seems to have been used successfully. Do I miss some part of
>> the Java syntax?
>>
>> Or maybe, the »new« was in the source code of the poster and
>> got lost for some technical reason?
>>
>
Back to comp.lang.java.programmer | Previous | Next — Previous in thread | Find similar | Unroll thread
Re: What is this? (Java syntax) Jeff Higgins <jeff@invalid.invalid> - 2015-04-14 13:09 -0400 Re: What is this? (Java syntax) Jeff Higgins <jeff@invalid.invalid> - 2015-04-14 13:24 -0400
csiph-web