Java in a Nutshell, 5th Edition [Electronic resources]

نسخه متنی -صفحه : 1191/ 501
نمايش فراداده

This interface guards access to an object. The checkGuard( ) method is passed an object to which access has been requested. If access should be granted, checkGuard( ) should return silently. Otherwise, if access is denied, checkGuard( ) should throw a java.lang.SecurityException. The Guard object is used primarily by the GuardedObject class. Note that all Permission objects implement the Guard interface.

public interface 

Guard { // Public Instance Methods void

checkGuard (Object

object ) throws SecurityException; }

Implementations

Permission

Passed To

GuardedObject.GuardedObject( )