Package org.apache.struts2.util
Class ProxyUtil
java.lang.Object
org.apache.struts2.util.ProxyUtil
Deprecated.
ProxyUtil
Various utility methods dealing with proxies.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectgetHibernateProxyTarget(Object object) Deprecated.since 7.2, injectProxyServiceinsteadstatic booleanisHibernateProxy(Object object) Deprecated.since 7.2, injectProxyServiceinsteadstatic booleanisHibernateProxyMember(Member member) Deprecated.since 7.2, injectProxyServiceinsteadstatic booleanDeprecated.since 7.2, injectProxyServiceinsteadstatic booleanisProxyMember(Member member, Object object) Deprecated.since 7.2, injectProxyServiceinsteadstatic MemberresolveTargetMember(Member proxyMember, Class<?> targetClass) Deprecated.static MemberresolveTargetMember(Member proxyMember, Object target) Deprecated.since 7.1, useresolveTargetMember(Member, Class)instead.static Class<?>ultimateTargetClass(Object candidate) Deprecated.since 7.2, injectProxyServiceinstead
-
Constructor Details
-
ProxyUtil
public ProxyUtil()Deprecated.
-
-
Method Details
-
ultimateTargetClass
Deprecated.since 7.2, injectProxyServiceinsteadDetermine 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, injectProxyServiceinsteadCheck 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, injectProxyServiceinsteadCheck whether the given member is a proxy member of a proxy object or is a static proxy member.- Parameters:
member- the member to checkobject- the object to check- Returns:
- true if the member is a proxy member
-
isHibernateProxy
Deprecated.since 7.2, injectProxyServiceinsteadCheck 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, injectProxyServiceinsteadCheck 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, injectProxyServiceinsteadGet 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, useresolveTargetMember(Member, Class)instead. Since 7.2, injectProxyServiceinstead.Resolve matching member on target object.- Parameters:
proxyMember- the proxy membertarget- the target object- Returns:
- matching member on target object if one exists, otherwise the same member
-
resolveTargetMember
Deprecated.- Returns:
- matching member on target object if one exists, otherwise the same member
-
ProxyServiceinstead. This class will be removed in a future version.