|
|
Re: generate "wrapper" classes from annotated java [message #630382 is a reply to message #630302] |
Fri, 01 October 2010 19:28 |
Missing name Missing name Messages: 13 Registered: October 2010 |
Junior Member |
|
|
Hi Ed and thanks for your quick response.
I tried your suggestion but it did not work for me. Apparently I'm doing something wrong. Let me explain what I did.
1. I have a bunch of interfaces that I would like to wrap in EMF classes, e.g.,
package mypackage;
public interface Person {}
package mypackage;
public interface Man extends Person {}
2. I followed your suggestion, created a class MyPackage.java and put some annotations in it
package mypackage;
/**
* @model kind="package"
* @model instanceClass="mypackage.Person"
* @model instanceClass="mypackage.Man
*/
public class InterfacesPackage {}
3. I created a genmodel and imported the annotated java classes.
4. What I got was an ecore model that only contains one packege mypackage.
What is the right way to annotate MyPackage? In addition, do I need to annotate the interfaces as well, e.g.
package mypackage;
/**
* @model interface="true" abstract="true"
*/
public interface Person {}
Your help is very much appreciated.
Cheers,
Stanislav
[Updated on: Fri, 01 October 2010 19:54] Report message to a moderator
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.02804 seconds