Class RegExpTypePermission
- java.lang.Object
-
- com.thoughtworks.xstream.security.RegExpTypePermission
-
- All Implemented Interfaces:
TypePermission
- Direct Known Subclasses:
WildcardTypePermission
public class RegExpTypePermission extends java.lang.Object implements TypePermission
Permission for any type with a name matching one of the provided regular expressions.- Since:
- 1.4.7
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.regex.Pattern[]
patterns
-
Constructor Summary
Constructors Constructor Description RegExpTypePermission(java.lang.String[] patterns)
RegExpTypePermission(java.util.regex.Pattern[] patterns)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
allows(java.lang.Class type)
Check permission for a provided type.private static java.util.regex.Pattern[]
getPatterns(java.lang.String[] patterns)
-
-
-
Method Detail
-
allows
public boolean allows(java.lang.Class type)
Description copied from interface:TypePermission
Check permission for a provided type.- Specified by:
allows
in interfaceTypePermission
- Parameters:
type
- the type to check- Returns:
true
if provided type is allowed,false
if permission does not handle the type
-
getPatterns
private static java.util.regex.Pattern[] getPatterns(java.lang.String[] patterns)
-
-