|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.itest.JarContent
public abstract class JarContent
Field Summary | |
---|---|
static Object |
defaultExclPattern
|
Constructor Summary | |
---|---|
JarContent()
|
Method Summary | |
---|---|
static List |
applyExcludeFilter(List list,
List filters)
Filter out any entries which match given patterns |
static String |
getJarName(String baseDir,
String namePattern)
Returns full name of a jar file by a pattern |
static URL |
getJarURL(Class ref)
Finds JAR URL of an object's class belongs to |
static URL |
getJarURL(String className)
Finds JAR URL of an object's class belongs to |
groovy.lang.MetaClass |
getMetaClass()
|
Object |
getProperty(String name)
|
Object |
invokeMethod(String name,
Object args)
|
static List |
listContent(String jarFileName)
Lists content of a given jar file excluding defaultExclPattern and any extra patterns set via setPatterns(java.util.List) call |
void |
setMetaClass(groovy.lang.MetaClass metaClass)
|
static List |
setPatterns(List filterPatters)
Set a list of new patterns to be applied in the processing of a jar file |
void |
setProperty(String name,
Object value)
|
static void |
unpackJarContainer(Class ref,
String destination,
String includes)
Finds and unpack a jar file by locating to what jar file a given class belongs and unpacking jar content to desalination according to given includes |
static Object |
unpackJarContainer(String className,
String destination,
String includes)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static Object defaultExclPattern
Constructor Detail |
---|
public JarContent()
Method Detail |
---|
public static List listContent(String jarFileName) throws IOException
setPatterns(java.util.List)
call
jarFileName
- file for a jar
IOException
- if file isn't found and anything else goes wrongpublic static List setPatterns(List filterPatters)
filterPatters
- list of pattern strings
public static List applyExcludeFilter(List list, List filters)
list
- of entriesfilters
- list of patterns
public static URL getJarURL(Class ref)
ref
- Class reference of a class belongs to a jar file
null
if class doesn't belong
to a JAR in the classpathpublic static URL getJarURL(String className) throws ClassNotFoundException
className
- is full name of the class e.g. java.lang.String
null
if class doesn't belong
to a JAR in the classpath
ClassNotFoundException
- if class specified by className wasn't foundpublic static String getJarName(String baseDir, String namePattern)
baseDir
- to look for a jar undernamePattern
- to look for a jar by
null
otherwisepublic static void unpackJarContainer(Class ref, String destination, String includes) throws IOException
ref
- destination
- includes
-
IOException
- if can't find class' jar file in the classpathpublic static Object unpackJarContainer(String className, String destination, String includes) throws IOException
IOException
public groovy.lang.MetaClass getMetaClass()
getMetaClass
in interface groovy.lang.GroovyObject
public void setMetaClass(groovy.lang.MetaClass metaClass)
setMetaClass
in interface groovy.lang.GroovyObject
public Object invokeMethod(String name, Object args)
invokeMethod
in interface groovy.lang.GroovyObject
public Object getProperty(String name)
getProperty
in interface groovy.lang.GroovyObject
public void setProperty(String name, Object value)
setProperty
in interface groovy.lang.GroovyObject
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |