Package jadex.commons
Class MethodInfo
- java.lang.Object
- 
- jadex.commons.MethodInfo
 
- 
 public class MethodInfo extends java.lang.ObjectAll info for identifying a method.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.lang.ClassLoaderclassloaderThe classloader with which this info was loaded.protected java.lang.StringclassnameCached class.protected java.lang.reflect.MethodmethodCached method.protected java.lang.StringnameThe method name.protected ClassInfo[]parametertypesThe parameter classes.protected ClassInforeturntypeCached return type.
 - 
Constructor SummaryConstructors Constructor Description MethodInfo()Create a new method info.MethodInfo(java.lang.reflect.Method m)Create a new method info.MethodInfo(java.lang.String name, ClassInfo[] parametertypes, java.lang.String classname)Create a new method info.MethodInfo(java.lang.String name, java.lang.Class<?>[] parametertypes)Create a new method info.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(java.lang.Object obj)Test if an object is equal to this.java.lang.StringgetClassName()Gets the class name for retrieving the method.java.lang.reflect.MethodgetMethod(java.lang.ClassLoader cl)java.lang.StringgetName()Get the name.java.lang.StringgetNameWithParameters()Get the name with parameters, e.g.ClassInfo[]getParameterTypeInfos()Get the parametertypes.java.lang.Class<?>[]getParameterTypes(java.lang.ClassLoader cl)Get the parametertypes as classes.ClassInfogetReturnTypeInfo()Get the return type.inthashCode()Get the hashcode.voidsetClassName(java.lang.String classname)Sets the class name for retrieving the method.voidsetName(java.lang.String name)Set the name.voidsetParameterTypeInfos(ClassInfo[] parametertypes)Set the parametertypes.voidsetParameterTypes(java.lang.Class<?>[] parametertypes)Get the parametertypes as classes.voidsetReturnTypeInfo(ClassInfo returntype)Set the return type.java.lang.StringtoString()Get the string representation.
 
- 
- 
- 
Field Detail- 
nameprotected java.lang.String name The method name.
 - 
parametertypesprotected ClassInfo[] parametertypes The parameter classes.
 - 
returntypeprotected ClassInfo returntype Cached return type.
 - 
classnameprotected java.lang.String classname Cached class.
 - 
methodprotected java.lang.reflect.Method method Cached method.
 - 
classloaderprotected java.lang.ClassLoader classloader The classloader with which this info was loaded. Note 1: This must not be the same as method.getClass().getClassLoader() because the latter returns the loader responsible for the class which could be higher in the parent hierarchy. Note 2: The check current_cl==last_cl is not perfect because when invoked with a parent classloader it will reload the class (although not necessary)
 
- 
 - 
Constructor Detail- 
MethodInfopublic MethodInfo() Create a new method info.
 - 
MethodInfopublic MethodInfo(java.lang.reflect.Method m) Create a new method info.
 - 
MethodInfopublic MethodInfo(java.lang.String name, java.lang.Class<?>[] parametertypes)Create a new method info.
 - 
MethodInfopublic MethodInfo(java.lang.String name, ClassInfo[] parametertypes, java.lang.String classname)Create a new method info.
 
- 
 - 
Method Detail- 
getNamepublic java.lang.String getName() Get the name.- Returns:
- the name.
 
 - 
setNamepublic void setName(java.lang.String name) Set the name.- Parameters:
- name- The name to set.
 
 - 
getParameterTypespublic java.lang.Class<?>[] getParameterTypes(java.lang.ClassLoader cl) Get the parametertypes as classes.- Returns:
- the parametertypes.
 
 - 
setParameterTypespublic void setParameterTypes(java.lang.Class<?>[] parametertypes) Get the parametertypes as classes.
 - 
getParameterTypeInfospublic ClassInfo[] getParameterTypeInfos() Get the parametertypes.- Returns:
- the parametertypes.
 
 - 
setParameterTypeInfospublic void setParameterTypeInfos(ClassInfo[] parametertypes) Set the parametertypes.- Parameters:
- parametertypes- The parametertypes to set.
 
 - 
getReturnTypeInfopublic ClassInfo getReturnTypeInfo() Get the return type.- Returns:
- The return type.
 
 - 
setReturnTypeInfopublic void setReturnTypeInfo(ClassInfo returntype) Set the return type.- Parameters:
- returntype- the returntype to set
 
 - 
setClassNamepublic void setClassName(java.lang.String classname) Sets the class name for retrieving the method.- Parameters:
- classname- Name of the class.
 
 - 
getClassNamepublic java.lang.String getClassName() Gets the class name for retrieving the method.
 - 
getMethodpublic java.lang.reflect.Method getMethod(java.lang.ClassLoader cl) 
 - 
hashCodepublic int hashCode() Get the hashcode.- Overrides:
- hashCodein class- java.lang.Object
 
 - 
equalspublic boolean equals(java.lang.Object obj) Test if an object is equal to this.- Overrides:
- equalsin class- java.lang.Object
 
 - 
toStringpublic java.lang.String toString() Get the string representation.- Overrides:
- toStringin class- java.lang.Object
 
 - 
getNameWithParameterspublic java.lang.String getNameWithParameters() Get the name with parameters, e.g. method1(String, int) but without return type.
 
- 
 
-