@ConsumerType @FunctionalInterface public static interface SimpleIndexer.FileAnalyzer
Modifier and Type | Method and Description |
---|---|
void |
analyzeFile(java.io.File file,
ResourceBuilder resourceBuilder)
This method is invoked for each file being indexed.
|
void analyzeFile(java.io.File file, ResourceBuilder resourceBuilder) throws java.lang.Exception
This method is invoked for each file being indexed. Implementations may inspect the requirements and capabilities already assembled from the file. They may add zero or more capabilities and/or requirements to the supplied resource builder possibly extracted as additional metadata from the file.
The following operations on resourceBuilder
are reduced to a no-op:
ResourceBuilder.build()
does nothing, returns nullResourceBuilder.addFile(File, URI)
does nothing, returns
falseResourceBuilder.addManifest(Domain)
does nothing, returns
falseResourceBuilder.getCapabilities()
returns immutable
listResourceBuilder.getRequirements()
returns immutable
listfile
- The current fileresourceBuilder
- the resource builder used to process the filejava.lang.Exception