@CallerSensitive
public Class<?> getDeclaringClass () throws SecurityException

If the class or interface represented by this Class object is a member of another class, returns the Class object representing the class in which it was declared. This method returns null if this class or interface is not a member of any other class. If this Class object represents an array class, a primitive type, or void,then this method returns null.

Returns:  the declaring class for this class

Exceptions:
SecurityException     If a security manager, s, is present and the caller's class loader is not the same as or an ancestor of the class loader for the declaring class and invocation of s.checkPackageAccess() denies access to the package of the declaring class

Since:  1.1