private static List<? extends TypeMirror> computeTypeParameter(
      Set<ElementKind> types, CompilationInfo info, TreePath parent, Tree error, int offset) {
    TypeParameterTree tpt = (TypeParameterTree) parent.getLeaf();

    for (Tree t : tpt.getBounds()) {
      if (t == error) {
        types.add(ElementKind.CLASS); // XXX: class/interface/enum/annotation?
        return null;
      }
    }

    return null;
  }
 public IJavaClassType[] getBounds() {
   if (_bounds == null) {
     final List<? extends Tree> boundsList = _typeParameter.getBounds();
     if (!boundsList.isEmpty()) {
       _bounds = new IJavaClassType[boundsList.size()];
       for (int i = 0; i < _bounds.length; i++) {
         _bounds[i] = JavaSourceType.createType(_owner, boundsList.get(i));
       }
     } else {
       _bounds = new IJavaClassType[] {JavaTypes.OBJECT().getBackingClassInfo()};
     }
   }
   return _bounds;
 }
 private JavaSourceTypeVariable(ITypeInfoResolver owner, TypeParameterTree typeParameter) {
   _owner = owner;
   _name = typeParameter.getName().toString();
   _typeParameter = typeParameter;
   _variance = Variance.DEFAULT;
 }