Class ProxyUtil

java.lang.Object
org.apache.struts2.util.ProxyUtil

@Deprecated(since="7.2") public class ProxyUtil extends Object
Deprecated.
since 7.2, inject ProxyService instead. This class will be removed in a future version.
ProxyUtil

Various utility methods dealing with proxies.

  • Constructor Details

    • ProxyUtil

      public ProxyUtil()
      Deprecated.
  • Method Details

    • ultimateTargetClass

      @Deprecated(since="7.2") public static Class<?> ultimateTargetClass(Object candidate)
      Deprecated.
      since 7.2, inject ProxyService instead
      Determine the ultimate target class of the given instance, traversing not only a top-level proxy but any number of nested proxies as well — as long as possible without side effects.
      Parameters:
      candidate - the instance to check (might be a proxy)
      Returns:
      the ultimate target class (or the plain class of the given object as fallback; never null)
    • isProxy

      @Deprecated(since="7.2") public static boolean isProxy(Object object)
      Deprecated.
      since 7.2, inject ProxyService instead
      Check whether the given object is a proxy.
      Parameters:
      object - the object to check
      Returns:
      true if the object is a Spring AOP or Hibernate proxy
    • isProxyMember

      @Deprecated(since="7.2") public static boolean isProxyMember(Member member, Object object)
      Deprecated.
      since 7.2, inject ProxyService instead
      Check whether the given member is a proxy member of a proxy object or is a static proxy member.
      Parameters:
      member - the member to check
      object - the object to check
      Returns:
      true if the member is a proxy member
    • isHibernateProxy

      @Deprecated(since="7.2") public static boolean isHibernateProxy(Object object)
      Deprecated.
      since 7.2, inject ProxyService instead
      Check whether the given object is a Hibernate proxy.
      Parameters:
      object - the object to check
      Returns:
      true if the object is a Hibernate proxy
    • isHibernateProxyMember

      @Deprecated(since="7.2") public static boolean isHibernateProxyMember(Member member)
      Deprecated.
      since 7.2, inject ProxyService instead
      Check whether the given member is a member of a Hibernate proxy.
      Parameters:
      member - the member to check
      Returns:
      true if the member is a Hibernate proxy member
    • getHibernateProxyTarget

      @Deprecated(since="7.2") public static Object getHibernateProxyTarget(Object object)
      Deprecated.
      since 7.2, inject ProxyService instead
      Get the target instance of the given object if it is a Hibernate proxy object.
      Parameters:
      object - the object to check
      Returns:
      the target instance of the given object if it is a Hibernate proxy object, otherwise the given object
    • resolveTargetMember

      @Deprecated(since="7.1") public static Member resolveTargetMember(Member proxyMember, Object target)
      Deprecated.
      since 7.1, use resolveTargetMember(Member, Class) instead. Since 7.2, inject ProxyService instead.
      Resolve matching member on target object.
      Parameters:
      proxyMember - the proxy member
      target - the target object
      Returns:
      matching member on target object if one exists, otherwise the same member
    • resolveTargetMember

      public static Member resolveTargetMember(Member proxyMember, Class<?> targetClass)
      Deprecated.
      Returns:
      matching member on target object if one exists, otherwise the same member