FileDocCategorySizeDatePackage
SecurityChecker.javaAPI DocAndroid 1.5 API1649Wed May 06 22:41:06 BST 2009org.apache.harmony.security.tests.support

SecurityChecker

public class SecurityChecker extends SecurityManager
Custom security manager

Fields Summary
public boolean
enableAccess
public Permission
checkTarget
public boolean
checkAsserted
Constructors Summary
public SecurityChecker(Permission target, boolean enable)

        checkAsserted = false;
        checkTarget = target;
        enableAccess = enable;
    
Methods Summary
public voidcheckPermission(java.security.Permission p)

        if (checkTarget.equals(p)) {
            checkAsserted = true;
            if (!enableAccess) {
                throw new SecurityException();
            }
        }
    
public org.apache.harmony.security.tests.support.SecurityCheckerreset()

        checkAsserted = false;
        return this;