Martinho0330 / javaparser

Automatically exported from code.google.com/p/javaparser
0 stars 0 forks source link

Expose a way to create a new Parser instance. #60

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
If I need to parse 100 sources in parallel using say 10 threads. Since I need 
async usage, I must do JavaParser.cacheParser(false). But this means the 100 
sources will use 100 instances of ASTParser. Since this is being done in 10 
threads, I would like to have 10 instances of the parser and use them.

Either adding

ASTParser newParser()

and

parse(ASTParser, inputstream, encoding)

to JavaParser or making ASTParser public will do the trick. 

Original issue reported on code.google.com by noogler....@gmail.com on 19 Sep 2012 at 5:00