Java in a Nutshell, 5th Edition [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Java in a Nutshell, 5th Edition [Electronic resources] - نسخه متنی

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید



This class uses a Guard
object to guard against unauthorized access to an arbitrary
encapsulated object. Create a GuardedObject by
specifying an object and a Guard for it. The
getObject( )
method calls the checkGuard( ) method of the
Guard to determine whether access to the object
should be allowed. If access is allowed, getObject(
)
returns the encapsulated object. Otherwise, it throws a
java.lang.SecurityException.

The Guard object used by a
GuardedObject is often a
Permission. In this case, access to the guarded
object is granted only if the calling code is granted the specified
permission by the current security policy.


Figure 14-11. java.security.GuardedObject

public class 

GuardedObject implements Serializable {
// Public Constructors
public

GuardedObject (Object

object , Guard

guard );
// Public Instance Methods
public Object

getObject ( ) throws SecurityException;
}



/ 1191