Initializing field in generated class [message #890944] |
Sat, 23 June 2012 10:25  |
Eclipse User |
|
|
|
Hi,
Bases on the domain model example I want to write a little language. I have some problems to figurwe out, how to work with xtend2 to generate my resulting classes.
I found out, that
members += table.toField('abc', table.newTypeRef('int')) [
^static = true
]
gives me
private static int abc;
but I would like to get
private static int abc = 42;
I couldn't figure it out. Also I didn't find how to create a static initializer.
static {
abc = 42;
}
Is there any tutorial for an extended use of this way to generate java classes?
Any help welcome.
Andreas
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06222 seconds