org.apache.commons.jjar
Class ClasspathUtil

java.lang.Object
  extended by org.apache.commons.jjar.ClasspathUtil

public class ClasspathUtil
extends Object

classpath support for JJAR. This is currently a jumble - will clean up.

Version:
$Id: ClasspathUtil.java 155454 2005-02-26 13:23:34Z dirkv $
Author:
Geir Magnusson Jr.

Constructor Summary
ClasspathUtil()
           
 
Method Summary
static boolean containsVersionedJar(String path, String pkg, String version)
          checks to see if the classpath path contains the package / version
static String getDefaultRepository()
          current default repository
static List getJarList(String path)
          returns a list of jars in the specified claspath.
static JJARPackage getPackage(JarURLConnection jarConn)
           
static JJARPackage getPackage(String jarname)
          returns a JJARPackage( info ) for a given jar
static void listJars(String path)
          lists the jars currently in the classpath
static void main(String[] args)
           
static boolean markJar(String jarname, String packagename, String version)
          doesn't work.
static boolean packageMatch(JarURLConnection jarConn, String pkg, String version)
          determines if two packages are equal
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClasspathUtil

public ClasspathUtil()
Method Detail

getDefaultRepository

public static String getDefaultRepository()
current default repository


listJars

public static void listJars(String path)
lists the jars currently in the classpath


containsVersionedJar

public static boolean containsVersionedJar(String path,
                                           String pkg,
                                           String version)
checks to see if the classpath path contains the package / version


getPackage

public static JJARPackage getPackage(String jarname)
                              throws Exception
returns a JJARPackage( info ) for a given jar

Throws:
Exception

getPackage

public static JJARPackage getPackage(JarURLConnection jarConn)
                              throws Exception
Throws:
Exception

packageMatch

public static boolean packageMatch(JarURLConnection jarConn,
                                   String pkg,
                                   String version)
                            throws Exception
determines if two packages are equal

Throws:
Exception

getJarList

public static List getJarList(String path)
returns a list of jars in the specified claspath. will check the system classpath by default


main

public static void main(String[] args)

markJar

public static boolean markJar(String jarname,
                              String packagename,
                              String version)
                       throws Exception
doesn't work. don't use

Throws:
Exception


Copyright © 2001-2010 The Apache Software Foundation. All Rights Reserved.