public static EClassifier getTypeArgument(EClass eClass, EGenericType eGenericType) { ETypeParameter eTypeParameter = eGenericType.getETypeParameter(); if( eTypeParameter != null ) { for (EGenericType eGenericSuperType : eClass.getEAllGenericSuperTypes()) { EList<ETypeParameter> eTypeParameters = eGenericSuperType .getEClassifier().getETypeParameters(); int index = eTypeParameters.indexOf(eTypeParameter); if (index != -1 && eGenericSuperType.getETypeArguments().size() > index) { return getTypeArgument(eClass, eGenericSuperType .getETypeArguments().get(index)); } } return null; } else { return eGenericType.getEClassifier(); } }
for (EGenericType eGenericSuperType : eClass.getEAllGenericSuperTypes())
for (EGenericType eGenericSuperType : eClass.getEAllGenericSuperTypes())
EList<EGenericType> eAllGenericSuperTypes = eClass.getEAllGenericSuperTypes(); for (EGenericType eGenericSuperType : eAllGenericSuperTypes)
public static EClassifier getTypeArgument(EClass eClass, EGenericType eGenericType) { ETypeParameter eTypeParameter = eGenericType.getETypeParameter(); if( eTypeParameter != null ) { for (EGenericType eGenericSuperType : eClass.getEAllGenericSuperTypes()) { EList<ETypeParameter> eTypeParameters = eGenericSuperType .getEClassifier().getETypeParameters(); int index = eTypeParameters.indexOf(eTypeParameter); if (index != -1 && eGenericSuperType.getETypeArguments().size() > index) { return getTypeArgument(eClass, eGenericSuperType .getETypeArguments().get(index)); } } return null; } else { return eGenericType.getEClassifier(); } }
EList<EGenericType> eAllGenericSuperTypes = eClass.getEAllGenericSuperTypes(); for (EGenericType eGenericSuperType : eAllGenericSuperTypes)
for (EGenericType eGenericType : getEcoreClass().getEAllGenericSuperTypes())
for (EGenericType eGenericType : getEcoreClass().getEAllGenericSuperTypes())
for (EGenericType eGenericSuperType : instanceEClass.getEAllGenericSuperTypes())
for (EGenericType eGenericSuperType : instanceEClass.getEAllGenericSuperTypes())
for (EGenericType eGenericSuperType : context.getEcoreClass().getEAllGenericSuperTypes())
if (eSuperType instanceof EClass) result.addAll(((EClass)eSuperType).getEAllGenericSuperTypes());
if (eSuperType instanceof EClass) result.addAll(((EClass)eSuperType).getEAllGenericSuperTypes());
for (EGenericType eGenericSuperType : context.getEcoreClass().getEAllGenericSuperTypes())
for (EGenericType eGenericSuperType : eGenericTypeEClass.getEAllGenericSuperTypes())
for (EGenericType eGenericSuperType : eGenericTypeEClass.getEAllGenericSuperTypes())