|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.proactive.core.mop.MOP
public abstract class MOP
A place where static methods go
Field Summary | |
---|---|
protected static java.lang.Class[] |
EMPTY_CLASS_ARRAY
Class array representing no parameters |
static java.lang.Object[] |
EMPTY_OBJECT_ARRAY
Empty object array |
protected static java.util.HashMap<java.lang.String,java.lang.Class<?>> |
loadedClass
As this class is center to the API, its static initializer is a good place to initialize general stuff. |
protected static java.lang.Class[] |
PROXY_CONSTRUCTOR_PARAMETERS_TYPES_ARRAY
Class array representing (Constructor Call, Object[]) |
protected static java.util.Hashtable<java.lang.String,java.lang.reflect.Constructor> |
proxyTable
A Hashtable to cache (proxy class, proxy class constructor) couples |
protected static java.util.Hashtable |
secondProxyTable
A Hashtable to cache (Class name, proxy class name) couples this is meant for class-based reification |
protected static MOPClassLoader |
singleton
|
protected static java.lang.Class<?> |
STUB_OBJECT_INTERFACE
|
protected static java.lang.String |
STUB_OBJECT_INTERFACE_NAME
The name of the interface that caracterizes all stub classes |
protected static java.util.Hashtable<org.objectweb.proactive.core.mop.MOP.GenericStubKey,java.lang.reflect.Constructor> |
stubTable
A Hashtable to cache (reified class, stub class constructor) couples. |
Constructor Summary | |
---|---|
MOP()
|
Method Summary | |
---|---|
protected static void |
addClassToCache(java.lang.String name,
java.lang.Class cl)
|
static ConstructorCall |
buildTargetObjectConstructorCall(java.lang.Class targetClass,
java.lang.Object[] constructorParameters)
|
static void |
checkClassIsReifiable(java.lang.Class cl)
|
protected static boolean |
checkNoArgsConstructor(java.lang.Class cl)
Checks if class c has a noargs constructor |
static Proxy |
createProxyObject(java.lang.String nameOfProxy,
java.lang.Object[] proxyParameters,
ConstructorCall reifiedCall)
|
static java.lang.Class |
forName(java.lang.String s)
Loads a class using standard classloader or a hashtable |
static boolean |
isReifiedObject(java.lang.Object o)
Checks if an object is a stub object Being a stub object is equivalent to implementing the StubObject interface |
static java.lang.Class |
loadClass(java.lang.String name)
|
static java.lang.Object |
newInstance(java.lang.Class clazz,
java.lang.Object[] constructorParameters,
java.lang.String nameOfProxy,
java.lang.Object[] proxyParameters)
|
static java.lang.Object |
newInstance(java.lang.Class stubClass,
java.lang.String nameOfClass,
java.lang.Class[] genericParameters,
java.lang.Object[] constructorParameters,
java.lang.String nameOfProxy,
java.lang.Object[] proxyParameters)
|
static java.lang.Object |
newInstance(java.lang.String nameOfClass,
java.lang.Class[] genericParameters,
java.lang.Object[] constructorParameters,
java.lang.String nameOfProxy,
java.lang.Object[] proxyParameters)
Creates an instance of an object |
static java.lang.Object |
newInstance(java.lang.String nameOfStubClass,
java.lang.String nameOfClass,
java.lang.Class[] genericParameters,
java.lang.Object[] constructorParameters,
java.lang.String nameOfProxy,
java.lang.Object[] proxyParameters)
Creates an instance of an object |
static java.lang.Object |
turnReified(java.lang.String nameOfProxyClass,
java.lang.Object[] proxyParameters,
java.lang.Object target,
java.lang.Class[] genericParameters)
Reifies an object |
static java.lang.Object |
turnReified(java.lang.String nameOfStubClass,
java.lang.String nameOfProxyClass,
java.lang.Object[] proxyParameters,
java.lang.Object target,
java.lang.Class[] genericParameters)
Reifies an object |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected static java.lang.String STUB_OBJECT_INTERFACE_NAME
protected static java.lang.Class<?> STUB_OBJECT_INTERFACE
protected static final java.lang.Class[] EMPTY_CLASS_ARRAY
public static final java.lang.Object[] EMPTY_OBJECT_ARRAY
protected static java.lang.Class[] PROXY_CONSTRUCTOR_PARAMETERS_TYPES_ARRAY
protected static java.util.Hashtable<org.objectweb.proactive.core.mop.MOP.GenericStubKey,java.lang.reflect.Constructor> stubTable
protected static java.util.Hashtable<java.lang.String,java.lang.reflect.Constructor> proxyTable
protected static java.util.Hashtable secondProxyTable
protected static MOPClassLoader singleton
protected static java.util.HashMap<java.lang.String,java.lang.Class<?>> loadedClass
Constructor Detail |
---|
public MOP()
Method Detail |
---|
public static java.lang.Class forName(java.lang.String s) throws java.lang.ClassNotFoundException
s
- the name of the class to fetch
java.lang.ClassNotFoundException
public static java.lang.Object newInstance(java.lang.String nameOfClass, java.lang.Class[] genericParameters, java.lang.Object[] constructorParameters, java.lang.String nameOfProxy, java.lang.Object[] proxyParameters) throws java.lang.ClassNotFoundException, ClassNotReifiableException, InvalidProxyClassException, ConstructionOfProxyObjectFailedException, ConstructionOfReifiedObjectFailedException
nameOfClass
- The class to instantiategenericParameters
- the types of the generic parameters for the class (if any, otherwise this parameter may be null)constructorParameters
- Array of the constructor's parameters [wrapper]nameOfProxy
- The name of its proxy classproxyParameters
- The array holding the proxy parameter
java.lang.ClassNotFoundException
ClassNotReifiableException
InvalidProxyClassException
ConstructionOfProxyObjectFailedException
ConstructionOfReifiedObjectFailedException
public static java.lang.Object newInstance(java.lang.Class clazz, java.lang.Object[] constructorParameters, java.lang.String nameOfProxy, java.lang.Object[] proxyParameters) throws java.lang.ClassNotFoundException, ClassNotReifiableException, InvalidProxyClassException, ConstructionOfProxyObjectFailedException, ConstructionOfReifiedObjectFailedException
java.lang.ClassNotFoundException
ClassNotReifiableException
InvalidProxyClassException
ConstructionOfProxyObjectFailedException
ConstructionOfReifiedObjectFailedException
public static java.lang.Object newInstance(java.lang.String nameOfStubClass, java.lang.String nameOfClass, java.lang.Class[] genericParameters, java.lang.Object[] constructorParameters, java.lang.String nameOfProxy, java.lang.Object[] proxyParameters) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ReifiedCastException, InvalidProxyClassException, ConstructionOfProxyObjectFailedException, ConstructionOfReifiedObjectFailedException
nameOfStubClass
- The name of the Stub class corresponding to the objectnameOfClass
- The class to instantiategenericParameters
- the types of the generic parameters for the class (if any, otherwise this parameter may be null)constructorParameters
- Array of the constructor's parameters [wrapper]nameOfProxy
- The name of its proxy classproxyParameters
- The array holding the proxy parameter
java.lang.ClassNotFoundException
ClassNotReifiableException
ReifiedCastException
InvalidProxyClassException
ConstructionOfProxyObjectFailedException
ConstructionOfReifiedObjectFailedException
public static java.lang.Object newInstance(java.lang.Class stubClass, java.lang.String nameOfClass, java.lang.Class[] genericParameters, java.lang.Object[] constructorParameters, java.lang.String nameOfProxy, java.lang.Object[] proxyParameters) throws java.lang.ClassNotFoundException, ClassNotReifiableException, ReifiedCastException, InvalidProxyClassException, ConstructionOfProxyObjectFailedException, ConstructionOfReifiedObjectFailedException
java.lang.ClassNotFoundException
ClassNotReifiableException
ReifiedCastException
InvalidProxyClassException
ConstructionOfProxyObjectFailedException
ConstructionOfReifiedObjectFailedException
public static java.lang.Object turnReified(java.lang.String nameOfProxyClass, java.lang.Object[] proxyParameters, java.lang.Object target, java.lang.Class[] genericParameters) throws java.lang.ClassNotFoundException, ClassNotReifiableException, InvalidProxyClassException, ConstructionOfProxyObjectFailedException
nameOfProxyClass
- the name of the object's proxyproxyParameters
- Array holding the proxy parameterstarget
- the object to reifygenericParameters
- * @param genericParameters the types of the generic parameters for the class (if any, otherwise this parameter may be null)
java.lang.ClassNotFoundException
ClassNotReifiableException
InvalidProxyClassException
ConstructionOfProxyObjectFailedException
public static java.lang.Object turnReified(java.lang.String nameOfStubClass, java.lang.String nameOfProxyClass, java.lang.Object[] proxyParameters, java.lang.Object target, java.lang.Class[] genericParameters) throws java.lang.ClassNotFoundException, ReifiedCastException, ClassNotReifiableException, InvalidProxyClassException, ConstructionOfProxyObjectFailedException
nameOfProxyClass
- the name of the object's proxynameOfStubClass
- The name of the object's stub classproxyParameters
- Array holding the proxy parameterstarget
- the object to reify
java.lang.ClassNotFoundException
ReifiedCastException
ClassNotReifiableException
InvalidProxyClassException
ConstructionOfProxyObjectFailedException
public static void checkClassIsReifiable(java.lang.Class cl) throws ClassNotReifiableException
ClassNotReifiableException
protected static boolean checkNoArgsConstructor(java.lang.Class cl)
c
has a noargs constructor
public static boolean isReifiedObject(java.lang.Object o)
o
- the object to check
true
if it is a stub object, false
otherwiseprotected static void addClassToCache(java.lang.String name, java.lang.Class cl)
public static Proxy createProxyObject(java.lang.String nameOfProxy, java.lang.Object[] proxyParameters, ConstructorCall reifiedCall) throws ConstructionOfProxyObjectFailedException, java.lang.ClassNotFoundException, InvalidProxyClassException
ConstructionOfProxyObjectFailedException
java.lang.ClassNotFoundException
InvalidProxyClassException
public static ConstructorCall buildTargetObjectConstructorCall(java.lang.Class targetClass, java.lang.Object[] constructorParameters) throws ConstructionOfReifiedObjectFailedException
ConstructionOfReifiedObjectFailedException
public static java.lang.Class loadClass(java.lang.String name) throws java.lang.ClassNotFoundException
java.lang.ClassNotFoundException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |