Chapter 7. Java Source Code
If you are more familiar with Java programming than you are with modeling tools, you might find that the easiest way to describe your model is to use Java code. In this chapter, we explore the Java source code constructs and the special annotations that are needed to describe an Ecore model.
As you have seen in Chapter 5, an Ecore model is made up of one or more EPackages, each of which contains a number of EClasses, where each EClass has some number of EAttributes, EReferences, and EOperations. An EPackage can also contain EDataTypes and EEnums. If you specify your model using Java source code, the EClasses are given as Java interfaces. The EAttributes, EReferences, and EOperations will be inferred from the methods ...
Get EMF: Eclipse Modeling Framework Second Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.