How to get the specialized type of an EStructuralFeature's getEType()?

139 Views Asked by At

I have a method where an EStructuralFeature comes in as a parameter. I can get the type of the feature via the method getEType() and get the "real" Java class via the EType's getInstanceClass() method. So far so good. But what if this type is generic, and I want to know its special type? Unfortunately this information is gone due to Java's Type Erasure, but is there a way to achieve this by using EMF's functionality?

1

There are 1 best solutions below

1
On

EStructuralFeature is an interface extends to ETypedElement

more details here:

[http://download.eclipse.org/modeling/emf/emf/javadoc/2.7.0/org/eclipse/emf/ecore/EStructuralFeature.html]