org.apache.maven.shared.jar.classes
Class JarClasses

java.lang.Object
  extended by org.apache.maven.shared.jar.classes.JarClasses

public class JarClasses
extends java.lang.Object

Gathered facts about the classes within a JAR file.

See Also:
JarClassesAnalysis.analyze(org.apache.maven.shared.jar.JarAnalyzer)

Field Summary
private  java.util.List classNames
          A list of the classes that in the JAR.
private  java.util.List imports
          The list of imports in the classes in the JAR.
private  boolean isDebugPresent
          Whether the JAR contains any code with debug information.
private  java.lang.String jdkRevision
          The highest JVM revision available in any class files.
private  java.util.List methods
          A list of methods within the classes in the JAR.
private  java.util.List packages
          A list of packages represented by classes in the JAR.
 
Constructor Summary
JarClasses()
          Constructor to create an empty instance.
 
Method Summary
 void addClassName(java.lang.String name)
          Add a discovered class to the record.
 void addImports(java.util.List imports)
          Add a list of discovered imports to the record.
 void addMethod(java.lang.String name)
          Add a discovered method to the record.
 void addPackage(java.lang.String name)
          Add a discovered package to the record.
 java.util.List getClassNames()
           
 java.util.List getImports()
           
 java.lang.String getJdkRevision()
           
 java.util.List getMethods()
           
 java.util.List getPackages()
           
 boolean isDebugPresent()
           
 void setDebugPresent(boolean hasDebugSymbols)
           
 void setJdkRevision(java.lang.String jdkRevision)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

imports

private java.util.List imports
The list of imports in the classes in the JAR.


packages

private java.util.List packages
A list of packages represented by classes in the JAR.


classNames

private java.util.List classNames
A list of the classes that in the JAR.


methods

private java.util.List methods
A list of methods within the classes in the JAR.


isDebugPresent

private boolean isDebugPresent
Whether the JAR contains any code with debug information. If there is a mix of debug and release code, this will still be true.


jdkRevision

private java.lang.String jdkRevision
The highest JVM revision available in any class files. While the JAR may work on earlier JVMs if particular classes are not used, this is the minimum JVM that guarantees compatibility.

Constructor Detail

JarClasses

public JarClasses()
Constructor to create an empty instance.

Method Detail

addClassName

public void addClassName(java.lang.String name)
Add a discovered class to the record.

Parameters:
name - the name of the class

addPackage

public void addPackage(java.lang.String name)
Add a discovered package to the record.

Parameters:
name - the name of the package

addMethod

public void addMethod(java.lang.String name)
Add a discovered method to the record.

Parameters:
name - the name of the method

addImports

public void addImports(java.util.List imports)
Add a list of discovered imports to the record.

Parameters:
imports - the imports to add. Each item should be a String to avoid down the line ClassCastExceptions.

getImports

public java.util.List getImports()

getClassNames

public java.util.List getClassNames()

getPackages

public java.util.List getPackages()

isDebugPresent

public boolean isDebugPresent()

setDebugPresent

public void setDebugPresent(boolean hasDebugSymbols)

getJdkRevision

public java.lang.String getJdkRevision()

setJdkRevision

public void setJdkRevision(java.lang.String jdkRevision)

getMethods

public java.util.List getMethods()