code: public Type parseType(String expr, TypeElement scope) {
          if (expr == null || expr.equals(""))
              throw new IllegalArgumentException();
          compiler = JavaCompiler.instance(context);
          JavaFileObject prev = compiler.log.useSource(null);
          ParserFactory parserFactory = ParserFactory.instance(context);
          Attr attr = Attr.instance(context);
          try {
              CharBuffer buf = CharBuffer.wrap((expr+"\u0000").toCharArray(), 0, expr.length());
              Parser parser = parserFactory.newParser(buf, false, false, false);
              JCTree tree = parser.parseType();
              return attr.attribType(tree, (Symbol.TypeSymbol)scope);
          } finally {
              compiler.log.useSource(prev);
          }
      }
docs: For internal use only.  This method will be
  removed without warning.
  @param expr the type expression to be analyzed
  @param scope the scope in which to analyze the type expression
  @return the type
  @throws IllegalArgumentException if the type expression of null or empty