|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--net.javamud.run.ClassMapper
Maps simple or "old" names to a full class name.
| Field Summary | |
protected Properties |
classMap
Map of simple or "old" names to full names. |
| Constructor Summary | |
ClassMapper(InputStream sysClassMap,
InputStream userClassMap)
Constructor for the ClassMapper object. |
|
| Method Summary | |
Class |
forName(String className)
Returns the Class for the mapped className . |
Object |
lazyNew(String className)
Version of New which throws Error instead of Exception |
Object |
lazyNew(String className,
Class[] paramTypes,
Object[] params)
Version of New which throws Error
instead of Exception |
Object |
lazyNew(String className,
Object[] params)
Version of New which throws Error instead of
Exception |
Object |
lazyNew(String className,
String identity)
Version of New which throws Error instead of
Exception |
String |
map(String from)
Returned the Mapped name. |
Object |
New(String className)
Return a new instance of the given className (subject to mapping). |
Object |
New(String className,
Class[] paramTypes,
Object[] params)
Return a new instance of the given className (subject to mapping). |
Object |
New(String className,
Object[] params)
Return a new instance of the given className (subject to mapping). |
Object |
New(String className,
String identity)
Create a new Object with identity as the first paramater. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected Properties classMap
| Constructor Detail |
public ClassMapper(InputStream sysClassMap,
InputStream userClassMap)
throws IOException
public ClassMapper(InputStream userClassMap)
which will use this.getClass().getResourceAsStream("ClassMapper.properties")
to get the default mappings.
sysClassMap - Default ClassMap (Probably from JAR file).userClassMap - Current (User) ClassMap file (or null).
(Probably from file system).
IOException - Description of the Exception| Method Detail |
public Object New(String className)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
className - Class to try to load (mapped first).
ClassNotFoundException - Thrown if class could not be
found.
InstantiationException - Could not create an instance
of the class.
IllegalAccessException - Illegal access.Class.forName(String),
Class.newInstance(),
map(String)
public Object New(String className,
Class[] paramTypes,
Object[] params)
throws IllegalAccessException,
ClassNotFoundException,
InstantiationException,
NoSuchMethodException,
InvocationTargetException
className - Class to load via
Mapping.paramTypes - Parameter Typesparams - Parameter Values
NoSuchMethodException - No matching
constructor.
InvocationTargetException - Constructor threw
an Exception.
ClassNotFoundException - Well Duh!
InstantiationException - What you doing
instantiating an abstract class?
IllegalAccessException - Give me more
permisions you fool.
public Object New(String className,
Object[] params)
throws IllegalAccessException,
ClassNotFoundException,
InstantiationException,
NoSuchMethodException,
InvocationTargetException
className - Class to load via
Mapping.params - Parameter Values
NoSuchMethodException - No matching
constructor.
InvocationTargetException - Constructor threw
an Exception.
ClassNotFoundException - Well Duh!
InstantiationException - What you doing
instantiating an abstract class?
IllegalAccessException - Give me more
permisions you fool.
public Object New(String className,
String identity)
throws IllegalAccessException,
ClassNotFoundException,
InstantiationException,
NoSuchMethodException,
InvocationTargetException
New(String,Object[]).
className - Name of MudObject
class.identity - Identity to assign.
IllegalAccessException - See New(String,Object[]).
ClassNotFoundException - See New(String,Object[]).
InstantiationException - See New(String,Object[]).
NoSuchMethodException - See New(String,Object[]).
InvocationTargetException - See New(String,Object[]).
public Class forName(String className)
throws ClassNotFoundException
mapped className .
className - className to look up.
ClassNotFoundException - Description of the Exceptionpublic Object lazyNew(String className)
New which throws Error instead of Exception
className - className to look up.
public Object lazyNew(String className,
Object[] params)
New which throws Error instead of
Exception
className - className to look up.params - Paramaters for constructor
public Object lazyNew(String className,
String identity)
New which throws Error instead of
Exception
className - className to look up.identity - Identity for new Object.
public Object lazyNew(String className,
Class[] paramTypes,
Object[] params)
New which throws Error
instead of Exception
className - className to look up.paramTypes - Paramater types.params - Paramaters for constructor
public String map(String from)
from - Key for classMap.Properties.getProperty(String)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||