Class RtMethod
java.lang.Object
spoon.support.visitor.java.reflect.RtMethod
-
Constructor Summary
ConstructorDescriptionRtMethod(Class<?> clazz, Method method, String name, Class<?> returnType, Type genericReturnType, TypeVariable<Method>[] typeParameters, Class<?>[] parameterTypes, Type[] genericParameterTypes, Class<?>[] exceptionTypes, int modifiers, Annotation[] annotations, Annotation[][] parameterAnnotations, boolean isVarArgs, boolean isDefault)
-
Method Summary
Modifier and TypeMethodDescriptionstatic RtMethod
boolean
Class<?>
Class<?>[]
Type[]
int
getName()
Annotation[][]
Class<?>[]
Class<?>
int
hashCode()
boolean
boolean
static <T> RtMethod[]
static <T> RtMethod[]
sameMethodsWithDifferentTypeOf(Class<T> klass, List<RtMethod> comparedMethods)
Returns the methods of `klass` that have the same signature (according to runtime reflection) but a different return type of at least one of the methods in `comparedMethods` given as parameter.
-
Constructor Details
-
RtMethod
public RtMethod(Class<?> clazz, Method method, String name, Class<?> returnType, Type genericReturnType, TypeVariable<Method>[] typeParameters, Class<?>[] parameterTypes, Type[] genericParameterTypes, Class<?>[] exceptionTypes, int modifiers, Annotation[] annotations, Annotation[][] parameterAnnotations, boolean isVarArgs, boolean isDefault)
-
-
Method Details
-
getDeclaringClass
-
getMethod
-
getName
-
getReturnType
-
getTypeParameters
-
getParameterTypes
-
getExceptionTypes
-
getModifiers
public int getModifiers() -
getDeclaredAnnotations
-
getParameterAnnotations
-
isVarArgs
public boolean isVarArgs() -
isDefault
public boolean isDefault() -
getGenericReturnType
-
getGenericParameterTypes
-
equals
-
hashCode
public int hashCode() -
create
- Parameters:
method
- is theMethod
which is to be wrapped in a RtMethod- Returns:
- a wrapper around the passed method
-
methodsOf
-
sameMethodsWithDifferentTypeOf
public static <T> RtMethod[] sameMethodsWithDifferentTypeOf(Class<T> klass, List<RtMethod> comparedMethods)Returns the methods of `klass` that have the same signature (according to runtime reflection) but a different return type of at least one of the methods in `comparedMethods` given as parameter.
-