ReflectPermission.java revision 4f11ebea266eada830d507b8f011e811a8e5d7bc
1/*
2 *  Licensed to the Apache Software Foundation (ASF) under one or more
3 *  contributor license agreements.  See the NOTICE file distributed with
4 *  this work for additional information regarding copyright ownership.
5 *  The ASF licenses this file to You under the Apache License, Version 2.0
6 *  (the "License"); you may not use this file except in compliance with
7 *  the License.  You may obtain a copy of the License at
8 *
9 *     http://www.apache.org/licenses/LICENSE-2.0
10 *
11 *  Unless required by applicable law or agreed to in writing, software
12 *  distributed under the License is distributed on an "AS IS" BASIS,
13 *  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 *  See the License for the specific language governing permissions and
15 *  limitations under the License.
16 */
17
18package java.lang.reflect;
19
20import java.security.BasicPermission;
21
22/**
23 * Legacy security code; this class exists for compatibility only.
24 */
25public final class ReflectPermission extends BasicPermission {
26
27    private static final long serialVersionUID = 7412737110241507485L;
28
29    /**
30     * Constructs a new {@code ReflectPermission} instance with the specified
31     * name.
32     *
33     * @param permissionName
34     *            the name of the new permission
35     * @throws IllegalArgumentException
36     *             if {@code name} is empty
37     * @throws NullPointerException
38     *             if {@code name} is {@code null}
39     */
40    public ReflectPermission(String permissionName) {
41        super(permissionName);
42    }
43
44    /**
45     * Constructs a new {@code ReflectPermission} instance with the specified
46     * name and action list. The action list will be ignored.
47     *
48     * @param name
49     *            the name of the new permission
50     * @param actions
51     *            this parameter will be ignored
52     * @throws IllegalArgumentException
53     *             if {@code name} is empty
54     * @throws NullPointerException
55     *             if {@code name} is {@code null}
56     */
57    public ReflectPermission(String name, String actions) {
58        super(name, actions);
59    }
60}
61