001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package java.lang;
019:
020: import java.security.BasicPermission;
021:
022: /**
023: * RuntimePermission objects represent access to runtime support.
024: */
025: public final class RuntimePermission extends BasicPermission {
026:
027: private static final long serialVersionUID = 7399184964622342223L;
028:
029: /**
030: * Constants for runtime permissions used in this package.
031: */
032: static final RuntimePermission permissionToSetSecurityManager = new RuntimePermission(
033: "setSecurityManager"); //$NON-NLS-1$
034:
035: static final RuntimePermission permissionToCreateSecurityManager = new RuntimePermission(
036: "createSecurityManager"); //$NON-NLS-1$
037:
038: static final RuntimePermission permissionToGetProtectionDomain = new RuntimePermission(
039: "getProtectionDomain"); //$NON-NLS-1$
040:
041: static final RuntimePermission permissionToGetClassLoader = new RuntimePermission(
042: "getClassLoader"); //$NON-NLS-1$
043:
044: static final RuntimePermission permissionToCreateClassLoader = new RuntimePermission(
045: "createClassLoader"); //$NON-NLS-1$
046:
047: static final RuntimePermission permissionToModifyThread = new RuntimePermission(
048: "modifyThread"); //$NON-NLS-1$
049:
050: static final RuntimePermission permissionToModifyThreadGroup = new RuntimePermission(
051: "modifyThreadGroup"); //$NON-NLS-1$
052:
053: static final RuntimePermission permissionToExitVM = new RuntimePermission(
054: "exitVM"); //$NON-NLS-1$
055:
056: static final RuntimePermission permissionToReadFileDescriptor = new RuntimePermission(
057: "readFileDescriptor"); //$NON-NLS-1$
058:
059: static final RuntimePermission permissionToWriteFileDescriptor = new RuntimePermission(
060: "writeFileDescriptor"); //$NON-NLS-1$
061:
062: static final RuntimePermission permissionToQueuePrintJob = new RuntimePermission(
063: "queuePrintJob"); //$NON-NLS-1$
064:
065: static final RuntimePermission permissionToSetFactory = new RuntimePermission(
066: "setFactory"); //$NON-NLS-1$
067:
068: static final RuntimePermission permissionToSetIO = new RuntimePermission(
069: "setIO"); //$NON-NLS-1$
070:
071: static final RuntimePermission permissionToStopThread = new RuntimePermission(
072: "stopThread"); //$NON-NLS-1$
073:
074: static final RuntimePermission permissionToSetContextClassLoader = new RuntimePermission(
075: "setContextClassLoader"); //$NON-NLS-1$
076:
077: /**
078: * Creates an instance of this class with the given name.
079: *
080: *
081: * @param permissionName
082: * String the name of the new permission.
083: */
084: public RuntimePermission(String permissionName) {
085: super (permissionName);
086: }
087:
088: /**
089: * Creates an instance of this class with the given name and action list.
090: * The action list is ignored.
091: *
092: *
093: * @param name
094: * String the name of the new permission.
095: * @param actions
096: * String ignored.
097: */
098: public RuntimePermission(String name, String actions) {
099: super(name, actions);
100: }
101: }
|