Class RegExpTypePermission
java.lang.Object
com.thoughtworks.xstream.security.RegExpTypePermission
- All Implemented Interfaces:
TypePermission
- Direct Known Subclasses:
WildcardTypePermission
Permission for any type with a name matching one of the provided regular expressions.
- Since:
- 1.4.7
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionRegExpTypePermission
(String[] patterns) RegExpTypePermission
(Pattern[] patterns) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Check permission for a provided type.private static Pattern[]
getPatterns
(String[] patterns)
-
Field Details
-
patterns
-
-
Constructor Details
-
RegExpTypePermission
-
RegExpTypePermission
-
-
Method Details
-
allows
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
-