1234567891011121314151617181920212223242526272829303132333435363738394041424344(* Copyright (C) 2012 Yoann Padioleau
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License (GPL)
* version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* file license.txt for more details.
*)moduleFT=File_typemoduleV=Visitor_java(*****************************************************************************)(* Filenames *)(*****************************************************************************)letfind_source_files_of_dir_or_filesxs=Common.files_of_dir_or_files_no_vcs_nofilterxs|>List.filter(funfilename->matchFile_type.file_type_of_filefilenamewith|FT.PL(FT.Java)->true|_->false)|>Common.sort(*****************************************************************************)(* Extract infos *)(*****************************************************************************)letextract_info_visitorrecursor=letglobals=ref[]inlethooks={V.default_visitorwithV.kinfo=(fun(_k,_)i->Common.pushiglobals)}inbeginletvout=V.mk_visitorhooksinrecursorvout;List.rev!globalsendletii_of_anyany=extract_info_visitor(funvisitor->visitorany)