Skip to main content



      Home
Home » Modeling » TMF (Xtext) » package-private visibility?
package-private visibility? [message #890282] Thu, 21 June 2012 14:15 Go to next message
Eclipse UserFriend
Hi,

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 (http://docs.oracle.com/javase/tutorial/java/javaOO/accesscontrol.html).

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?

Thanks,
Edwin

[Updated on: Thu, 21 June 2012 14:15] by Moderator

Re: package-private visibility? [message #890286 is a reply to message #890282] Thu, 21 June 2012 14:29 Go to previous message
Eclipse UserFriend
https://bugs.eclipse.org/bugs/show_bug.cgi?id=378267
Previous Topic:ContentAssist with @-Symbol
Next Topic:XbaseWithAnnotations
Goto Forum:
  


Current Time: Fri Jul 25 18:37:21 EDT 2025

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

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

Back to the top