|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.sahits.codegen.java.model.util.MethodReflector
public class MethodReflector
This is a Helper class for Reflecting on Methods of a class
| Constructor Summary | |
|---|---|
MethodReflector(java.lang.Class<? extends java.lang.Object> clazz)
Initialize the class to reflect on |
|
| Method Summary | |
|---|---|
java.util.List<java.lang.reflect.Method> |
getAbstractMethods()
Retrieve a list of Abstract methods |
java.lang.String |
getAccessModifier(java.lang.reflect.Method m)
Retrieve the access modifier and return its String representation |
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
getArguments(java.lang.reflect.Constructor<?> c)
Retrieve a list of parameter type parameter names |
java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Object>> |
getArguments(java.lang.reflect.Method m)
Retrieve a list of parameter type parameter names |
java.util.List<java.lang.reflect.Constructor<?>> |
getConstructor()
Retrieve a list of constructors |
java.util.List<java.lang.String> |
getException(java.lang.reflect.Constructor<?> c)
Retrieve a list of Exceptions of the method |
java.util.List<java.lang.String> |
getException(java.lang.reflect.Method m)
Retrieve a list of Exceptions of the method |
java.lang.String |
getMethodName(java.lang.reflect.Method m)
Retrieve the method name |
java.util.List<java.lang.reflect.Method> |
getPublicOrProtectedMethods()
Retrieve all public or protected methods of the class |
java.lang.String |
getReturnType(java.lang.reflect.Method m)
Retrieve the return Type of the method |
java.lang.String |
getReturnValue(java.lang.reflect.Method m)
Retrieve the return value for the return type. |
boolean |
hasDefaultConstructor()
Check whether the default constructor is defined. |
boolean |
hasMultipleConstructors()
Check whether the class has defined multiple constructors |
java.util.List<java.lang.Class<? extends java.lang.Object>> |
neededImportsOfAbstractMethods()
Retrieve a list of class names of non simple types that are needed for the abstract methods |
java.util.List<java.lang.Class<? extends java.lang.Object>> |
needeImportsOfNonPrivateMethods()
Retrieve a list of class names of non simple types that are needed for all non private methods |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MethodReflector(java.lang.Class<? extends java.lang.Object> clazz)
clazz - | Method Detail |
|---|
public java.util.List<java.lang.reflect.Method> getPublicOrProtectedMethods()
public java.util.List<java.lang.reflect.Method> getAbstractMethods()
public java.lang.String getAccessModifier(java.lang.reflect.Method m)
m - Method
public java.lang.String getReturnType(java.lang.reflect.Method m)
m - Method
public java.lang.String getMethodName(java.lang.reflect.Method m)
m - Method
public java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Object>> getArguments(java.lang.reflect.Method m)
m - Method
public java.util.List<java.lang.String> getException(java.lang.reflect.Method m)
m - Method
public java.util.List<java.lang.Class<? extends java.lang.Object>> neededImportsOfAbstractMethods()
public java.util.List<java.lang.Class<? extends java.lang.Object>> needeImportsOfNonPrivateMethods()
public boolean hasMultipleConstructors()
public boolean hasDefaultConstructor()
public java.util.List<java.lang.reflect.Constructor<?>> getConstructor()
public java.util.List<java.util.Map.Entry<java.lang.String,java.lang.Object>> getArguments(java.lang.reflect.Constructor<?> c)
c - Constructor
public java.util.List<java.lang.String> getException(java.lang.reflect.Constructor<?> c)
c - Constructor
public java.lang.String getReturnValue(java.lang.reflect.Method m)
m - Method for which the return value should be extracted
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||