Class ClassPoolUtils

java.lang.Object
panda.utilities.javassist.ClassPoolUtils

public final class ClassPoolUtils extends Object
  • Method Details

    • toCt

      public static javassist.CtClass[] toCt(Class<?>... classes)
    • toClass

      public static Class<?> toClass(javassist.CtClass clazz, Class<?> domainClass) throws javassist.CannotCompileException
      Throws:
      javassist.CannotCompileException
    • require

      public static javassist.CtClass require(Class<?> clazz)
      Get CtClass using the default class pool. The method throws ClassPoolUtils.ClassPoolException with a default message if class cannot be located in the pool
      Parameters:
      clazz - the class to get
      Returns:
      class representation
    • require

      public static javassist.CtClass[] require(Class<?>[] classes)
      Map array of classes using the require(Class)
      Parameters:
      classes - the array of classes to map
      Returns:
      the array of ct classes
    • get

      public static javassist.CtClass get(Class<?> clazz) throws javassist.NotFoundException
      Get CtClass using the default class pool
      Parameters:
      clazz - the class to get
      Returns:
      class representation
      Throws:
      javassist.NotFoundException - if class cannot be located in the pool
    • getClassPool

      public static javassist.ClassPool getClassPool()
      Get initialized class pool
      Returns:
      the initialized class pool