Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Copyright 2002-2008 the original author or authors.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
  *
  *      http://www.apache.org/licenses/LICENSE-2.0
  *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.springframework.beans;
The central interface of Spring's low-level JavaBeans infrastructure.

Typically not used directly but rather implicitly via a org.springframework.beans.factory.BeanFactory or a org.springframework.validation.DataBinder.

Provides operations to analyze and manipulate standard JavaBeans: the ability to get and set property values (individually or in bulk), get property descriptors, and query the readability/writability of properties.

This interface supports nested properties enabling the setting of properties on subproperties to an unlimited depth. A BeanWrapper instance can be used repeatedly, with its target object (the wrapped JavaBean instance) changing as required.

A BeanWrapper's default for the "extractOldValueForEditor" setting is "false", to avoid side effects caused by getter method invocations. Turn this to "true" to expose present property values to custom editors.

Author(s):
Rod Johnson
Juergen Hoeller
Since:
13 April 2001
See also:
ConfigurablePropertyAccessor.setExtractOldValueForEditor(boolean)
PropertyAccessor
PropertyEditorRegistry
PropertyAccessorFactory.forBeanPropertyAccess(java.lang.Object)
org.springframework.beans.factory.BeanFactory
org.springframework.validation.BeanPropertyBindingResult
org.springframework.validation.DataBinder#initBeanPropertyAccess()
public interface BeanWrapper extends ConfigurablePropertyAccessor {

Change the wrapped JavaBean object.

Deprecated:
as of Spring 2.5, in favor of recreating a BeanWrapper per target instance
Parameters:
obj the bean instance to wrap
Return the bean instance wrapped by this object, if any.

Returns:
the bean instance, or null if none set
Return the type of the wrapped JavaBean object.

Returns:
the type of the wrapped bean instance, or null if no wrapped object has been set
Obtain the PropertyDescriptors for the wrapped object (as determined by standard JavaBeans introspection).

Returns:
the PropertyDescriptors for the wrapped object
Obtain the property descriptor for a specific property of the wrapped object.

Parameters:
propertyName the property to obtain the descriptor for (may be a nested path, but no indexed/mapped property)
Returns:
the property descriptor for the specified property
Throws:
InvalidPropertyException if there is no such property
New to GrepCode? Check out our FAQ X