01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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:
18: package java.io;
19:
20: import java.security.BasicPermission;
21:
22: /**
23: * SerializablePermission objects represent permission to access unsafe
24: * serialization operations. The name of the permission should be one of:
25: * <dl>
26: * <dt>enableSubclassImplementation</dt>
27: * <dd>Subclasses can override serialization behavior</dd>
28: * <dt>enableSubstitution</dt>
29: * <dd>Object substitution can be enabled</dd>
30: * </dl>
31: *
32: * @see ObjectStreamConstants
33: */
34: public final class SerializablePermission extends BasicPermission {
35: private static final long serialVersionUID = 8537212141160296410L;
36:
37: // Serializable field
38: @SuppressWarnings("unused")
39: private String actions;
40:
41: /**
42: * Creates an instance of this class with the given name.
43: *
44: * @param permissionName
45: * the name of the new permission.
46: */
47: public SerializablePermission(String permissionName) {
48: super (permissionName);
49: }
50:
51: /**
52: * Creates an instance of this class with the given name and action list.
53: * The action list is ignored.
54: *
55: * @param name
56: * the name of the new permission.
57: * @param actions
58: * ignored.
59: */
60: public SerializablePermission(String name, String actions) {
61: super(name, actions);
62: }
63: }
|