public interface IntrospectionContext
A context interface used during introspection for querying and setting property descriptors.
An implementation of this interface is passed to BeanIntrospector
objects during processing of a bean class. It allows the
BeanIntrospector
to deliver descriptors for properties it has
detected. It is also possible to find out which properties have already been
found by another BeanIntrospector
; this allows multiple
BeanIntrospector
instances to collaborate.
Modifier and Type | Method and Description |
---|---|
void |
addPropertyDescriptor(java.beans.PropertyDescriptor desc)
Adds the given property descriptor to this context.
|
void |
addPropertyDescriptors(java.beans.PropertyDescriptor[] descriptors)
Adds an array of property descriptors to this context.
|
java.beans.PropertyDescriptor |
getPropertyDescriptor(java.lang.String name)
Returns the descriptor for the property with the given name or
null if this property is unknown.
|
java.lang.Class<?> |
getTargetClass()
Returns the class that is subject of introspection.
|
boolean |
hasProperty(java.lang.String name)
Tests whether a descriptor for the property with the given name is
already contained in this context.
|
java.util.Set<java.lang.String> |
propertyNames()
Returns a set with the names of all properties known to this context.
|
void |
removePropertyDescriptor(java.lang.String name)
Removes the descriptor for the property with the given name.
|
java.lang.Class<?> getTargetClass()
void addPropertyDescriptor(java.beans.PropertyDescriptor desc)
BeanIntrospector
during introspection for each detected
property. If this context already contains a descriptor for the affected
property, it is overridden.desc
- the property descriptorvoid addPropertyDescriptors(java.beans.PropertyDescriptor[] descriptors)
descriptors
- the array of descriptors to be addedboolean hasProperty(java.lang.String name)
name
- the name of the property in questionjava.beans.PropertyDescriptor getPropertyDescriptor(java.lang.String name)
name
- the name of the property in questionvoid removePropertyDescriptor(java.lang.String name)
name
- the name of the affected propertyjava.util.Set<java.lang.String> propertyNames()
Copyright (c) 2000-2008 - Apache Software Foundation