Class ObjectStreamClassPredicate
java.lang.Object
org.apache.commons.io.serialization.ObjectStreamClassPredicate
- All Implemented Interfaces:
- Predicate<ObjectStreamClass>
A predicate (boolean-valued function) of one argument to accept and reject classes.
 
The reject list takes precedence over the accept list.
- Since:
- 2.18.0
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionAccepts the specified classes for deserialization, unless they are otherwise rejected.Accepts the wildcard specified classes for deserialization, unless they are otherwise rejected.Accepts class names that match the supplied pattern for deserialization, unless they are otherwise rejected.accept(ClassNameMatcher matcher) Accepts class names where the supplied ClassNameMatcher matches for deserialization, unless they are otherwise rejected.Rejects the specified classes for deserialization, even if they are otherwise accepted.Rejects the wildcard specified classes for deserialization, even if they are otherwise accepted.Rejects class names that match the supplied pattern for deserialization, even if they are otherwise accepted.Rejects class names where the supplied ClassNameMatcher matches for deserialization, even if they are otherwise accepted.booleantest(ObjectStreamClass objectStreamClass) Tests that the ObjectStreamClass conforms to requirements.booleanTests that the class name conforms to requirements.
- 
Constructor Details- 
ObjectStreamClassPredicatepublic ObjectStreamClassPredicate()Constructs a new instance.
 
- 
- 
Method Details- 
acceptAccepts the specified classes for deserialization, unless they are otherwise rejected.The reject list takes precedence over the accept list. - Parameters:
- classes- Classes to accept
- Returns:
- this object
 
- 
acceptAccepts class names where the supplied ClassNameMatcher matches for deserialization, unless they are otherwise rejected.The reject list takes precedence over the accept list. - Parameters:
- matcher- a class name matcher to accept objects.
- Returns:
- this instance.
 
- 
acceptAccepts class names that match the supplied pattern for deserialization, unless they are otherwise rejected.The reject list takes precedence over the accept list. - Parameters:
- pattern- a Pattern for compiled regular expression.
- Returns:
- this instance.
 
- 
acceptAccepts the wildcard specified classes for deserialization, unless they are otherwise rejected.The reject list takes precedence over the accept list. - Parameters:
- patterns- Wildcard file name patterns as defined by- FilenameUtils.wildcardMatch
- Returns:
- this instance.
 
- 
rejectRejects the specified classes for deserialization, even if they are otherwise accepted.The reject list takes precedence over the accept list. - Parameters:
- classes- Classes to reject
- Returns:
- this instance.
 
- 
rejectRejects class names where the supplied ClassNameMatcher matches for deserialization, even if they are otherwise accepted.The reject list takes precedence over the accept list. - Parameters:
- m- the matcher to use
- Returns:
- this instance.
 
- 
rejectRejects class names that match the supplied pattern for deserialization, even if they are otherwise accepted.The reject list takes precedence over the accept list. - Parameters:
- pattern- standard Java regexp
- Returns:
- this instance.
 
- 
rejectRejects the wildcard specified classes for deserialization, even if they are otherwise accepted.The reject list takes precedence over the accept list. - Parameters:
- patterns- Wildcard file name patterns as defined by- FilenameUtils.wildcardMatch
- Returns:
- this instance.
 
- 
testTests that the ObjectStreamClass conforms to requirements.The reject list takes precedence over the accept list. - Specified by:
- testin interface- Predicate<ObjectStreamClass>
- Parameters:
- objectStreamClass- The ObjectStreamClass to test.
- Returns:
- true if the input is accepted, false if rejected, false if neither.
 
- 
testTests that the class name conforms to requirements.The reject list takes precedence over the accept list. - Parameters:
- name- The class name to test.
- Returns:
- true if the input is accepted, false if rejected, false if neither.
 
 
-