|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.lang.ClassLoader
edu.rit.m2mi.M2MIClassLoader
public class M2MIClassLoader
Class M2MIClassLoader provides a class loader for the M2MI Layer's synthesized handle classes and method invoker classes.
When you create an instance of class M2MIClassLoader, you can specify the new M2MI class loader's parent class loader. If you do not specify the parent class loader, the system class loader is used by default.
When you create an instance of class M2MIClassLoader, you can specify the protection domain to be associated with all the synthesized handle classes and method invoker classes. This protection domain determines which security permissions apply to the handle and method invoker classes. If you do not specify the protection domain, the protection domain of class M2MIClassLoader itself is used by default; in other words, the handle and method invoker classes will get the same security permissions as the M2MI Library classes.
Note: Class M2MIClassLoader is multiple thread safe.
Constructor Summary | |
---|---|
M2MIClassLoader()
Construct a new M2MI class loader. |
|
M2MIClassLoader(ClassLoader theParent)
Construct a new M2MI class loader. |
|
M2MIClassLoader(ClassLoader theParent,
ProtectionDomain theProtectionDomain)
Construct a new M2MI class loader. |
|
M2MIClassLoader(ProtectionDomain theProtectionDomain)
Construct a new M2MI class loader. |
Method Summary | |
---|---|
protected Class |
findClass(String theClassName)
Finds the class with the given name in this M2MI class loader. |
byte[] |
getClassFile(String theClassName)
Obtain the class file for the class with the given name in this M2MI class loader. |
Class |
getMethodInvokerClass(MethodDescriptor theMethodDescriptor)
Obtain the method invoker class for the given method descriptor. |
String |
getMethodInvokerClassName(MethodDescriptor theMethodDescriptor)
Obtain the name of the method invoker class for the given method descriptor. |
Class |
getMultihandleClass(Class theTargetInterface)
Obtain the multihandle class for the given target interface. |
String |
getMultihandleClassName(Class theTargetInterface)
Obtain the name of the multihandle class for the given target interface. |
Class |
getOmnihandleClass(Class theTargetInterface)
Obtain the omnihandle class for the given target interface. |
String |
getOmnihandleClassName(Class theTargetInterface)
Obtain the name of the omnihandle class for the given target interface. |
Class |
getUnihandleClass(Class theTargetInterface)
Obtain the unihandle class for the given target interface. |
String |
getUnihandleClassName(Class theTargetInterface)
Obtain the name of the unihandle class for the given target interface. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public M2MIClassLoader()
SecurityException
- (unchecked exception) Thrown if there is a security manager and it
doesn't allow creation of a new class loader or it doesn't allow
obtaining the protection domain of class M2MIClassLoader.public M2MIClassLoader(ClassLoader theParent)
theParent
- Parent class loader for delegation.
SecurityException
- (unchecked exception) Thrown if there is a security manager and it
doesn't allow creation of a new class loader or it doesn't allow
obtaining the protection domain of class M2MIClassLoader.public M2MIClassLoader(ProtectionDomain theProtectionDomain)
theProtectionDomain
- Protection domain for all handle and method invoker classes.
SecurityException
- (unchecked exception) Thrown if there is a security manager and it
doesn't allow creation of a new class loader.public M2MIClassLoader(ClassLoader theParent, ProtectionDomain theProtectionDomain)
theParent
- Parent class loader for delegation.theProtectionDomain
- Protection domain for all handle and method invoker classes.
SecurityException
- (unchecked exception) Thrown if there is a security manager and it
doesn't allow creation of a new class loader.Method Detail |
---|
public Class getMethodInvokerClass(MethodDescriptor theMethodDescriptor)
theMethodDescriptor
- Method descriptor.
NullPointerException
- (unchecked exception) Thrown if theMethodDescriptor is null.
SynthesisException
- (unchecked exception) Thrown if there was a problem synthesizing or
loading the class.public String getMethodInvokerClassName(MethodDescriptor theMethodDescriptor)
theMethodDescriptor
- Method descriptor.
NullPointerException
- (unchecked exception) Thrown if theMethodDescriptor is null.public Class getOmnihandleClass(Class theTargetInterface)
theTargetInterface
- Target interface.
NullPointerException
- (unchecked exception) Thrown if theTargetInterface is null.
InvalidMethodException
- (unchecked exception) Thrown if the target interface is a class
rather than an interface, if any method in the target interface
returns a value, or if any method in the target interface throws any
checked exceptions.
SynthesisException
- (unchecked exception) Thrown if there was a problem synthesizing or
loading the class.public String getOmnihandleClassName(Class theTargetInterface)
theTargetInterface
- Target interface.
NullPointerException
- (unchecked exception) Thrown if theTargetInterface is null.public Class getMultihandleClass(Class theTargetInterface)
theTargetInterface
- Target interface.
NullPointerException
- (unchecked exception) Thrown if theTargetInterface is null.
InvalidMethodException
- (unchecked exception) Thrown if the target interface is a class
rather than an interface, if any method in the target interface
returns a value, or if any method in the target interface throws any
checked exceptions.
SynthesisException
- (unchecked exception) Thrown if there was a problem synthesizing or
loading the class.public String getMultihandleClassName(Class theTargetInterface)
theTargetInterface
- Target interface.
NullPointerException
- (unchecked exception) Thrown if theTargetInterface is null.public Class getUnihandleClass(Class theTargetInterface)
theTargetInterface
- Target interface.
NullPointerException
- (unchecked exception) Thrown if theTargetInterface is null.
InvalidMethodException
- (unchecked exception) Thrown if the target interface is a class
rather than an interface, if any method in the target interface
returns a value, or if any method in the target interface throws any
checked exceptions.
SynthesisException
- (unchecked exception) Thrown if there was a problem synthesizing or
loading the class.public String getUnihandleClassName(Class theTargetInterface)
theTargetInterface
- Target interface.
NullPointerException
- (unchecked exception) Thrown if theTargetInterface is null.public byte[] getClassFile(String theClassName)
theClassName
- Fully-qualified class name.
InvalidMethodException
- (unchecked exception) Thrown if the target interface is a class
rather than an interface, if any method in the target interface
returns a value, or if any method in the target interface throws any
checked exceptions.
SynthesisException
- (unchecked exception) Thrown if theClassName was not
returned by a previous call of getMethodInvokerClassName(),
getOmnihandleClassName(),
getMultihandleClassName(), or
getOmnihandleClassName(). Thrown if there was a problem
synthesizing the class.protected Class findClass(String theClassName)
findClass
in class ClassLoader
theClassName
- Fully-qualified class name.
InvalidMethodException
- (unchecked exception) Thrown if the target interface is a class
rather than an interface, if any method in the target interface
returns a value, or if any method in the target interface throws any
checked exceptions.
SynthesisException
- (unchecked exception) Thrown if theClassName was not
returned by a previous call of getMethodInvokerClassName(),
getOmnihandleClassName(),
getMultihandleClassName(), or
getOmnihandleClassName(). Thrown if there was a problem
synthesizing the class.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |