|
|
|
|
|
Re: No .getEEnumLiteral() method in Enumerator interface [message #424717 is a reply to message #424713] |
Mon, 03 November 2008 12:59 |
Ed Merks Messages: 33141 Registered: July 2009 |
Senior Member |
|
|
Alex,
Yes, it was intentional to make the interface for enumerators not
depend on Ecore. Consider for example that for an XML Schema based
model we always generated a second EDataType that wraps the generated
enum class so that the resulting EDataType supports null as a value. In
that case, there is always an EEnum and an EDataType, either of which
could be the EClassifier for the enumerator instance. You're right
though that we could have designed it differently...
Alex Shatalin wrote:
> Hello Ed,
>
>> There's EEnum.getEEnumLiteralByLiteral(String) but I guess that's not
>> what you mean. Enumerator is in org.eclipse.emf.common and knows
> Yes, in the current code I have a place where I can get Enumerator
> instance and have to return meta-object for it (EEnum instance). I
> know that I can work around this place by modifying my code especially
> taking into account your comment concerning other EDataType instances.
>
> I was just thinking about the reason why Enumerator has no .eEnum()
> method (just like EObject.eClass()) and it looks like it was done to
> keep Enumerator interface out of dependency on ecore plugin.
> Was this interface intentionally places out of Ecore?
> -----------------
> Alex Shatalin
>
>
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03701 seconds