Skip to main content



      Home
Home » Modeling » TMF (Xtext) » [Xtend2] How to write anonymous inner class?
[Xtend2] How to write anonymous inner class? [message #778207] Wed, 11 January 2012 11:42 Go to next message
Eclipse UserFriend
Hi! I realize that I can use closures to implement interfaces / extend base classes with only one method.
To do the same for interfaces / base classes with multiple methods, Java supports anonymous inner classes. This way, I can capture values from the surrounding method, reducing boilerplate code.

How can I do the same thing in Xtend?
Re: [Xtend2] How to write anonymous inner class? [message #778234 is a reply to message #778207] Wed, 11 January 2012 15:50 Go to previous message
Eclipse UserFriend
Hi,

no this is currently not possible.

~Christian
Re: [Xtend2] How to write anonymous inner class? [message #778421 is a reply to message #778207] Wed, 11 January 2012 11:57 Go to previous message
Eclipse UserFriend
Hi Daniel,

it's currently not supported in Xtend.

Regards,
Sebastian
--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com

Am 11.01.12 17:42, schrieb Daniel Wolf:
> Hi! I realize that I can use closures to implement interfaces / extend
> base classes with only one method.
> To do the same for interfaces / base classes with multiple methods, Java
> supports anonymous inner classes. This way, I can capture values from
> the surrounding method, reducing boilerplate code.
>
> How can I do the same thing in Xtend?
Previous Topic:outline
Next Topic:content assist across files
Goto Forum:
  


Current Time: Sat Jul 12 00:13:08 EDT 2025

Powered by FUDForum. Page generated in 0.03545 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top