Package org.apache.struts2.util
Class ProxyUtil
java.lang.Object
org.apache.struts2.util.ProxyUtil
ProxyUtil
 Various utility methods dealing with proxies
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionstatic ObjectgetHibernateProxyTarget(Object object) static booleanisHibernateProxy(Object object) Check whether the given object is a Hibernate proxy.static booleanisHibernateProxyMember(Member member) Check whether the given member is a member of a Hibernate proxy.static booleanCheck whether the given object is a proxy.static booleanisProxyMember(Member member, Object object) Check whether the given member is a proxy member of a proxy object or is a static proxy member.static MemberresolveTargetMember(Member proxyMember, Object target) static Class<?>ultimateTargetClass(Object candidate) 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.
- 
Constructor Details- 
ProxyUtilpublic ProxyUtil()
 
- 
- 
Method Details- 
ultimateTargetClassDetermine 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)
 
- 
isProxyCheck whether the given object is a proxy.- Parameters:
- object- the object to check
 
- 
isProxyMemberCheck 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
 
- 
isHibernateProxyCheck whether the given object is a Hibernate proxy.- Parameters:
- object- the object to check
 
- 
isHibernateProxyMemberCheck whether the given member is a member of a Hibernate proxy.- Parameters:
- member- the member to check
 
- 
getHibernateProxyTarget- Returns:
- the target instance of the given object if it is a Hibernate proxy object, otherwise the given object
 
- 
resolveTargetMember- Returns:
- matching member on target object if one exists, otherwise the same member
 
 
-