Microsoft SDK for Java

setAllowedPublicAccess

This method of the ReflectionPermission Class sets the types of classes that the permission object allows public reflective access to. The classes are specified by the loader types. For example, the following code indicates that the permission should allow reflective access to public members of all classes:

    ...
    ReflectionPermission perm = new ReflectionPermission();
    perm.setAllowedPublicAccess(ReflectionPermission.ALL);
    ...

Syntax

public void setAllowedPublicAccess(int loadertypes);

Parameters

loadertypes The types of classes that the permission object allows public reflective access to. This should be one of the following types: SAMELOADER, DIFFERENTLOADER, SYSTEMLOADER, ALL, or NONE.

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