Class ProxyUtils

java.lang.Object
com.vaadin.cdi.util.ProxyUtils

@Typed public abstract class ProxyUtils extends Object
Helper for proxies
Since:
15.0
  • Method Summary

    Modifier and Type
    Method
    Description
    static List<Class<?>>
    getProxyAndBaseTypes(Class<?> proxyClass)
    Gets the given proxy class together with its base types, i.e. the proxied interfaces for interface proxies or the chain of superclasses up to the real implementation class otherwise.
    static Class
    getUnproxiedClass(Class currentClass)
    Gets the real implementation class of the given class by unwrapping any proxy classes.
    static boolean
    isInterfaceProxy(Class<?> proxyClass)
    Analyses if the given class is a proxy class implementing an interface rather than extending a concrete class.
    static boolean
    isProxiedClass(Class currentClass)
    Analyses if the given class is a generated proxy class

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getUnproxiedClass

      public static Class getUnproxiedClass(Class currentClass)
      Gets the real implementation class of the given class by unwrapping any proxy classes.
      Parameters:
      currentClass - current class
      Returns:
      class of the real implementation
    • isProxiedClass

      public static boolean isProxiedClass(Class currentClass)
      Analyses if the given class is a generated proxy class
      Parameters:
      currentClass - current class
      Returns:
      true if the given class is a known proxy class, false otherwise
    • getProxyAndBaseTypes

      public static List<Class<?>> getProxyAndBaseTypes(Class<?> proxyClass)
      Gets the given proxy class together with its base types, i.e. the proxied interfaces for interface proxies or the chain of superclasses up to the real implementation class otherwise.
      Parameters:
      proxyClass - the proxy class
      Returns:
      a list containing the proxy class and its base types
    • isInterfaceProxy

      public static boolean isInterfaceProxy(Class<?> proxyClass)
      Analyses if the given class is a proxy class implementing an interface rather than extending a concrete class.
      Parameters:
      proxyClass - the class to check
      Returns:
      true if the given class is an interface proxy, false otherwise