|
JMMF API pre-release v0.7 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.lang.reflect.AccessibleObject
|
+--fr.umlv.jmmf.reflect.MultiConstructor
The multi-constructor object.
MultiMethod| Field Summary | |
static java.lang.Class |
NULL_CLASS
special class for null value. |
| Fields inherited from interface java.lang.reflect.Member |
DECLARED, PUBLIC |
| Method Summary | |
static MultiConstructor |
create(java.lang.Class clazz,
int argLength)
construct a multi-constructor by taking all constructors with argLength parameter(s) in class clazz. |
java.lang.Class |
getDeclaringClass()
return class that contains all methods of the current multi-method. |
java.lang.Class[] |
getExceptionTypes()
return the exception types of the current method. |
int |
getModifiers()
returns the Java language modifiers for the multi-method represented by this MultiMethod object,
as an integer. |
java.lang.String |
getName()
return the name of the current multi-method. |
java.lang.Class[] |
getParameterTypes()
return the parameter types of the current method. a parameter type is the lowest common subtype of all parameter types of the methods that composed the multi-method. |
int |
hashCode()
Returns a hashcode for this MultiConstructor.
|
java.lang.Object |
newInstance(java.lang.Object[] args)
call the best constructor of the multi-constructor according to the type of all items in array args. |
java.lang.Object |
newInstance(java.lang.Object[] args,
java.lang.Class[] types)
call the best constructor of the multi-constructor according to the type of array types. |
java.lang.String |
toString()
return a string representation of the multi-method. |
| Methods inherited from class java.lang.reflect.AccessibleObject |
isAccessible, setAccessible, setAccessible |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.Class NULL_CLASS
| Method Detail |
public int hashCode()
MultiConstructor.
The hashcode is computed
as the exclusive-or of the hashcodes for the underlying
method's declaring class name and the method's name.hashCode in class java.lang.Objectpublic java.lang.String toString()
toString in class java.lang.Object
public java.lang.Object newInstance(java.lang.Object[] args)
throws java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
java.lang.NoSuchMethodException,
MultipleMethodsException
args - arguments of the multi-method,
public java.lang.Object newInstance(java.lang.Object[] args,
java.lang.Class[] types)
throws java.lang.InstantiationException,
java.lang.IllegalAccessException,
java.lang.reflect.InvocationTargetException,
java.lang.NoSuchMethodException,
MultipleMethodsException
args - arguments of the multi-method,types - the best method of the multi-method is
called according to this types.public int getModifiers()
MultiMethod object,
as an integer. The Modifier class should
be used to decode the modifiers.getModifiers in interface java.lang.reflect.Memberjava.lang.reflect.Modifierpublic java.lang.String getName()
getName in interface java.lang.reflect.Memberpublic java.lang.Class getDeclaringClass()
getDeclaringClass in interface java.lang.reflect.MemberMethod.getDeclaringClass()public java.lang.Class[] getParameterTypes()
Method.getParameterTypes()public java.lang.Class[] getExceptionTypes()
Method.getExceptionTypes()
public static MultiConstructor create(java.lang.Class clazz,
int argLength)
clazz - class which owns the constructors.argLenth - number of parameters.java.lang.IllegalArgumentException - if the class clazz contains
no constructor with argLength parameter.MultiFactory,
MultiFactory.create(Class,int)
|
JMMF API pre-release v0.7 |
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||