public class SuppressPropertiesBeanIntrospector extends Object implements BeanIntrospector
BeanIntrospector implementation which suppresses some properties.
An instance of this class is passed a set with the names of the properties it should
process. During introspection of a bean class it removes all these properties from the
IntrospectionContext. So effectively, properties added by a different
BeanIntrospector are removed again.
|Modifier and Type||Field and Description|
A specialized instance which is configured to suppress the special
|Constructor and Description|
Creates a new instance of
|Modifier and Type||Method and Description|
Returns a (unmodifiable) set with the names of the properties which are suppressed by this
Performs introspection on a Java class.
public static final SuppressPropertiesBeanIntrospector SUPPRESS_CLASS
classproperties of Java beans. Unintended access to the property
class(which is common to all Java objects) can be a security risk because it also allows access to the class loader. Adding this instance as
BeanIntrospectorto an instance of
classproperty; it can then no longer be accessed.
public SuppressPropertiesBeanIntrospector(Collection<String> propertiesToSuppress)
SuppressPropertiesBeanIntrospectorand sets the names of the properties to be suppressed.
propertiesToSuppress- the names of the properties to be suppressed (must not be null)
IllegalArgumentException- if the collection with property names is null
public void introspect(IntrospectionContext icontext) throws IntrospectionException
IntrospectionContextobject. A typical implementation has to obtain this class, determine its properties according to the rules it implements, and add them to the passed in context object. This implementation removes all properties from the given context it is configured for.
Copyright © 2000–2014 The Apache Software Foundation. All rights reserved.