home *** CD-ROM | disk | FTP | other *** search
/ Java 1.2 How-To / JavaHowTo.iso / 3rdParty / jbuilder / unsupported / JDK1.2beta3 / SOURCE / SRC.ZIP / java / lang / reflect / ReflectPermission.java < prev   
Encoding:
Java Source  |  1998-03-20  |  2.0 KB  |  69 lines

  1. /*
  2.  * @(#)ReflectPermission.java    1.7 98/03/18
  3.  *
  4.  * Copyright 1997 by Sun Microsystems, Inc.,
  5.  * 901 San Antonio Road, Palo Alto, California, 94303, U.S.A.
  6.  * All rights reserved.
  7.  *
  8.  * This software is the confidential and proprietary information
  9.  * of Sun Microsystems, Inc. ("Confidential Information").  You
  10.  * shall not disclose such Confidential Information and shall use
  11.  * it only in accordance with the terms of the license agreement
  12.  * you entered into with Sun.
  13.  */
  14.  
  15. package java.lang.reflect;
  16.  
  17. /**
  18.  * The Permission class for reflective operations.  A
  19.  * ReflectPermission is a <em>named permission</em> and has no
  20.  * actions.  The only name currently defined is <tt>access</tt>,
  21.  * which allows suppressing the standard Java language access checks
  22.  * --for public, default (package) access, protected, and private
  23.  * members--performed by reflected objects at their point of use.
  24.  *
  25.  * <p>An example of permitting the identity "Duke" to suppress the
  26.  * language access checking for reflected members might be:
  27.  * <code>
  28.  *    grant signedBy "Duke" {
  29.  *        java.lang.reflect.ReflectPermission "access";
  30.  *    }
  31.  * </code>
  32.  *
  33.  * @see java.security.Permission
  34.  * @see java.security.BasicPermission
  35.  * @see AccessibleObject
  36.  * @see Field#get
  37.  * @see Field#set
  38.  * @see Method#invoke
  39.  * @see Constructor#newInstance
  40.  *
  41.  * @since JDK1.2
  42.  */
  43. public final
  44. class ReflectPermission extends java.security.BasicPermission {
  45.  
  46.     /**
  47.      * Constructs a ReflectPermission with the specified name.
  48.      *
  49.      * @param name the name of the ReflectPermission
  50.      */
  51.     public ReflectPermission(String name) {
  52.     super(name);
  53.     }
  54.  
  55.     /**
  56.      * Constructs a ReflectPermission with the specified name and actions.
  57.      * The actions should be null; they are ignored. This
  58.      * constructor exists for use by the <code>Policy</code> object
  59.      * to instantiate new Permission objects.
  60.      *
  61.      * @param name the name of the ReflectPermission
  62.      * @param actions should be null.
  63.      */
  64.     public ReflectPermission(String name, String actions) {
  65.     super(name, actions);
  66.     }
  67.  
  68. }
  69.