EMF uses the factory pattern. Please try EcoreFactory.eInstance.createEObject()
.
If you want to instantiate other objects that implement EObject, you'll have to use the respective factory for your own EPackage. The code should read MyPackFactory.eInstance.createObject()
where MyPackFactory
should be replaced by your concrete factory and createObject()
has to be replaced by the type that you want to instantiate, e.g. createObjectValue()