KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > emf > ecore > EFactory


1 /**
2  * <copyright>
3  *
4  * Copyright (c) 2002-2004 IBM Corporation and others.
5  * All rights reserved. This program and the accompanying materials
6  * are made available under the terms of the Eclipse Public License v1.0
7  * which accompanies this distribution, and is available at
8  * http://www.eclipse.org/legal/epl-v10.html
9  *
10  * Contributors:
11  * IBM - Initial API and implementation
12  *
13  * </copyright>
14  *
15  * $Id: EFactory.java,v 1.4 2005/06/08 06:20:10 nickb Exp $
16  */

17 package org.eclipse.emf.ecore;
18
19
20 /**
21  * <!-- begin-user-doc -->
22  * A representation of the model object '<em><b>EFactory</b></em>'.
23  * <p>
24  * A factory is responsible for {@link #create creating} class instances,
25  * and for converting data type instances {@link #convertToString to} and {@link #createFromString from} <code>String</code>.
26  * <p>
27  * <!-- end-user-doc -->
28  *
29  * <p>
30  * The following features are supported:
31  * <ul>
32  * <li>{@link org.eclipse.emf.ecore.EFactory#getEPackage <em>EPackage</em>}</li>
33  * </ul>
34  * </p>
35  *
36  * @see org.eclipse.emf.ecore.EcorePackage#getEFactory()
37  * @model
38  * @generated
39  */

40 public interface EFactory extends EModelElement
41 {
42   /**
43    * Returns the value of the '<em><b>EPackage</b></em>' reference.
44    * It is bidirectional and its opposite is '{@link org.eclipse.emf.ecore.EPackage#getEFactoryInstance <em>EFactory Instance</em>}'.
45    * <!-- begin-user-doc -->
46    * <p>
47    * It represent the package of this factory.
48    * </p>
49    * <!-- end-user-doc -->
50    * @return the value of the '<em>EPackage</em>' reference.
51    * @see #setEPackage(EPackage)
52    * @see org.eclipse.emf.ecore.EcorePackage#getEFactory_EPackage()
53    * @see org.eclipse.emf.ecore.EPackage#getEFactoryInstance
54    * @model opposite="eFactoryInstance" resolveProxies="false" required="true" transient="true"
55    * @generated
56    */

57   EPackage getEPackage();
58
59   /**
60    * Sets the value of the '{@link org.eclipse.emf.ecore.EFactory#getEPackage <em>EPackage</em>}' reference.
61    * <!-- begin-user-doc -->
62    * <!-- end-user-doc -->
63    * @param value the new value of the '<em>EPackage</em>' reference.
64    * @see #getEPackage()
65    * @generated
66    */

67   void setEPackage(EPackage value);
68
69   /**
70    * <!-- begin-user-doc -->
71    * Creates a new instance of the class and returns it.
72    * @param eClass the class of the new instance.
73    * @return a new instance of the class.
74    * <!-- end-user-doc -->
75    * @model
76    * @generated
77    */

78   EObject create(EClass eClass);
79
80   /**
81    * <!-- begin-user-doc -->
82    * Creates an instance of the data type from the literal value.
83    * @param literalValue literal value of the instance.
84    * @return an instance of the data type.
85    * @see #convertToString(EDataType, Object)
86    * @ignore
87    * <!-- end-user-doc -->
88    * @model
89    * @generated
90    */

91   Object JavaDoc createFromString(EDataType eDataType, String JavaDoc literalValue);
92
93   /**
94    * <!-- begin-user-doc -->
95    * Returns the literal value of the instance.
96    * @param eDataType the data type of the value.
97    * @param instanceValue the value.
98    * @return the literal value of the instance.
99    * @see #createFromString(EDataType, String)
100    * @ignore
101    * <!-- end-user-doc -->
102    * @model
103    * @generated
104    */

105   String JavaDoc convertToString(EDataType eDataType, Object JavaDoc instanceValue);
106
107 }
108
Popular Tags