コード例 #1
0
 @Override
 public IType getActualType(TypeVarToTypeMap typeMap, boolean bKeepTypeVars) {
   IType typeFromMap = typeMap.getByMatcher(this, JavaClassTypeVarMatcher.instance());
   if (typeFromMap != null && !(typeFromMap instanceof ErrorType)) {
     if (typeFromMap.getName().equals(getName())) {
       IType boundingType = ((ITypeVariableType) typeFromMap).getBoundingType();
       IType boundingTypeFromMap = TypeLord.getActualType(boundingType, typeMap, bKeepTypeVars);
       if (boundingType != boundingTypeFromMap) {
         TypeVariableDefinitionImpl tvd =
             ((TypeVariableDefinitionImpl) ((ITypeVariableType) typeFromMap).getTypeVarDef())
                 .clone(boundingTypeFromMap);
         typeFromMap =
             new TypeVariableType(
                 tvd,
                 ((ITypeVariableType) typeFromMap).getTypeVarDef().getEnclosingType()
                     instanceof IFunctionType);
         ((ITypeVariableType) typeFromMap).getTypeVarDef().setVariance(getVariance());
       }
     }
     return typeFromMap;
   } else {
     return TypeSystem.getErrorType(getName());
   }
 }
コード例 #2
0
 @Override
 public IType getActualType(TypeVarToTypeMap typeMap) {
   return typeMap.getByMatcher(this, JavaClassTypeVarMatcher.instance());
 }