Package aQute.bnd.osgi.repository
Interface SimpleIndexer.FileAnalyzer
-
- Enclosing class:
- SimpleIndexer
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@ConsumerType @FunctionalInterface public static interface SimpleIndexer.FileAnalyzer
A functional interface providing an entry point for performing additional analysis of indexed files.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
analyzeFile(java.io.File file, ResourceBuilder resourceBuilder)
This method is invoked for each file being indexed.
-
-
-
Method Detail
-
analyzeFile
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 list
- Parameters:
file
- The current fileresourceBuilder
- the resource builder used to process the file- Throws:
java.lang.Exception
-
-