The connection is through the Efactories and the EDataType. In EMF
datatype instances (such as Strong, long, etc.) are not EMF objects in
themselves. An EDataType instance can be any Java class. The EDataType
model object contains as an attribute setting on it the java class that
the EDataType model object is modeling. Then the EFactory is then used
to serialize the datatype to an XMI file and to reconstruct the datatype
from the XMI file. By default for datatypes it assumes that it can use
toString() to put it out to an XMI file and use a constructor on the
Java class that takes a String to create the instance. If the desired
datatype java class does not follow both of these conventions then the
EFactory must be customized to handle it.
Enumerations are handled entirely in specialized code for enums.