Class Proxies


  • public class Proxies
    extends Object
    Utilities for working with proxies.
    Author:
    Nicklas Karlsson, Pete Muir, Tomaz Cerar, Ales Justin
    • Method Detail

      • isTypeProxyable

        public static boolean isTypeProxyable​(Type type,
                                              org.jboss.weld.bootstrap.api.ServiceRegistry services)
        Indicates if a class is proxyable
        Parameters:
        type - The class to test
        Returns:
        True if proxyable, false otherwise
      • getUnproxyableTypeException

        public static UnproxyableResolutionException getUnproxyableTypeException​(Type type,
                                                                                 org.jboss.weld.bootstrap.api.ServiceRegistry services)
      • isTypesProxyable

        public static boolean isTypesProxyable​(Bean<?> declaringBean,
                                               org.jboss.weld.bootstrap.api.ServiceRegistry services)
        Indicates if a set of types are all proxyable
        Parameters:
        declaringBean - with types to test
        Returns:
        True if proxyable, false otherwise
      • isTypesProxyable

        public static boolean isTypesProxyable​(Iterable<? extends Type> types,
                                               org.jboss.weld.bootstrap.api.ServiceRegistry services)
        Indicates if a set of types are all proxyable
        Parameters:
        types - The types to test
        Returns:
        True if proxyable, false otherwise
      • getUnproxyableTypesException

        public static UnproxyableResolutionException getUnproxyableTypesException​(Bean<?> declaringBean,
                                                                                  org.jboss.weld.bootstrap.api.ServiceRegistry services)
      • getUnproxyableTypeException

        public static UnproxyableResolutionException getUnproxyableTypeException​(Type type,
                                                                                 Bean<?> declaringBean,
                                                                                 org.jboss.weld.bootstrap.api.ServiceRegistry services,
                                                                                 boolean ignoreFinalMethods)
      • getDeclaringBeanInfo

        public static Object getDeclaringBeanInfo​(Bean<?> bean)
      • sortInterfacesHierarchy

        public static LinkedHashSet<Class<?>> sortInterfacesHierarchy​(Set<Class<?>> interfaces)
        Parameters:
        interfaces -
        Returns:
        the sorted set of interfaces