Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » package-private visibility?
package-private visibility? [message #890282] Thu, 21 June 2012 18:15 Go to next message
Edwin Park is currently offline Edwin ParkFriend
Messages: 124
Registered: July 2009
Senior Member

Xtend makes all def methods public by default, and you can also explicitly specify public/private/protected visibility. However in Java there is a fourth kind of visibility: package-private, which is the default in Java if no explicit visibility modifier is set (

There is one case where I like to use package-private methods a lot and that is for testing. This way I can put my test classes in the same package as the class under test to get access to internal functionality, but I don't expose these internal functions to the whole world.

Is there any way in Xtend to specify package-private visibility for methods? If not is there some other recommended way to allow test code to access internal functions defined in Xtend classes without making internal stuff public?


[Updated on: Thu, 21 June 2012 18:15]

Report message to a moderator

Re: package-private visibility? [message #890286 is a reply to message #890282] Thu, 21 June 2012 18:29 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 12033
Registered: July 2009
Senior Member

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Previous Topic:ContentAssist with @-Symbol
Next Topic:XbaseWithAnnotations
Goto Forum:

Current Time: Thu Jun 21 01:18:18 GMT 2018

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

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

Back to the top