|
JClass DesktopViews 6.3.0 API Documentation |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.klg.jclass.jarmaster.JarTask
Field Summary | |
static int |
ARCHIVE_CREATION_ERROR
|
protected String |
classPath
|
protected boolean |
compression
|
protected int |
compressionLevel
|
protected boolean |
createJar
|
protected static int |
DATE_COLUMN
|
protected String |
errorString
|
protected ArrayList |
exclusions
|
protected String[] |
filenames
|
protected boolean |
includeDefaultExclusions
|
protected File |
jarFile
|
protected String |
jarName
|
protected com.klg.jclass.jarmaster.JarMasterLocaleManager |
lm
|
protected String |
mainClass
|
protected ArrayList |
manifestFiles
|
static int |
MISSING_FILES_ERROR
|
protected String[] |
missingFiles
|
static int |
PROCESSING_ABORTED
|
static int |
PROCESSING_COMPLETED_WITH_NO_ERRORS
|
protected static int |
SIZE_COLUMN
|
protected static int |
TIME_COLUMN
|
Constructor Summary | |
JarTask()
Default constructor |
Method Summary | |
boolean |
accept(File dir,
String name)
Prevents files other than class files from being stored in a directory list. |
void |
addExclusion(String exclusion)
Add a string tto the list of exclusions |
void |
addManifestFile(String manifest)
Add a new file name to the list of manifest file names |
int |
buildJar()
Builds the jar based on the current properties of this object. |
protected int |
buildJar(boolean isCommandLine)
Creates a list of files and builds the jar. |
void |
compareJars(String file1,
String file2)
Compares two jars and outputs the differences to System.out. |
String |
getClassPath()
Return the current class path (i.e. |
int |
getCompressionLevel()
Get the current compression level. |
boolean |
getCreateJar()
Return whether a jar file or zip file is created. |
String |
getErrorString()
If an error has occured, the error string points to a message further explaining the error |
ArrayList |
getExclusions()
Get the current list of exlusions. |
String[] |
getFiles()
Get the current list of files or directories to be processed |
boolean |
getIncludeDefaultExclusions()
Return whether default exclusions "java/", "javax/", "com/sun/java/", "com/sun/image" are included in the exclusion list. |
File |
getJarFile()
Return the current jarFile. |
Iterator |
getJarListIterator()
Gets an interator containing a list of class files for the current jarName. |
Iterator |
getJarListIterator(String name)
Gets an interator containing a list of class files for the jar with the given name. |
protected Iterator |
getJarListIterator(String name,
boolean isCommandLine)
Gets an interator containing a list of class files for the jar with the given name. |
String |
getJarName()
Return the current jar name. |
String |
getMainClass()
Get the main class for the jar/zip. |
ArrayList |
getManifestFiles()
Get the current list of manifest files. |
String[] |
getMissingFiles()
Returns a list of files that could not be found in the search path but were found to be dependencies. |
protected String[] |
getStringsFromArrayList(ArrayList arrayList)
Get a Strings array from an ArrayList that contains Strings |
void |
listJar(boolean verbose)
Lists the jar contents of jarName to System.out. |
void |
listJar(String name,
boolean verbose)
Lists the jar contents with given name to System.out. |
protected static void |
printError(boolean isCommandLine,
String error)
|
static void |
printHelp(String error)
Prints the command line help. |
boolean |
processCommandLineArgs(String[] args)
Processes the command line arguments. |
void |
processingBegin(com.klg.jclass.util.progress.JCProgressEvent e)
Invoked when a process has begun. |
void |
processingEnd(com.klg.jclass.util.progress.JCProgressEvent e)
Invoked when the process has been compeleted. |
void |
processingError(com.klg.jclass.util.progress.JCProgressEvent e)
Invoked when a process encounters an error. |
void |
processingUnit(com.klg.jclass.util.progress.JCProgressEvent e)
Invoked when a process unit has been completed. |
protected int |
processOption(String[] args,
int index)
Process all command line options. |
void |
removeExclusion(String exclusion)
Remove a string from the list of exclusions |
void |
removeManifestFile(String manifest)
Remove a file name from the list of manifest file names. |
void |
setClassPath(String classPath)
Set the current class path (i.e. |
void |
setCompressionLevel(int compressionLevel)
Set the current compression level. |
void |
setCreateJar(boolean createJar)
Set whether a jar file or zip file is created. |
void |
setFiles(String[] files)
Set the list of files or directories to be processed |
void |
setIncludeDefaultExclusions(boolean includeDefaultExclusions)
Set whether default exclusions "java/", "javax/", "com/sun/java/", "com/sun/image" are included in the exclusion list. |
void |
setJarFile(File jarFile)
Set the output jar as File. |
void |
setJarName(String jarName)
Set the output jar as a string. |
void |
setMainClass(String mainClass)
Set the main class for the jar/zip. |
void |
updateJar()
Refreshes the jar with name jarName. |
void |
updateJar(String name)
Refreshes the jar with given name. |
protected void |
updateJar(String name,
boolean isCommandLine)
Refreshes the jar with name jarName. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PROCESSING_COMPLETED_WITH_NO_ERRORS
public static final int MISSING_FILES_ERROR
public static final int ARCHIVE_CREATION_ERROR
public static final int PROCESSING_ABORTED
protected static final int SIZE_COLUMN
protected static final int DATE_COLUMN
protected static final int TIME_COLUMN
protected String jarName
protected File jarFile
protected ArrayList manifestFiles
protected String[] filenames
protected ArrayList exclusions
protected boolean createJar
protected boolean includeDefaultExclusions
protected int compressionLevel
protected boolean compression
protected String mainClass
protected String classPath
protected String errorString
protected String[] missingFiles
protected com.klg.jclass.jarmaster.JarMasterLocaleManager lm
Constructor Detail |
public JarTask()
Method Detail |
public boolean processCommandLineArgs(String[] args)
public void setFiles(String[] files)
files
- A list of files and directoriespublic String[] getFiles()
public File getJarFile()
public void setJarFile(File jarFile)
jarFile
- The new jarFilepublic String getJarName()
public void setJarName(String jarName)
jarName
- The new jar namepublic boolean getIncludeDefaultExclusions()
public void setIncludeDefaultExclusions(boolean includeDefaultExclusions)
includeDefaultExclusions
- If true, default exclusions are included in
the exclusion listpublic boolean getCreateJar()
public void setCreateJar(boolean createJar)
createJar
- If true, a jar file is created. Otherwise a zip file is
created.public int getCompressionLevel()
public void setCompressionLevel(int compressionLevel)
compressionLevel
- The new compression level.public String getMainClass()
public void setMainClass(String mainClass)
mainClass
- The new main class.public String getClassPath()
public void setClassPath(String classPath)
classPath
- The new search pathpublic String[] getMissingFiles()
public String getErrorString()
public void addManifestFile(String manifest)
manifest
- The manifest file name to addpublic void removeManifestFile(String manifest)
manifest
- The manifest file name to removepublic ArrayList getManifestFiles()
public void addExclusion(String exclusion)
exclusion
- The new exclusion stringpublic void removeExclusion(String exclusion)
exclusion
- The exclusion string to removepublic ArrayList getExclusions()
public boolean accept(File dir, String name)
accept
in interface FilenameFilter
buildJar()
protected String[] getStringsFromArrayList(ArrayList arrayList)
arrayList
- The array list from which to get the Strings
public int buildJar()
protected int buildJar(boolean isCommandLine)
isCommandLine
- If true, it is assumed that this method is called from
the command line. On error, help is printed to System.out. If no, jar
name has been specified, a list of dependencies is printed to standard out.protected static void printError(boolean isCommandLine, String error)
public static void printHelp(String error)
protected int processOption(String[] args, int index)
public Iterator getJarListIterator() throws IOException
IOException
- if jarName could not be opened as a jar or zip fileJarEntry
public Iterator getJarListIterator(String name) throws IOException
name
- The name of the jar or zip file
IOException
- if name could not be opened as a jar or zip fileJarEntry
protected Iterator getJarListIterator(String name, boolean isCommandLine) throws IOException
name
- The name of the jar or zip fileisCommandLine
- True, if this method was called from the commandline
IOException
- if name could not be opened as a jar or zip fileJarEntry
public void listJar(boolean verbose) throws IOException
verbose
- If true, use verbose output
IOException
- If problems accessing the jar or zip filepublic void listJar(String name, boolean verbose) throws IOException
name
- The name of the jar or zip fileverbose
- If true, use verbose output
IOException
- If problems accessing the jar or zip filepublic void updateJar() throws IOException
IOException
- If unable to access jarNamepublic void updateJar(String name) throws IOException
name
- The name of the jar or zip file
IOException
- If unable to access the jar or zip fileprotected void updateJar(String name, boolean isCommandLine) throws IOException
name
- The name of the jar or zip fileisCommandLine
- True, if this method was called from the commandline
IOException
- If unable to access the jar or zip filepublic void compareJars(String file1, String file2) throws IOException
file1
- The filename of the first file to comparefile2
- The filename of the second file to compare
IOException
- if one or both of the jars cannot be accessed.public void processingBegin(com.klg.jclass.util.progress.JCProgressEvent e)
processingBegin
in interface JCProgressListener
e
- JCProgressEvent
public void processingUnit(com.klg.jclass.util.progress.JCProgressEvent e)
processingUnit
in interface JCProgressListener
e
- JCProgressEvent
public void processingEnd(com.klg.jclass.util.progress.JCProgressEvent e)
processingEnd
in interface JCProgressListener
e
- JCProgressEvent
public void processingError(com.klg.jclass.util.progress.JCProgressEvent e)
processingError
in interface JCProgressListener
e
- JCProgressEvent
|
Copyright © 2004 Quest Software Inc.. All rights reserved. |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |