
Java™ Metadata Interface(JMI) Specification JSR 040 Java Community Process http://www.jcp.org/ Version 1.0 Final Specification 07-June-2002 Technical comments: [email protected] Specification Lead: Ravi Dirckze, Unisys Corporation DISCLAIMER This document and its contents are furnished "as is" for informational purposes only, and are subject to change without notice. Unisys Corporation (Unisys) does not represent or warrant that any product or business plans expressed or implied will be fulfilled in any way. Any actions taken by the user of this doc- ument in response to the document or its contents shall be solely at the risk of the user. UNISYS MAKES NO WARRANTIES, EXPRESSED OR IMPLIED, WITH RESPECT TO THIS DOCUMENT OR ITS CONTENTS, AND HEREBY EXPRESSLY DISCLAIMS ANY AND ALL IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR USE OR NON- INFRINGEMENT. IN NO EVENT SHALL UNISYS BE HELD LIABLE FOR ANY DIRECT, INDIRECT, SPECIAL OR CONSEQUENTIAL DAM- AGES IN CONNECTION WITH OR ARISING FROM THE USE OF ANY PORTION OF THE INFORMATION. Copyright Copyright © 2002 Unisys Corporation. All rights reserved. Copyright © 2002 Sun Microsystems, Inc.. All rights reserved. This product or document is protected by copyright and distributed under licenses restricting its use, copying, distribution, and decompilation. Nopartofthis product or documentation may be reproduced in any form by any means without prior written authorization of the copyright holders, or any of their licen- sors, if any. Any unauthorized use may be a violation of domestic or international law. RESTRICTED RIGHTS LEGEND: Use, duplication, or disclosure by the U.S. Government and its agents is subject to the restrictions of FAR 52.227- 14(g)(2)(6/87) and FAR 52.227-19(6/87), or DFAR 252.227-7015(b)(6/95) and DFAR 227.7202-3(a). Trademarks Sun, Sun Microsystems, the Sun logo, Java, JavaBeans, Enterprise JavaBeans, JavaChip, JavaStation, JavaOS, Java Studio, Java WorkShop, Solaris, Solaris for Intranets, Solaris for ISPs, Solstice Enterprise Manager, Sun Internet Administrator, Sun Internet FTP Server, Sun Internet Mail Server, Sun Internet News Server, Sun Internet Services Monitor, SunScreen, Sun WebServer, and The Network Is The Computer are trademarks, registered trademarks, or ser- vice marks of Sun Microsystems, Inc. in the U.S. and other countries. All SPARC trademarks are used under license and are trademarks or registered trade- marks of SPARC International, Inc. in the U.S. and other countries. Products bearing SPARC trademarks are based upon an architecture developed by Sun Microsystems, Inc. Information subject to change without notice. OMG, OBJECT MANAGEMENT GROUP, CORBA, CORBA ACADEMY, CORBA ACADEMY & DESIGN, THE INFORMATION BROKERAGE, OBJECT REQUEST BROKER, OMG IDL, CORBAFACILITIES, CORBASERVICES, CORBANET, CORBAMED, CORBADOMAINS, GIOP, IIOP, OMA, CORBA THE GEEK, UNIFIED MODELING LANGUAGE, UML, and UML CUBE LOGO are registered trademarks or trademarks of the Object Management Group, Inc. PostScript is a registered trademark of Adobe Systems, Inc. All other product or company names mentioned are used for identification purposes only, and may be trademarks of their respective owners. Please Recycle Contents 1. Introduction ............................................................................................................................1 Metadata Interoperability ..................................................................................................1 The Java Metadata Interface Specification .......................................................................1 Platforms ...........................................................................................................................2 Target Audience ................................................................................................................2 JMI Expert Group ..............................................................................................................3 Acknowledgements ...........................................................................................................3 2. JMI Overview ........................................................................................................................5 The MOF Four-Layered Architecture ...............................................................................5 The MOF Interfaces ..........................................................................................................6 Introduction to JMI ............................................................................................................7 JMI and the J2EE Platform ...........................................................................................7 Some JMI Use-Cases ....................................................................................................8 3. An Overview of the MOF Model .........................................................................................11 The MOF Model ..............................................................................................................12 Common Superclasses ................................................................................................13 Containment Hierarchy ..............................................................................................15 Types ..........................................................................................................................16 Features .......................................................................................................................19 Tags ............................................................................................................................20 MOF Model Elements ................................................................................................20 MOF Model Associations ...........................................................................................32 Discrepancies between JMI and MOF ............................................................................35 XMI .................................................................................................................................35 4. MOF to Java Mapping .........................................................................................................37 Metaobjects and Interfaces ..............................................................................................37 Metaobject Type Overview ........................................................................................37 The Metaobject Interface Hierarchy ...........................................................................38 Computational Semantics for the Java Mapping .............................................................40 Equality in the Java Mapping .....................................................................................40 The Java NULL Value ................................................................................................40 JMI Collection Semantics ...........................................................................................40 Lifecycle Semantics for the Java Mapping ................................................................41 Association Access and Update Semantics for the Java Mapping .............................43 Attribute Access and Update Semantics for the Java Interface Mapping ...................44 i Reference Semantics for the Java Mapping ............................................................... 47 Cluster Semantics for the Java Mapping ................................................................... 47 Atomicity Semantics for the Java Mapping ............................................................... 48 The Supertype Closure Rule ...................................................................................... 48 Primitive Data Type mapping ......................................................................................... 48 Exception Framework ..................................................................................................... 49 Preconditions for Java Interface Generation .................................................................. 49 Standard Tags for the Java Mapping .............................................................................. 50 Tag for Specifying Package Prefix ............................................................................ 51 Tag for Providing Substitute Identifiers .................................................................... 51 Tag for specifying prefix for generated methods ....................................................... 52 Tag for controlling Lifecycle API generation ............................................................ 52 Java Generation Rules .................................................................................................... 53 Rules for Splitting MOF Model.ModelElement Names into Words ......................... 53 Rules for Generating Identifiers ................................................................................ 54 Literal String Values .................................................................................................. 55 Generation Rules for Attributes, AssociationEnds, References, Constants, and Parameters ..................................................................................... 55 Java Mapping Templates ...............................................................................................
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages142 Page
-
File Size-