Class ClassReflectionIndexUtil
- java.lang.Object
-
- org.jboss.as.server.deployment.reflect.ClassReflectionIndexUtil
-
public class ClassReflectionIndexUtil extends Object
Utility methods for finding methods within aClassReflectionIndexhierarchy. User: Jaikiran Pai
-
-
Constructor Summary
Constructors Constructor Description ClassReflectionIndexUtil()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Collection<Method>findAllMethods(DeploymentReflectionIndex deploymentReflectionIndex, ClassReflectionIndex classReflectionIndex, String methodName, int paramCount)Finds and returns all methods corresponding to the passed methodnameand methodparamCount.static Collection<Method>findAllMethodsByName(DeploymentReflectionIndex deploymentReflectionIndex, ClassReflectionIndex classReflectionIndex, String methodName)Finds and returns all methods corresponding to the passed methodname.static MethodfindMethod(DeploymentReflectionIndex deploymentReflectionIndex, Class<?> clazz, Method method)Finds and returns a method corresponding to the passedmethod, which may be declared in the super class of the passedclassReflectionIndex.static MethodfindMethod(DeploymentReflectionIndex deploymentReflectionIndex, Class<?> clazz, org.jboss.invocation.proxy.MethodIdentifier methodIdentifier)Finds and returns a method corresponding to the passedmethodIdentifier.static Collection<Method>findMethods(DeploymentReflectionIndex deploymentReflectionIndex, ClassReflectionIndex classReflectionIndex, String methodName, String... paramTypes)Finds and returns methods corresponding to the passed methodnameand methodparamTypes.static MethodfindRequiredMethod(DeploymentReflectionIndex deploymentReflectionIndex, Class<?> clazz, Method method)Finds and returns a method corresponding to the passedmethod, which may be declared in the super class of the passedclassReflectionIndex.static MethodfindRequiredMethod(DeploymentReflectionIndex deploymentReflectionIndex, Class<?> clazz, org.jboss.invocation.proxy.MethodIdentifier methodIdentifier)Finds and returns a method corresponding to the passedmethodIdentifier.
-
-
-
Method Detail
-
findMethod
public static Method findMethod(DeploymentReflectionIndex deploymentReflectionIndex, Class<?> clazz, org.jboss.invocation.proxy.MethodIdentifier methodIdentifier)
Finds and returns a method corresponding to the passedmethodIdentifier. The passedclassReflectionIndexwill be used to traverse the class hierarchy while finding the method. Returns null if no such method is found- Parameters:
deploymentReflectionIndex- The deployment reflection indexclazz- The class reflection index which will be used to traverse the class hierarchy to find the methodmethodIdentifier- The method identifier of the method being searched for- Returns:
-
findRequiredMethod
public static Method findRequiredMethod(DeploymentReflectionIndex deploymentReflectionIndex, Class<?> clazz, org.jboss.invocation.proxy.MethodIdentifier methodIdentifier) throws DeploymentUnitProcessingException
Finds and returns a method corresponding to the passedmethodIdentifier. The passedclassReflectionIndexwill be used to traverse the class hierarchy while finding the method. ThrowsDeploymentUnitProcessingExceptionif no such method is found.- Parameters:
deploymentReflectionIndex- The deployment reflection indexclazz- The class to searchmethodIdentifier- The method identifier of the method being searched for- Returns:
- Throws:
DeploymentUnitProcessingException- If no such method is found
-
findRequiredMethod
public static Method findRequiredMethod(DeploymentReflectionIndex deploymentReflectionIndex, Class<?> clazz, Method method) throws DeploymentUnitProcessingException
Finds and returns a method corresponding to the passedmethod, which may be declared in the super class of the passedclassReflectionIndex. ThrowsDeploymentUnitProcessingExceptionif no such method is found.- Parameters:
deploymentReflectionIndex- The deployment reflection indexclazz- The classmethod- The method being searched for- Returns:
- Throws:
DeploymentUnitProcessingException- If no such method is found
-
findMethod
public static Method findMethod(DeploymentReflectionIndex deploymentReflectionIndex, Class<?> clazz, Method method)
Finds and returns a method corresponding to the passedmethod, which may be declared in the super class of the passedclassReflectionIndex.- Parameters:
deploymentReflectionIndex- The deployment reflection indexclazz- The classmethod- The method being searched for- Returns:
-
findMethods
public static Collection<Method> findMethods(DeploymentReflectionIndex deploymentReflectionIndex, ClassReflectionIndex classReflectionIndex, String methodName, String... paramTypes)
Finds and returns methods corresponding to the passed methodnameand methodparamTypes. The passedclassReflectionIndexwill be used to traverse the class hierarchy while finding the method. Returns empty collection if no such method is found- Parameters:
deploymentReflectionIndex- The deployment reflection indexclassReflectionIndex- The class reflection index which will be used to traverse the class hierarchy to find the methodmethodName- The name of the methodparamTypes- The param types accepted by the method- Returns:
-
findAllMethods
public static Collection<Method> findAllMethods(DeploymentReflectionIndex deploymentReflectionIndex, ClassReflectionIndex classReflectionIndex, String methodName, int paramCount)
Finds and returns all methods corresponding to the passed methodnameand methodparamCount. The passedclassReflectionIndexwill be used to traverse the class hierarchy while finding the method. Returns empty collection if no such method is found- Parameters:
deploymentReflectionIndex- The deployment reflection indexclassReflectionIndex- The class reflection index which will be used to traverse the class hierarchy to find the methodmethodName- The name of the methodparamCount- The number of params accepted by the method- Returns:
-
findAllMethodsByName
public static Collection<Method> findAllMethodsByName(DeploymentReflectionIndex deploymentReflectionIndex, ClassReflectionIndex classReflectionIndex, String methodName)
Finds and returns all methods corresponding to the passed methodname. The passedclassReflectionIndexwill be used to traverse the class hierarchy while finding the method. Returns empty collection if no such method is found- Parameters:
deploymentReflectionIndex- The deployment reflection indexclassReflectionIndex- The class reflection index which will be used to traverse the class hierarchy to find the methodmethodName- The name of the method- Returns:
-
-