Microsoft SDK for Java

findPackageManagerClass

The findPackageManagerClass method of the SecurityClassLoader Class contains the following signatures:

findPackageManagerClass(String name)
findPackageManagerClass(String name,boolean fNameSpaceOnly)

findPackageManagerClass(String name)

Finds a specified class from the package manager. Within the package manager, this method will search for the class in both the global namespace and the namespace associated with the loader (if any). Calling this method is equivalent to calling findPackageManagerClass(name,false).

Syntax

protected Class findPackageManagerClass(String name) throws ClassNotFoundException;

Return Value

Returns a package manager class with the specified name.

Parameters

name The name of the class.

Exceptions

ClassNotFoundException if this method cannot find a definition for the class.

findPackageManagerClass(String name,boolean fNameSpaceOnly)

Finds a specified class from the package manager. If the class is found, it will be marked with the set of permissions that are associated with its package within the package manager. The principal associated with the class will be based on the principal that the package manager associates with its package.

Syntax

protected Class findPackageManagerClass(String name,boolean fNameSpaceOnly) throws ClassNotFoundException;

Return Value

Returns a package manager class with the specified name.

Parameters

name The name of the class.
fNameSpaceOnly The flag that indicates whether to ignore the global package manager namespace during the search for the class. If the value is true, only the package manager namespace associated with the class loader will be searched; otherwise, the global namespace and the package manager namespace will be searched.

Remarks

The fNameSpaceOnly parameter can be used to force this method to look only in the package manager namespace associated with this loader. However, only rarely would you need to exclude the global namespace from the search path. Normally, you would pass false for the fNameSpaceOnly parameter, or simply use the findPackageManagerClass method that has only one parameter.

Exceptions

ClassNotFoundException if this method cannot find a definition for the specified class.

© 1999 Microsoft Corporation. All rights reserved. Terms of use.