public IType getActualTypeInContainer(IFeatureInfo container, IType type) { IType ownerType = container.getOwnersType(); if (ownerType.isParameterizedType()) { TypeVarToTypeMap actualParamByVarName = TypeLord.mapTypeByVarName(ownerType, ownerType); if (container instanceof IGenericMethodInfo) { for (IGenericTypeVariable tv : ((IGenericMethodInfo) container).getTypeVariables()) { if (actualParamByVarName.isEmpty()) { actualParamByVarName = new TypeVarToTypeMap(); } actualParamByVarName.put( tv.getTypeVariableDefinition().getType(), tv.getTypeVariableDefinition().getType()); } type = TypeLord.getActualType(type, actualParamByVarName, true); } } return type; }