Code example for FileFilter

Methods: accept

0
 
public abstract class AbstractMetadataExtractor implements MetadataExtractor { 
	@Override 
	public boolean canExtractFrom(File moduleDirectory, FileFilter filter) {
		File mdSource = new File(moduleDirectory, getPrimarySource());
		return filter.accept(mdSource) && mdSource.exists();
	} 
 
	@Override 
	public boolean hasTypesAndProviders() { 
		return false; 
	} 
 
	@Override 
	public Metadata parseMetadata(File moduleDirectory, boolean includeTypesAndChecksums, FileFilter filter,
			File[] extractedFrom, Diagnostic result) throws IOException {
		File metadataFile = new File(moduleDirectory, getPrimarySource());
		if(extractedFrom != null)
			extractedFrom[0] = metadataFile;
 
Experience pair programming with AI  Get Codota for Java