code: public static Type capture(Type type) {
  		VarMap varMap = new VarMap();
  		List<CaptureTypeImpl> toInit = new ArrayList<>();
  		if (type instanceof ParameterizedType) {
  			ParameterizedType pType = (ParameterizedType)type;
  			Class<?> clazz = (Class<?>)pType.getRawType();
  			Type[] arguments = pType.getActualTypeArguments();
  			TypeVariable<?>[] vars = clazz.getTypeParameters();
  			Type[] capturedArguments = new Type[arguments.length];
  			assert arguments.length == vars.length;
  			for (int i = 0; i < arguments.length; i++) {
  				Type argument = arguments[i];
  				if (argument instanceof WildcardType) {
  					CaptureTypeImpl captured = new CaptureTypeImpl((WildcardType)argument, vars[i]);
  					argument = captured;
  					toInit.add(captured);
  				}
  				capturedArguments[i] = argument;
  				varMap.add(vars[i], argument);
  			}
  			for (CaptureTypeImpl captured : toInit) {
  				captured.init(varMap);
  			}
  			Type ownerType = (pType.getOwnerType() == null) ? null : capture(pType.getOwnerType());
  			return new ParameterizedTypeImpl(clazz, capturedArguments, ownerType);
  		} else {
  			return type;
  		}
  	}
docs: Applies capture conversion to the given type.