org.jboss.tattletale.core
Class Archive

java.lang.Object
  extended by org.jboss.tattletale.core.Archive
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable
Direct Known Subclasses:
JarArchive, NestableArchive, SunJava5JCE, SunJava5JSSE, SunJava6JCE, SunJava6JSSE

public abstract class Archive
extends java.lang.Object
implements java.io.Serializable, java.lang.Comparable

Archive

Author:
Jesper Pedersen
See Also:
Serialized Form

Constructor Summary
Archive(int type, java.lang.String name, java.util.List<java.lang.String> manifest, java.util.SortedSet<java.lang.String> requires, java.util.SortedMap<java.lang.String,java.lang.Long> provides, java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.String>> packageDependencies, java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.String>> blacklistedDependencies, Location location)
          Constructor
 
Method Summary
 void addLocation(Location value)
          Add a location
 int compareTo(java.lang.Object o)
          Comparable
 boolean doesProvide(java.lang.String clz)
          Does the archives provide this class
 boolean equals(java.lang.Object obj)
          Equals
 java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.String>> getBlackListedDependencies()
          Get the blacklisted dependencies
 java.util.SortedSet<Location> getLocations()
          Get the locations
 java.util.List<java.lang.String> getManifest()
          Get the manifest
 java.lang.String getManifestValue(java.lang.String key)
          Get manifest value
 java.lang.String getName()
          Get the name
 java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.String>> getPackageDependencies()
          Get the package dependencies
 java.util.SortedMap<java.lang.String,java.lang.Long> getProvides()
          Get the provides
 java.util.SortedSet<java.lang.String> getRequires()
          Get the requires
 int getType()
          Get the type
 int hashCode()
          Hash code
 boolean hasManifestKey(java.lang.String key)
          Has manifest key
 boolean isOSGi()
          Is this an OSGi archive ?
 java.lang.String toString()
          String representation
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Archive

public Archive(int type,
               java.lang.String name,
               java.util.List<java.lang.String> manifest,
               java.util.SortedSet<java.lang.String> requires,
               java.util.SortedMap<java.lang.String,java.lang.Long> provides,
               java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.String>> packageDependencies,
               java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.String>> blacklistedDependencies,
               Location location)
Constructor

Parameters:
type - The type
name - The name
manifest - The manifest
requires - The requires
provides - The provides
packageDependencies - The package dependencies
blacklistedDependencies - The blacklisted dependencies
location - The location
Method Detail

getType

public int getType()
Get the type

Returns:
The value

getName

public java.lang.String getName()
Get the name

Returns:
The value

getManifest

public java.util.List<java.lang.String> getManifest()
Get the manifest

Returns:
The value

hasManifestKey

public boolean hasManifestKey(java.lang.String key)
Has manifest key

Parameters:
key - The manifest key
Returns:
True if the key is found; otherwise false

getManifestValue

public java.lang.String getManifestValue(java.lang.String key)
Get manifest value

Parameters:
key - The manifest key
Returns:
The value; null if not found

getRequires

public java.util.SortedSet<java.lang.String> getRequires()
Get the requires

Returns:
The value

getProvides

public java.util.SortedMap<java.lang.String,java.lang.Long> getProvides()
Get the provides

Returns:
The value

getPackageDependencies

public java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.String>> getPackageDependencies()
Get the package dependencies

Returns:
The value

getBlackListedDependencies

public java.util.SortedMap<java.lang.String,java.util.SortedSet<java.lang.String>> getBlackListedDependencies()
Get the blacklisted dependencies

Returns:
The value

getLocations

public java.util.SortedSet<Location> getLocations()
Get the locations

Returns:
The value

addLocation

public void addLocation(Location value)
Add a location

Parameters:
value - The value

doesProvide

public boolean doesProvide(java.lang.String clz)
Does the archives provide this class

Parameters:
clz - The class name
Returns:
True if the class is provided; otherwise false

isOSGi

public boolean isOSGi()
Is this an OSGi archive ?

Returns:
True if OSGi; otherwise false

compareTo

public int compareTo(java.lang.Object o)
Comparable

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - The other object
Returns:
The compareTo value

equals

public boolean equals(java.lang.Object obj)
Equals

Overrides:
equals in class java.lang.Object
Parameters:
obj - The other object
Returns:
True if equals; otherwise false

hashCode

public int hashCode()
Hash code

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code

toString

public java.lang.String toString()
String representation

Overrides:
toString in class java.lang.Object
Returns:
The string


Copyright ? 2009 JBoss (http://www.jboss.com/)