Package spoon.support.compiler.jdt
Interface CompilationUnitFilter
public interface CompilationUnitFilter
This interface is used by instances of
SpoonModelBuilder
to
exclude particular CompilationUnit
s while
generating a CtModel
with
SpoonModelBuilder.build(spoon.compiler.builder.JDTBuilder)
.
This interface is useful for large sized software system where traversing
all files takes several minutes. Unlike the approach of adding a subset of
the files to examine, filtering unwanted files produces a more precise
CtModel
since all files will be compiled (but not
transformed).-
Method Summary
Modifier and TypeMethodDescriptionboolean
Tests if the file with pathpath
should be excluded from theCtModel
create bySpoonModelBuilder.build(spoon.compiler.builder.JDTBuilder)
.
-
Method Details
-
exclude
Tests if the file with pathpath
should be excluded from theCtModel
create bySpoonModelBuilder.build(spoon.compiler.builder.JDTBuilder)
.- Parameters:
path
- Path to the file that may or may not be excluded.- Returns:
true
if and only ifpath
should be excluded,false
otherwise.
-