de.schwarzrot.jar
Class JarExtensionHandler
java.lang.Object
de.schwarzrot.jar.JarExtensionHandler
public class JarExtensionHandler
- extends Object
is a wrapper class around a JarHandler
singleton, so each extension
will only extend existing classpath and functionality.
JarExtensionHandler
uses JarValidator
s to validate certain
extension. This way, an extension can support an individual (sub-)extension
directory without having to care about the applications extension directory.
A valid extension contains at least the manifest attribute
"Implementation-Type", which is used to determine the extension validator. If
the extension uses external classes, its Manifest file should also contain
the entry "Class-Path". Its Classpath should contain all used entries and not
assume any library be preloaded by the application frame.
The validators are injected by application context, so it is possible to add
new extension types.
- Author:
- Reinhard Mantey
- See Also:
for
usage sample
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
CLASS_PATH
public static final String CLASS_PATH
- See Also:
- Constant Field Values
CONTEXT_PATH
public static final String CONTEXT_PATH
- See Also:
- Constant Field Values
IMPLEMENTATION_NAME
public static final String IMPLEMENTATION_NAME
- See Also:
- Constant Field Values
IMPLEMENTATION_VERSION
public static final String IMPLEMENTATION_VERSION
- See Also:
- Constant Field Values
IMPLEMENTATION_TYPE
public static final String IMPLEMENTATION_TYPE
- See Also:
- Constant Field Values
JAR_MASK
public static final String JAR_MASK
- See Also:
- Constant Field Values
JarExtensionHandler
public JarExtensionHandler()
dump
public void dump()
dump
public void dump(PrintStream out)
getClassLoader
public ClassLoader getClassLoader()
getExtensions
public final List<JarExtension> getExtensions(String extensionType)
getRecognizedTypes
public final List<String> getRecognizedTypes()
getValidators
public final Map<String,JarValidator> getValidators()
investigateArchive
public JarFile investigateArchive(File jarFile)
investigateArchive
public JarFile investigateArchive(String jarFilename)
loadExtensions
public void loadExtensions(String extDir)
setValidators
public final void setValidators(Map<String,JarValidator> validators)
verifyArchive
public JarExtension verifyArchive(File jar)
getExtensions
protected final Map<String,List<JarExtension>> getExtensions()
Submit
a bug or request a feature
SRJRCFrames is published according to the
GNU General Public License
Copyright 2005-2012
Reinhard Mantey - some rights reserved.