Package org.jboss.jandex
Class JarIndexer
java.lang.Object
org.jboss.jandex.JarIndexer
Class which contains utility methods to create an index for a jar file
- Author:
- Stuart Douglas, Jason T. Greene, Ales Justin
-
Method Summary
Modifier and TypeMethodDescriptionstatic ResultcreateJarIndex(File jarFile, Indexer indexer, boolean modify, boolean newJar, boolean verbose) Indexes a jar file and saves the result.static ResultcreateJarIndex(File jarFile, Indexer indexer, boolean modify, boolean newJar, boolean verbose, PrintStream infoStream, PrintStream errStream) Indexes a jar file and saves the result.static ResultcreateJarIndex(File jarFile, Indexer indexer, File outputFile, boolean modify, boolean newJar, boolean verbose) Indexes a jar file and saves the result.static ResultcreateJarIndex(File jarFile, Indexer indexer, File outputFile, boolean modify, boolean newJar, boolean verbose, PrintStream infoStream, PrintStream errStream) Indexes a jar file and saves the result.
-
Method Details
-
createJarIndex
public static Result createJarIndex(File jarFile, Indexer indexer, boolean modify, boolean newJar, boolean verbose) throws IOException Indexes a jar file and saves the result. If the modify flag is set, index is saved to META-INF/jandex.idx. Otherwise an external file is created with a similar name to the original file, concatenating.idxsuffix.- Parameters:
jarFile- The file to indexindexer- The indexer to usemodify- If the original jar should be modifiednewJar- If the new jar should be createdverbose- If we should print what we are doing to standard out- Returns:
- indexing result
- Throws:
IOException- for any I/o error
-
createJarIndex
public static Result createJarIndex(File jarFile, Indexer indexer, File outputFile, boolean modify, boolean newJar, boolean verbose) throws IOException Indexes a jar file and saves the result. If the modify flag is set, index is saved to META-INF/jandex.idx. Otherwise an external file is created with a similar name to the original file, concatenating.idxsuffix.- Parameters:
jarFile- The file to indexindexer- The indexer to useoutputFile- The index file to write tomodify- If the original jar should be modifiednewJar- If the new jar should be createdverbose- If we should print what we are doing to standard out- Returns:
- indexing result
- Throws:
IOException- for any I/o error
-
createJarIndex
public static Result createJarIndex(File jarFile, Indexer indexer, boolean modify, boolean newJar, boolean verbose, PrintStream infoStream, PrintStream errStream) throws IOException Indexes a jar file and saves the result. If the modify flag is set, index is saved to META-INF/jandex.idx. Otherwise an external file is created with a similar name to the original file, concatenating.idxsuffix.- Parameters:
jarFile- The file to indexindexer- The indexer to usemodify- If the original jar should be modifiednewJar- If the new jar should be createdverbose- If we should print what we are doing to the specified info streaminfoStream- A print stream which will record verbose info, may be nullerrStream- A print stream to print errors, must not be null- Returns:
- indexing result
- Throws:
IOException- for any I/o error
-
createJarIndex
public static Result createJarIndex(File jarFile, Indexer indexer, File outputFile, boolean modify, boolean newJar, boolean verbose, PrintStream infoStream, PrintStream errStream) throws IOException Indexes a jar file and saves the result. If the modify flag is set, index is saved to META-INF/jandex.idx. Otherwise an external file is created with a similar name to the original file, concatenating.idxsuffix.- Parameters:
jarFile- The file to indexindexer- The indexer to useoutputFile- The index file to write tomodify- If the original jar should be modifiednewJar- If the new jar should be createdverbose- If we should print what we are doing to the specified info streaminfoStream- A print stream which will record verbose info, may be nullerrStream- A print stream to print errors, must not be null- Returns:
- indexing result
- Throws:
IOException- for any I/o error
-