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


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

Re: What is this? (Java syntax)

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!news2.arglkargh.de!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Jeff Higgins <jeff@invalid.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: What is this? (Java syntax)
Date Tue, 14 Apr 2015 14:13:57 -0400
Organization A noiseless patient Spider
Lines 25
Message-ID <mgjlc6$d3e$1@dont-email.me> (permalink)
References <syntax-20150414183627@ram.dialup.fu-berlin.de>
Mime-Version 1.0
Content-Type text/plain; charset=windows-1252; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Tue, 14 Apr 2015 18:13:26 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="c50a9e5d554cfaba13eda1c71e805135"; logging-data="13422"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+p77nDUEMHYaKNFJOdYPXFsGPxUmuaHg8="
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.6.0
In-Reply-To <syntax-20150414183627@ram.dialup.fu-berlin.de>
Cancel-Lock sha1:5UdIlf0MlANrOmpkvGU/ciY+M3Y=
Xref csiph.com comp.lang.java.programmer:31571

Show key headers only | View raw


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«?
>
>    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?
>
Someone suggests running reg might be a more robust solution.
<https://technet.microsoft.com/en-us/library/cc732643.aspx>

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


Thread

Re: What is this? (Java syntax) Jeff Higgins <jeff@invalid.invalid> - 2015-04-14 14:13 -0400

csiph-web