org.apache.myfaces.extensions.validator.core.proxy
Class DefaultProxyHelper

java.lang.Object
  extended by org.apache.myfaces.extensions.validator.core.proxy.DefaultProxyHelper
All Implemented Interfaces:
ProxyHelper

public class DefaultProxyHelper
extends Object
implements ProxyHelper

Supports CGLIB and javassist.

Since:
x.x.3
Author:
Gerhard Petracek

Field Summary
protected  Logger logger
           
 
Constructor Summary
DefaultProxyHelper()
           
 
Method Summary
 String getClassNameOfObject(Object object)
          Returns the original fully qualified class-name for the given object which might be a proxied instance.
 String getNameOfClass(Class currentClass)
          Returns the original fully qualified class-name for the given class which might be the class of a proxied instance.
 Class getUnproxiedClass(Class currentClass)
          Returns the original class for the given class which might be the class of a proxied instance.
<T> Class<T>
getUnproxiedClass(Class currentClass, Class<T> targetType)
          In addition to ProxyHelper#getUnproxiedClass(java.lang.Class) it casts to the given type.
 boolean isProxiedClass(Class currentClass)
          Checks if the given class is a class of a proxied instance.
 boolean isProxiedObject(Object proxiedObject)
          Checks if the given instance is proxied.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected final Logger logger
Constructor Detail

DefaultProxyHelper

public DefaultProxyHelper()
Method Detail

getUnproxiedClass

public <T> Class<T> getUnproxiedClass(Class currentClass,
                                      Class<T> targetType)
Description copied from interface: ProxyHelper
In addition to ProxyHelper#getUnproxiedClass(java.lang.Class) it casts to the given type.

Specified by:
getUnproxiedClass in interface ProxyHelper
Type Parameters:
T - Type declaration for generics.
Parameters:
currentClass - class of proxy instance or any regular class.
targetType - target class type
Returns:
the class of the original (unproxied) instance or the parameter itself
See Also:
ProxyHelper.getUnproxiedClass(java.lang.Class)

getUnproxiedClass

public Class getUnproxiedClass(Class currentClass)
Description copied from interface: ProxyHelper
Returns the original class for the given class which might be the class of a proxied instance.

Specified by:
getUnproxiedClass in interface ProxyHelper
Parameters:
currentClass - class of proxy instance or any regular class.
Returns:
the class of the original (unproxied) instance or the parameter itself

getNameOfClass

public String getNameOfClass(Class currentClass)
Description copied from interface: ProxyHelper
Returns the original fully qualified class-name for the given class which might be the class of a proxied instance.

Specified by:
getNameOfClass in interface ProxyHelper
Parameters:
currentClass - class of proxy instance or any regular class.
Returns:
the class-name of the original (unproxied) instance or the name of the parameter itself

getClassNameOfObject

public String getClassNameOfObject(Object object)
Description copied from interface: ProxyHelper
Returns the original fully qualified class-name for the given object which might be a proxied instance.

Specified by:
getClassNameOfObject in interface ProxyHelper
Parameters:
object - proxy instance or any regular object.
Returns:
the class-name of the original (unproxied) instance or the name of the parameter itself

isProxiedClass

public boolean isProxiedClass(Class currentClass)
Description copied from interface: ProxyHelper
Checks if the given class is a class of a proxied instance.

Specified by:
isProxiedClass in interface ProxyHelper
Parameters:
currentClass - proxy class to check.
Returns:
true if the given class is a class of a proxied instance

isProxiedObject

public boolean isProxiedObject(Object proxiedObject)
Description copied from interface: ProxyHelper
Checks if the given instance is proxied.

Specified by:
isProxiedObject in interface ProxyHelper
Parameters:
proxiedObject - object to check.
Returns:
true if the given object is a proxied instance


Copyright © 2008-2010 The Apache Software Foundation. All Rights Reserved.