enum with constructor

197 views
Skip to first unread message

lars.schu...@sinnerschrader.com

unread,
Jan 14, 2014, 7:43:23 AM1/14/14
to xtend...@googlegroups.com
Is it possible to create enums with constructs in xtend? I just fund a simple enum declaration like:
enum A {
  FOO, BAR
}

e.g. in Java:
public enum Country
{
  GERMANY( Locale.GERMANY ), UK( Locale.UK ), CHINA( Locale.CHINA );

  private Locale country;

  private Country( Locale country )
  {
    this.country = country;
  }
}

Sven Efftinge

unread,
Jan 14, 2014, 7:47:17 AM1/14/14
to xtend...@googlegroups.com
No, as of now only simple enums are supported. You need to declare more complex ones in Java.

--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

signature.asc
Reply all
Reply to author
Forward
0 new messages