private void setClassPath ( ) throws IOException { String fullPath = file . getAbsolutePath ( ) ; String rootPath = fullPath . substring ( 0 , fullPath . lastIndexOf ( classFile . getRelativePath ( ) ) ) ; List < File > classPath = new ArrayList <> ( ) ; classPath . add ( new File ( rootPath ) ) ; parserEnv . fileManager ( ) . setLocation ( StandardLocation . CLASS_PATH , classPath ) ; }
Set classpath to the root path of the input file to support typeElement lookup .