org.jgroups.conf
public class ClassConfigurator extends Object
org.jgroups.conf.magicNumberFile
.
It must be relative to one of the classpath elements, to allow the
classloader to locate the file. If a value is not specified,
MagicNumberReader.MAGIC_NUMBER_FILE
is used, which defaults
to "jg-magic-map.xml".
See Also: MagicNumberReader
Field Summary | |
---|---|
protected Log | log |
Method Summary | |
---|---|
Class | get(int magic)
Returns a class for a magic number.
|
Class | get(String clazzname)
Loads and returns the class from the class name
|
static ClassConfigurator | getInstance(boolean init) |
int | getMagicNumber(Class clazz)
Returns the magic number for the class.
|
int | getMagicNumberFromObjectStreamClass(ObjectStreamClass objStream) |
ObjectStreamClass | getObjectStreamClassFromMagicNumber(int magic_number) |
void | init() |
static void | main(String[] args) |
String | printClassMap() |
String | printMagicMap() |
String | toString() |
Parameters: magic the magic number that maps to the class
Returns: a Class object that represents a class that implements java.io.Externalizable
Parameters: clazzname a fully classified class name to be loaded
Returns: a Class object that represents a class that implements java.io.Externalizable
Parameters: clazz a class object that we want the magic number for
Returns: the magic number for a class, -1 if no mapping is available