public static Object checkCast(Object value, Object object, String valueClassName)
    {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled())
        {
            ClassLoader valueLoader = value == null ? null :
                            AccessController.doPrivileged(new GetClassLoaderPrivileged(value.getClass()));
            ClassLoader contextLoader =
                            AccessController.doPrivileged(new GetContextClassLoaderPrivileged());
            ClassLoader objectLoader =
                            AccessController.doPrivileged(new GetClassLoaderPrivileged(object.getClass()));

            ClassLoader objectValueLoader;
            try
            {
                Class<?> objectValueClass = Class.forName(valueClassName, false, objectLoader);
                objectValueLoader = objectValueClass == null ? null :
                                AccessController.doPrivileged(new GetClassLoaderPrivileged(objectValueClass));
            } catch (Throwable t)
            {
                Tr.debug(tc, "checkCast: failed to load " + valueClassName, t);
                objectValueLoader = null;
            }

            Tr.debug(tc, "checkCast: value=" + Util.identity(value) +
                         ", valueClassName=" + valueClassName,
                     ", valueLoader=" + Util.identity(valueLoader) +
                                     ", contextLoader=" + Util.identity(contextLoader) +
                                     ", object=" + Util.identity(object) +
                                     ", objectLoader=" + Util.identity(objectLoader) +
                                     ", objectValueLoader=" + Util.identity(objectValueLoader));
        }

        return value;
    }
public static Object checkCast ( Object value , Object object , String valueClassName ) { if ( TraceComponent . isAnyTracingEnabled ( ) && tc . isDebugEnabled ( ) ) { ClassLoader valueLoader = value == null ? null : AccessController . doPrivileged ( new GetClassLoaderPrivileged ( value . getClass ( ) ) ) ; ClassLoader contextLoader = AccessController . doPrivileged ( new GetContextClassLoaderPrivileged ( ) ) ; ClassLoader objectLoader = AccessController . doPrivileged ( new GetClassLoaderPrivileged ( object . getClass ( ) ) ) ; ClassLoader objectValueLoader ; try { Class < ? > objectValueClass = Class . forName ( valueClassName , false , objectLoader ) ; objectValueLoader = objectValueClass == null ? null : AccessController . doPrivileged ( new GetClassLoaderPrivileged ( objectValueClass ) ) ; } catch ( Throwable t ) { Tr . debug ( tc , "checkCast: failed to load " + valueClassName , t ) ; objectValueLoader = null ; } Tr . debug ( tc , "checkCast: value=" + Util . identity ( value ) + ", valueClassName=" + valueClassName , ", valueLoader=" + Util . identity ( valueLoader ) + ", contextLoader=" + Util . identity ( contextLoader ) + ", object=" + Util . identity ( object ) + ", objectLoader=" + Util . identity ( objectLoader ) + ", objectValueLoader=" + Util . identity ( objectValueLoader ) ) ; } return value ; }
Called by JIT-deployed code that is performing a checkcast. For the
convenience of generated code, the input value is returned directly.

@param value the value being cast
@param object the object performing the cast
@param valueClassName the expected class name
@return value