You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@groovy.apache.org by "Mikko Värri (Jira)" <ji...@apache.org> on 2020/05/27 12:19:00 UTC

[jira] [Updated] (GROOVY-9576) groovydoc: $INIT static method shown on Groovy enums

     [ https://issues.apache.org/jira/browse/GROOVY-9576?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mikko Värri updated GROOVY-9576:
--------------------------------
    Description: 
I should've probably spotted this in GROOVY-9568 but didn't.

enums have a special {{$INIT}} static method that can be used to create instances of the enum:

{code}
enum GE{}
final ge = GE.$INIT(['', 0] as Object[])
assert ge.class == GE
{code}

That should probably be hidden from groovydocs.

  was:
I should've probably spotted this in GROOVY-9568 but didn't.

Also, enums have a special {{$INIT}} static method that can be used to create instances of the enum:

{code}
enum GE{}
final ge = GE.$INIT(['', 0] as Object[])
assert ge.class == GE
{code}

That should probably be hidden from groovydocs.


> groovydoc: $INIT static method shown on Groovy enums
> ----------------------------------------------------
>
>                 Key: GROOVY-9576
>                 URL: https://issues.apache.org/jira/browse/GROOVY-9576
>             Project: Groovy
>          Issue Type: Bug
>          Components: GroovyDoc
>            Reporter: Mikko Värri
>            Priority: Major
>
> I should've probably spotted this in GROOVY-9568 but didn't.
> enums have a special {{$INIT}} static method that can be used to create instances of the enum:
> {code}
> enum GE{}
> final ge = GE.$INIT(['', 0] as Object[])
> assert ge.class == GE
> {code}
> That should probably be hidden from groovydocs.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)