JMMF API
pre-release v0.7

fr.umlv.jmmf.reflect
Class DefaultMultiModel

java.lang.Object
  |
  +--fr.umlv.jmmf.reflect.DefaultMultiModel
All Implemented Interfaces:
MultiModel

public class DefaultMultiModel
extends java.lang.Object
implements MultiModel

default multi-method model. MUST OPTIMIZE getParameterTypes() !!!

Version:
0.6.2
Author:
Remi Forax

Field Summary
protected  MultiHook hook
           
protected  TypeModel typeModel
           
 
Constructor Summary
DefaultMultiModel()
           
DefaultMultiModel(MultiHook hook)
           
DefaultMultiModel(TypeModel typeModel, MultiHook hook)
           
 
Method Summary
 java.lang.Class[] getExceptionTypes(java.lang.reflect.Constructor[] constructors)
          process exceptions of the multi-constructor with the exceptions of all the contained methods.
 java.lang.Class[] getExceptionTypes(java.lang.reflect.Method[] methods)
          process exceptions of the multi-method with the exceptions of all the contained methods.
 MultiHook getHook()
          return the hook.
 int getModifiers(java.lang.reflect.Member[] methods)
          Process modifiers of the multi-method with the modifiers of all the contained methods.
 java.lang.Class[] getParameterTypes(java.lang.reflect.Constructor[] constructors)
          process parameter types of the multi-method with the parameter types of all the contained methods.
 java.lang.Class[] getParameterTypes(java.lang.reflect.Method[] methods)
          process parameter types of the multi-method with the parameter types of all the contained methods.
 java.lang.Class getReturnType(java.lang.reflect.Method[] methods)
          process return type of the multi-method with the return type of all the contained methods.
 TypeModel getTypeModel()
          return the type model.
 void setHook(MultiHook hook)
          set the hook for the multi-methods created with this model.
 void setTypeModel(TypeModel typeModel)
          set the type model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

hook

protected MultiHook hook

typeModel

protected TypeModel typeModel
Constructor Detail

DefaultMultiModel

public DefaultMultiModel(TypeModel typeModel,
                         MultiHook hook)

DefaultMultiModel

public DefaultMultiModel(MultiHook hook)

DefaultMultiModel

public DefaultMultiModel()
Method Detail

getTypeModel

public TypeModel getTypeModel()
return the type model.
Specified by:
getTypeModel in interface MultiModel

setTypeModel

public void setTypeModel(TypeModel typeModel)
set the type model.

getHook

public MultiHook getHook()
return the hook.
Specified by:
getHook in interface MultiModel

setHook

public void setHook(MultiHook hook)
set the hook for the multi-methods created with this model.

getModifiers

public int getModifiers(java.lang.reflect.Member[] methods)
Process modifiers of the multi-method with the modifiers of all the contained methods. The visibility modifier is the less visible of all visibility modifiers. [PRIVATE< NONE< PROTECTED< PUBLIC] If one of the methods is not STATIC, the multi-method isn't STATIC. If one of the methods is not ABSTRACT, the multi-method isn't ABSTRACT. If one of the methods is not STRICT FP, the multi-method isn't STRICT FP. If one of the methods is not STATIC, the multi-method isn't STATIC.
Specified by:
getModifiers in interface MultiModel

getExceptionTypes

public java.lang.Class[] getExceptionTypes(java.lang.reflect.Method[] methods)
process exceptions of the multi-method with the exceptions of all the contained methods.
Specified by:
getExceptionTypes in interface MultiModel

getExceptionTypes

public java.lang.Class[] getExceptionTypes(java.lang.reflect.Constructor[] constructors)
process exceptions of the multi-constructor with the exceptions of all the contained methods.
Specified by:
getExceptionTypes in interface MultiModel

getReturnType

public java.lang.Class getReturnType(java.lang.reflect.Method[] methods)
process return type of the multi-method with the return type of all the contained methods.
Specified by:
getReturnType in interface MultiModel

getParameterTypes

public java.lang.Class[] getParameterTypes(java.lang.reflect.Method[] methods)
process parameter types of the multi-method with the parameter types of all the contained methods.
Specified by:
getParameterTypes in interface MultiModel

getParameterTypes

public java.lang.Class[] getParameterTypes(java.lang.reflect.Constructor[] constructors)
process parameter types of the multi-method with the parameter types of all the contained methods.
Specified by:
getParameterTypes in interface MultiModel

JMMF API
pre-release v0.7

Rémi Forax 1999,2000 Université de Marne la Vallée