It's for Type representation where as CompilationUnit is for AST representation, and parser object links between the two using Parser#setSource(ICompilationUnit); and parser.createAST(null).
In order to get the ICompilationUnit from java source code, you need to start from Workspace, IProject, IJavaProject and then find IType(The by using findType(TYPE_NAME).
No comments:
Post a Comment