org.eclipse.emf.ecore
Interface EFactory

All Superinterfaces:
EModelElement, EObject, Notifier
All Known Subinterfaces:
ChangeFactory, CustomerFactory, DBFactory, DBItemFactory, DBPriceFactory, Ecore2EcoreFactory, Ecore2XMLFactory, EcoreFactory, EmfdbFactory, ExtFactory, EXTLibraryFactory, GenModelFactory, JavaFactory, KeyFactory, LibFactory, LibraryFactory, MappingFactory, OrderFactory, PPOFactory, QNameFactory, RefFactory, SupplierFactory, TreeFactory, TreeFactory, URefFactory, XMLNamespaceFactory, XMLTypeFactory, XSD2EcoreFactory
All Known Implementing Classes:
ChangeFactoryImpl, CustomerFactoryImpl, DBFactoryImpl, DBItemFactoryImpl, DBPriceFactoryImpl, Ecore2EcoreFactoryImpl, Ecore2XMLFactoryImpl, EcoreFactoryImpl, EFactoryImpl, EmfdbFactoryImpl, ExtFactoryImpl, EXTLibraryFactoryImpl, GenModelFactoryImpl, JavaFactoryImpl, KeyFactoryImpl, LibFactoryImpl, LibraryFactoryImpl, MappingFactoryImpl, OrderFactoryImpl, PPOFactoryImpl, QNameFactoryImpl, RefFactoryImpl, SupplierFactoryImpl, TreeFactoryImpl, TreeFactoryImpl, URefFactoryImpl, XMLNamespaceFactoryImpl, XMLTypeFactoryImpl, XSD2EcoreFactoryImpl

public interface EFactory
extends EModelElement

A representation of the model object 'EFactory'.

A factory is responsible for creating class instances, and for converting data type instances to and from String.

The following features are supported:

See Also:
EcorePackage.getEFactory()

Method Summary
 java.lang.String convertToString(EDataType eDataType, java.lang.Object instanceValue)
          Returns the literal value of the instance.
 EObject create(EClass eClass)
          Creates a new instance of the class and returns it.
 java.lang.Object createFromString(EDataType eDataType, java.lang.String literalValue)
          Creates an instance of the data type from the literal value.
 EPackage getEPackage()
          Returns the value of the 'EPackage' reference.
 void setEPackage(EPackage value)
          Sets the value of the 'EPackage' reference
 
Methods inherited from interface org.eclipse.emf.ecore.EModelElement
getEAnnotation, getEAnnotations
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

getEPackage

EPackage getEPackage()
Returns the value of the 'EPackage' reference. It is bidirectional and its opposite is 'EFactory Instance'.

It represent the package of this factory.

Returns:
the value of the 'EPackage' reference.
See Also:
setEPackage(EPackage), EcorePackage.getEFactory_EPackage(), EPackage.getEFactoryInstance()

setEPackage

void setEPackage(EPackage value)
Sets the value of the 'EPackage' reference.

Parameters:
value - the new value of the 'EPackage' reference.
See Also:
getEPackage()

create

EObject create(EClass eClass)
Creates a new instance of the class and returns it.

Parameters:
eClass - the class of the new instance.
Returns:
a new instance of the class.

createFromString

java.lang.Object createFromString(EDataType eDataType,
                                  java.lang.String literalValue)
Creates an instance of the data type from the literal value.

Parameters:
literalValue - literal value of the instance.
Returns:
an instance of the data type.
See Also:
convertToString(EDataType, Object)

convertToString

java.lang.String convertToString(EDataType eDataType,
                                 java.lang.Object instanceValue)
Returns the literal value of the instance.

Parameters:
eDataType - the data type of the value.
instanceValue - the value.
Returns:
the literal value of the instance.
See Also:
createFromString(EDataType, String)

Copyright 2001-2006 IBM Corporation and others.
All Rights Reserved.