public class PackCompressorFactory extends Object
Modifier and Type | Field and Description |
---|---|
private static CompilerException |
ShitHappens |
private static HashMap |
typeMap
This map contains all registered "compressors".
|
Modifier | Constructor and Description |
---|---|
private |
PackCompressorFactory()
No object of this factory needed.
|
Modifier and Type | Method and Description |
---|---|
static void |
catchedRegister(PackCompressor pc)
Register a particular pack compressor to this factory.
|
static PackCompressor |
get(String type)
Returns a newly created pack compressor with the given
compression format.
|
static CompilerException |
getRegisterException()
Returns the exception which was thrown during
registering of a pack compressor.
|
static boolean |
good() |
static boolean |
isTypeSupported(String type)
Returns whether a compressor exists for the given symbolic
name or not.
|
static void |
register(PackCompressor pc)
Register a particular pack compressor to this factory.
|
static void |
setRegisterException(CompilerException registerException)
Sets an exception which was thrown during registering a pack compressor.
|
private static HashMap typeMap
private static CompilerException ShitHappens
private PackCompressorFactory()
public static void catchedRegister(PackCompressor pc)
pc
- an instance of the pack compressor which describes
encoder and decoder for a special compression formatCompilerException
- if the symbol already exist or if
the compressor is not validpublic static void register(PackCompressor pc) throws CompilerException
pc
- an instance of the pack compressor which describes
encoder and decoder for a special compression formatCompilerException
- if the symbol already exist or if
the compressor is not validpublic static boolean isTypeSupported(String type) throws CompilerException
type
- symbolic compression name to be testedCompilerException
public static PackCompressor get(String type) throws CompilerException
type
- symbol name of compression format to be usedCompilerException
- if no encoder is registered for
the chosen compression formatpublic static CompilerException getRegisterException()
public static void setRegisterException(CompilerException registerException)
registerException
- The register exception to set.public static boolean good()
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses