system/src/sc/lang/java/ParamTypeDeclaration.java
public static Object convertBaseTypeContext(ITypeParamContext ctx, Object baseType) {
      if (ctx != null && baseType instanceof ParamTypeDeclaration) {
         ParamTypeDeclaration newType = null;
         ParamTypeDeclaration origType = (ParamTypeDeclaration) baseType;
         List<?> typeParams = origType.getClassTypeParameters();
         if (typeParams != null) {
            for (int ix = 0; ix < typeParams.size(); ix++) {
               Object typeParam = typeParams.get(ix);
               Object newVal = ctx.getTypeForVariable(typeParam, true);
               if (newVal != null && newVal != typeParam) {
                  if (newType == null)
                     newType = origType.cloneForNewTypes();
                  newType.setTypeParamIndex(ix, newVal);
               }
            }
         }
         if (newType != null)
            baseType = newType;
      }
      return baseType;
   }
// If we have something like class Foo<A,B> extends Bar<C,D> - need to perform the type mapping on a copy of the param type here
If we have something like class Foo extends Bar - need to perform the type mapping on a copy of the param type here
If we have something like class Foo extends Bar - need to perform the type mapping on a copy of the param type here
public static Object convertBaseTypeContext(ITypeParamContext ctx, Object baseType) {
      if (ctx != null && baseType instanceof ParamTypeDeclaration) {
         ParamTypeDeclaration newType = null;
         ParamTypeDeclaration origType = (ParamTypeDeclaration) baseType;
         List<?> typeParams = origType.getClassTypeParameters();
         if (typeParams != null) {
            for (int ix = 0; ix < typeParams.size(); ix++) {
               Object typeParam = typeParams.get(ix);
               Object newVal = ctx.getTypeForVariable(typeParam, true);
               if (newVal != null && newVal != typeParam) {
                  if (newType == null)
                     newType = origType.cloneForNewTypes();
                  newType.setTypeParamIndex(ix, newVal);
               }
            }
         }
         if (newType != null)
            baseType = newType;
      }
      return baseType;
   }
public static Object convertBaseTypeContext ( ITypeParamContext ctx , Object baseType ) { if ( ctx != null && baseType instanceof ParamTypeDeclaration ) { ParamTypeDeclaration newType = null ; ParamTypeDeclaration origType = ( ParamTypeDeclaration ) baseType ; List < ? > typeParams = origType . getClassTypeParameters ( ) ; if ( typeParams != null ) { for ( int ix = 0 ; ix < typeParams . size ( ) ; ix ++ ) { Object typeParam = typeParams . get ( ix ) ; Object newVal = ctx . getTypeForVariable ( typeParam , true ) ; if ( newVal != null && newVal != typeParam ) { if ( newType == null ) newType = origType . cloneForNewTypes ( ) ; newType . setTypeParamIndex ( ix , newVal ) ; } } } if ( newType != null ) baseType = newType ; } return baseType ; }
If we have something like class Foo<A,B> extends Bar<C,D> - need to perform the type mapping on a copy of the param type here
If we have something like class Foo<A B > extends Bar<C D > - need to perform the type mapping on a copy of the param type here