public final class AdvisoryPermissionParser extends Object
Constructor and Description |
---|
AdvisoryPermissionParser() |
Modifier and Type | Method and Description |
---|---|
static String |
getEncoded(Permission perm) |
static String |
getEncoded(String type,
String name,
String actions)
Returns the string encoding of this
Permission in a form
suitable for restoring this Permission . |
static Permission |
parse(String encodedPermission,
ClassLoader loader)
Parses the encoded permission and instantiates it using the provided
ClassLoader.
|
public static Permission parse(String encodedPermission, ClassLoader loader)
encodedPermission
- loader
- public static String getEncoded(Permission perm)
public static String getEncoded(String type, String name, String actions)
Permission
in a form
suitable for restoring this Permission
.
The encoded format is:
(type)or
(type "name")or
(type "name" "actions")where name and actions are strings that must be encoded for proper parsing. Specifically, the
"
,\
,
carriage return, and line feed characters must be escaped using
\"
, \\
,\r
, and
\n
, respectively.
The encoded string contains no leading or trailing whitespace characters. A single space character is used between type and "name" and between "name" and "actions".
PermissionInfo
.Copyright © 2016–2018 The Apache Software Foundation. All rights reserved.