Class ClassReflectionIndexUtil

java.lang.Object
org.jboss.as.server.deployment.reflect.ClassReflectionIndexUtil

public class ClassReflectionIndexUtil extends Object
Utility methods for finding methods within a ClassReflectionIndex hierarchy.

User: Jaikiran Pai

  • Constructor Details

    • ClassReflectionIndexUtil

      public ClassReflectionIndexUtil()
  • Method Details

    • findMethod

      public static Method findMethod(DeploymentReflectionIndex deploymentReflectionIndex, Class<?> clazz, org.jboss.invocation.proxy.MethodIdentifier methodIdentifier)
      Finds and returns a method corresponding to the passed methodIdentifier. The passed classReflectionIndex will be used to traverse the class hierarchy while finding the method.

      Returns null if no such method is found

      Parameters:
      deploymentReflectionIndex - The deployment reflection index
      clazz - The class reflection index which will be used to traverse the class hierarchy to find the method
      methodIdentifier - 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 passed methodIdentifier. The passed classReflectionIndex will be used to traverse the class hierarchy while finding the method.

      Throws DeploymentUnitProcessingException if no such method is found.

      Parameters:
      deploymentReflectionIndex - The deployment reflection index
      clazz - The class to search
      methodIdentifier - 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 passed method, which may be declared in the super class of the passed classReflectionIndex.

      Throws DeploymentUnitProcessingException if no such method is found.

      Parameters:
      deploymentReflectionIndex - The deployment reflection index
      clazz - The class
      method - 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 passed method, which may be declared in the super class of the passed classReflectionIndex.

      Parameters:
      deploymentReflectionIndex - The deployment reflection index
      clazz - The class
      method - 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 method name and method paramTypes. The passed classReflectionIndex will 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 index
      classReflectionIndex - The class reflection index which will be used to traverse the class hierarchy to find the method
      methodName - The name of the method
      paramTypes - 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 method name and method paramCount. The passed classReflectionIndex will 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 index
      classReflectionIndex - The class reflection index which will be used to traverse the class hierarchy to find the method
      methodName - The name of the method
      paramCount - 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 method name. The passed classReflectionIndex will 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 index
      classReflectionIndex - The class reflection index which will be used to traverse the class hierarchy to find the method
      methodName - The name of the method
      Returns: