org.apache.maven.shared.jar.identification
Class JarIdentificationAnalysis

java.lang.Object
  extended by org.apache.maven.shared.jar.identification.JarIdentificationAnalysis

public class JarIdentificationAnalysis
extends java.lang.Object

Analyze the JAR file to identify Maven artifact metadata. This class is thread safe and immutable as long as all provided exposers are, as it retains no state.

If using Plexus, the class will use all available exposers in the container.

If not using Plexus, the exposers must be set using setExposers(java.util.List) before calling analyze(org.apache.maven.shared.jar.JarAnalyzer)

Note that you must first create an instance of JarAnalyzer - see its Javadoc for a typical use.


Field Summary
private  java.util.List exposers
          The Maven information exposers to use during identification.
 
Constructor Summary
JarIdentificationAnalysis()
           
 
Method Summary
 JarIdentification analyze(JarAnalyzer jarAnalyzer)
          Analyze a JAR and find any associated Maven metadata.
private  void normalize(JarIdentification taxon)
           
private  java.lang.String pickLargest(java.util.List list)
           
private  java.lang.String pickSmallest(java.util.List list)
           
 void setExposers(java.util.List exposers)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

exposers

private java.util.List exposers
The Maven information exposers to use during identification.

Constructor Detail

JarIdentificationAnalysis

public JarIdentificationAnalysis()
Method Detail

analyze

public JarIdentification analyze(JarAnalyzer jarAnalyzer)
Analyze a JAR and find any associated Maven metadata. Note that if the provided JAR analyzer has previously analyzed the JAR, the cached results will be returned. You must obtain a new JAR analyzer to the re-read the contents of the file.

Parameters:
jarAnalyzer - the JAR to analyze. This must not yet have been closed.
Returns:
the Maven metadata discovered

normalize

private void normalize(JarIdentification taxon)

pickSmallest

private java.lang.String pickSmallest(java.util.List list)

pickLargest

private java.lang.String pickLargest(java.util.List list)

setExposers

public void setExposers(java.util.List exposers)