Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » How to access nested class defined in Java file?(Nested class)
How to access nested class defined in Java file? [message #832509] Fri, 30 March 2012 08:23 Go to next message
Evermind Mising name is currently offline Evermind Mising nameFriend
Messages: 7
Registered: July 2009
Junior Member
The xtend version is 2.3M6
Suppose we have Java code as follows:

public class Outer {
public static int staticI;

public class Inner {
public void foo() {}
}

public static class SInner {
public void staticFoo() {}
}
}

I found I cannot access Inner and SInner class in Xtend code.

class XtendCode {
def foo() {
val i = Outer::staticI // OK
val si = new Outer::SInner() // Error
Outer::SInner::staticFoo // Error
val oo = new Outer
val ii = oo.new Outer::Inner() // Error
}
}

Do I not found the right way? Or is this a missing feature?
Re: How to access nested class defined in Java file? [message #832527 is a reply to message #832509] Fri, 30 March 2012 08:40 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi it is Outer$Inner

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:eclipse update broke my xtext
Next Topic:[Xtend] How does variable declaration in switch expression work
Goto Forum:
  


Current Time: Thu Apr 25 11:41:17 GMT 2024

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

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

Back to the top