public class GenericClass extends Object
| Modifier and Type | Class and Description |
|---|---|
class |
GenericClass.MethodDef |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
List<GenericClass.MethodDef> |
findAllMethods(String name)
Search for all methods having that name, no matter which parameter they
take.
|
List<GenericClass.MethodDef> |
findMethods(String name,
Class<?>... parameterTypes)
Search for all occurrencies of a specific method.
|
static GenericClass |
forClass(Class<?> concrete) |
static GenericClass |
forField(Field field) |
static GenericClass |
forGenericType(Type type) |
static GenericClass |
forParameter(Method method,
int index) |
static GenericClass |
forReturnType(Method method) |
Class<?> |
getActualClass(String key)
Risolvi la classe attuale.
|
Class<?> |
getBaseClass() |
List<GenericClass.MethodDef> |
getMethods() |
GenericClass[] |
getParameterTypes(Method method)
Return real, "generics dereferenced", parameter types for the given
method.
|
int |
hashCode() |
GenericClass |
resolveType(Type type) |
static Class<?>[] |
toRawClasses(GenericClass[] genclasses) |
public Class<?> getActualClass(String key)
Risolvi la classe attuale.
key - public static GenericClass forClass(Class<?> concrete)
public static GenericClass forField(Field field)
public static GenericClass forReturnType(Method method)
public static GenericClass forParameter(Method method, int index)
public static GenericClass forGenericType(Type type)
public Class<?> getBaseClass()
public GenericClass[] getParameterTypes(Method method)
method - The method to analyzepublic GenericClass resolveType(Type type) throws MappingException
MappingExceptionpublic List<GenericClass.MethodDef> findMethods(String name, Class<?>... parameterTypes)
The type parameters passed in may be Class or null. If they are null, that means that we don't know which class they should be, if they are a class, that means we are searching for that class, and the comparison is made on dereferenced generics.
Specifying no parameter types explicitly means "a method without parameters".
name - The name of the methodparameterTypes - The types of the parametersGenericClass.MethodDef, ordered with methods from current
class first, then method from superclass and so on.public static Class<?>[] toRawClasses(GenericClass[] genclasses)
public List<GenericClass.MethodDef> findAllMethods(String name)
name - The name of the methodsGenericClass.MethodDef, ordered with methods from current
class first, then method from superclass and so on.public List<GenericClass.MethodDef> getMethods()
Copyright © 2016. All rights reserved.