Replace <code> with {@code} throughout Javadoc

Issue: SPR-10128
This commit is contained in:
Chris Beams
2012-12-18 14:45:36 +01:00
parent 8597ec25ec
commit 9540d2c81b
1503 changed files with 8001 additions and 8060 deletions

View File

@@ -37,7 +37,7 @@ public class BeanMetadataAttribute implements BeanMetadataElement {
/**
* Create a new AttributeValue instance.
* @param name the name of the attribute (never <code>null</code>)
* @param name the name of the attribute (never {@code null})
* @param value the value of the attribute (possibly before type conversion)
*/
public BeanMetadataAttribute(String name, Object value) {
@@ -62,7 +62,7 @@ public class BeanMetadataAttribute implements BeanMetadataElement {
}
/**
* Set the configuration source <code>Object</code> for this metadata element.
* Set the configuration source {@code Object} for this metadata element.
* <p>The exact type of the object will depend on the configuration mechanism used.
*/
public void setSource(Object source) {

View File

@@ -32,7 +32,7 @@ public class BeanMetadataAttributeAccessor extends AttributeAccessorSupport impl
/**
* Set the configuration source <code>Object</code> for this metadata element.
* Set the configuration source {@code Object} for this metadata element.
* <p>The exact type of the object will depend on the configuration mechanism used.
*/
public void setSource(Object source) {
@@ -56,7 +56,7 @@ public class BeanMetadataAttributeAccessor extends AttributeAccessorSupport impl
* Look up the given BeanMetadataAttribute in this accessor's set of attributes.
* @param name the name of the attribute
* @return the corresponding BeanMetadataAttribute object,
* or <code>null</code> if no such attribute defined
* or {@code null} if no such attribute defined
*/
public BeanMetadataAttribute getMetadataAttribute(String name) {
return (BeanMetadataAttribute) super.getAttribute(name);

View File

@@ -26,8 +26,8 @@ package org.springframework.beans;
public interface BeanMetadataElement {
/**
* Return the configuration source <code>Object</code> for this metadata element
* (may be <code>null</code>).
* Return the configuration source {@code Object} for this metadata element
* (may be {@code null}).
*/
Object getSource();

View File

@@ -169,14 +169,14 @@ public abstract class BeanUtils {
* Find a method with the given method name and the given parameter types,
* declared on the given class or one of its superclasses. Prefers public methods,
* but will return a protected, package access, or private method too.
* <p>Checks <code>Class.getMethod</code> first, falling back to
* <code>findDeclaredMethod</code>. This allows to find public methods
* <p>Checks {@code Class.getMethod} first, falling back to
* {@code findDeclaredMethod}. This allows to find public methods
* without issues even in environments with restricted Java security settings.
* @param clazz the class to check
* @param methodName the name of the method to find
* @param paramTypes the parameter types of the method to find
* @return the Method object, or <code>null</code> if not found
* @see java.lang.Class#getMethod
* @return the Method object, or {@code null} if not found
* @see Class#getMethod
* @see #findDeclaredMethod
*/
public static Method findMethod(Class<?> clazz, String methodName, Class<?>... paramTypes) {
@@ -192,12 +192,12 @@ public abstract class BeanUtils {
* Find a method with the given method name and the given parameter types,
* declared on the given class or one of its superclasses. Will return a public,
* protected, package access, or private method.
* <p>Checks <code>Class.getDeclaredMethod</code>, cascading upwards to all superclasses.
* <p>Checks {@code Class.getDeclaredMethod}, cascading upwards to all superclasses.
* @param clazz the class to check
* @param methodName the name of the method to find
* @param paramTypes the parameter types of the method to find
* @return the Method object, or <code>null</code> if not found
* @see java.lang.Class#getDeclaredMethod
* @return the Method object, or {@code null} if not found
* @see Class#getDeclaredMethod
*/
public static Method findDeclaredMethod(Class<?> clazz, String methodName, Class<?>[] paramTypes) {
try {
@@ -215,15 +215,15 @@ public abstract class BeanUtils {
* Find a method with the given method name and minimal parameters (best case: none),
* declared on the given class or one of its superclasses. Prefers public methods,
* but will return a protected, package access, or private method too.
* <p>Checks <code>Class.getMethods</code> first, falling back to
* <code>findDeclaredMethodWithMinimalParameters</code>. This allows for finding public
* <p>Checks {@code Class.getMethods} first, falling back to
* {@code findDeclaredMethodWithMinimalParameters}. This allows for finding public
* methods without issues even in environments with restricted Java security settings.
* @param clazz the class to check
* @param methodName the name of the method to find
* @return the Method object, or <code>null</code> if not found
* @return the Method object, or {@code null} if not found
* @throws IllegalArgumentException if methods of the given name were found but
* could not be resolved to a unique method with minimal parameters
* @see java.lang.Class#getMethods
* @see Class#getMethods
* @see #findDeclaredMethodWithMinimalParameters
*/
public static Method findMethodWithMinimalParameters(Class<?> clazz, String methodName)
@@ -240,13 +240,13 @@ public abstract class BeanUtils {
* Find a method with the given method name and minimal parameters (best case: none),
* declared on the given class or one of its superclasses. Will return a public,
* protected, package access, or private method.
* <p>Checks <code>Class.getDeclaredMethods</code>, cascading upwards to all superclasses.
* <p>Checks {@code Class.getDeclaredMethods}, cascading upwards to all superclasses.
* @param clazz the class to check
* @param methodName the name of the method to find
* @return the Method object, or <code>null</code> if not found
* @return the Method object, or {@code null} if not found
* @throws IllegalArgumentException if methods of the given name were found but
* could not be resolved to a unique method with minimal parameters
* @see java.lang.Class#getDeclaredMethods
* @see Class#getDeclaredMethods
*/
public static Method findDeclaredMethodWithMinimalParameters(Class<?> clazz, String methodName)
throws IllegalArgumentException {
@@ -263,7 +263,7 @@ public abstract class BeanUtils {
* in the given list of methods.
* @param methods the methods to check
* @param methodName the name of the method to find
* @return the Method object, or <code>null</code> if not found
* @return the Method object, or {@code null} if not found
* @throws IllegalArgumentException if methods of the given name were found but
* could not be resolved to a unique method with minimal parameters
*/
@@ -297,17 +297,17 @@ public abstract class BeanUtils {
}
/**
* Parse a method signature in the form <code>methodName[([arg_list])]</code>,
* where <code>arg_list</code> is an optional, comma-separated list of fully-qualified
* type names, and attempts to resolve that signature against the supplied <code>Class</code>.
* <p>When not supplying an argument list (<code>methodName</code>) the method whose name
* Parse a method signature in the form {@code methodName[([arg_list])]},
* where {@code arg_list} is an optional, comma-separated list of fully-qualified
* type names, and attempts to resolve that signature against the supplied {@code Class}.
* <p>When not supplying an argument list ({@code methodName}) the method whose name
* matches and has the least number of parameters will be returned. When supplying an
* argument type list, only the method whose name and argument types match will be returned.
* <p>Note then that <code>methodName</code> and <code>methodName()</code> are <strong>not</strong>
* resolved in the same way. The signature <code>methodName</code> means the method called
* <code>methodName</code> with the least number of arguments, whereas <code>methodName()</code>
* means the method called <code>methodName</code> with exactly 0 arguments.
* <p>If no method can be found, then <code>null</code> is returned.
* <p>Note then that {@code methodName} and {@code methodName()} are <strong>not</strong>
* resolved in the same way. The signature {@code methodName} means the method called
* {@code methodName} with the least number of arguments, whereas {@code methodName()}
* means the method called {@code methodName} with exactly 0 arguments.
* <p>If no method can be found, then {@code null} is returned.
* @param signature the method signature as String representation
* @param clazz the class to resolve the method signature against
* @return the resolved Method
@@ -353,9 +353,9 @@ public abstract class BeanUtils {
/**
* Retrieve the JavaBeans <code>PropertyDescriptor</code>s of a given class.
* Retrieve the JavaBeans {@code PropertyDescriptor}s of a given class.
* @param clazz the Class to retrieve the PropertyDescriptors for
* @return an array of <code>PropertyDescriptors</code> for the given class
* @return an array of {@code PropertyDescriptors} for the given class
* @throws BeansException if PropertyDescriptor look fails
*/
public static PropertyDescriptor[] getPropertyDescriptors(Class<?> clazz) throws BeansException {
@@ -364,10 +364,10 @@ public abstract class BeanUtils {
}
/**
* Retrieve the JavaBeans <code>PropertyDescriptors</code> for the given property.
* Retrieve the JavaBeans {@code PropertyDescriptors} for the given property.
* @param clazz the Class to retrieve the PropertyDescriptor for
* @param propertyName the name of the property
* @return the corresponding PropertyDescriptor, or <code>null</code> if none
* @return the corresponding PropertyDescriptor, or {@code null} if none
* @throws BeansException if PropertyDescriptor lookup fails
*/
public static PropertyDescriptor getPropertyDescriptor(Class<?> clazz, String propertyName)
@@ -378,11 +378,11 @@ public abstract class BeanUtils {
}
/**
* Find a JavaBeans <code>PropertyDescriptor</code> for the given method,
* Find a JavaBeans {@code PropertyDescriptor} for the given method,
* with the method either being the read method or the write method for
* that bean property.
* @param method the method to find a corresponding PropertyDescriptor for
* @return the corresponding PropertyDescriptor, or <code>null</code> if none
* @return the corresponding PropertyDescriptor, or {@code null} if none
* @throws BeansException if PropertyDescriptor lookup fails
*/
public static PropertyDescriptor findPropertyForMethod(Method method) throws BeansException {
@@ -403,7 +403,7 @@ public abstract class BeanUtils {
* {@link java.beans.PropertyEditorManager} but isolated from the latter's
* registered default editors for primitive types.
* @param targetType the type to find an editor for
* @return the corresponding editor, or <code>null</code> if none found
* @return the corresponding editor, or {@code null} if none found
*/
public static PropertyEditor findEditorByConvention(Class<?> targetType) {
if (targetType == null || targetType.isArray() || unknownEditorTypes.containsKey(targetType)) {
@@ -453,7 +453,7 @@ public abstract class BeanUtils {
* given classes/interfaces, if possible.
* @param propertyName the name of the bean property
* @param beanClasses the classes to check against
* @return the property type, or <code>Object.class</code> as fallback
* @return the property type, or {@code Object.class} as fallback
*/
public static Class<?> findPropertyType(String propertyName, Class<?>[] beanClasses) {
if (beanClasses != null) {

View File

@@ -50,14 +50,14 @@ public interface BeanWrapper extends ConfigurablePropertyAccessor {
/**
* Return the bean instance wrapped by this object, if any.
* @return the bean instance, or <code>null</code> if none set
* @return the bean instance, or {@code null} if none set
*/
Object getWrappedInstance();
/**
* Return the type of the wrapped JavaBean object.
* @return the type of the wrapped bean instance,
* or <code>null</code> if no wrapped object has been set
* or {@code null} if no wrapped object has been set
*/
Class getWrappedClass();

View File

@@ -55,18 +55,18 @@ import org.springframework.util.StringUtils;
* for all typical use cases. Caches introspection results for efficiency.
*
* <p>Note: Auto-registers default property editors from the
* <code>org.springframework.beans.propertyeditors</code> package, which apply
* {@code org.springframework.beans.propertyeditors} package, which apply
* in addition to the JDK's standard PropertyEditors. Applications can call
* the {@link #registerCustomEditor(Class, java.beans.PropertyEditor)} method
* to register an editor for a particular instance (i.e. they are not shared
* across the application). See the base class
* {@link PropertyEditorRegistrySupport} for details.
*
* <p><code>BeanWrapperImpl</code> will convert collection and array values
* <p>{@code BeanWrapperImpl} will convert collection and array values
* to the corresponding target collections or arrays, if necessary. Custom
* property editors that deal with collections or arrays can either be
* written via PropertyEditor's <code>setValue</code>, or against a
* comma-delimited String via <code>setAsText</code>, as String arrays are
* written via PropertyEditor's {@code setValue}, or against a
* comma-delimited String via {@code setAsText}, as String arrays are
* converted in such a format if the array itself is not assignable.
*
* <p><b>NOTE: As of Spring 2.5, this is - for almost all purposes - an
@@ -179,7 +179,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
* registering a nested path that the object is in.
* @param object object wrapped by this BeanWrapper
* @param nestedPath the nested path of the object
* @param superBw the containing BeanWrapper (must not be <code>null</code>)
* @param superBw the containing BeanWrapper (must not be {@code null})
*/
private BeanWrapperImpl(Object object, String nestedPath, BeanWrapperImpl superBw) {
setWrappedInstance(object, nestedPath, superBw.getWrappedInstance());
@@ -341,10 +341,10 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
/**
* Internal version of {@link #getPropertyDescriptor}:
* Returns <code>null</code> if not found rather than throwing an exception.
* Returns {@code null} if not found rather than throwing an exception.
* @param propertyName the property to obtain the descriptor for
* @return the property descriptor for the specified property,
* or <code>null</code> if not found
* or {@code null} if not found
* @throws BeansException in case of introspection failure
*/
protected PropertyDescriptor getPropertyDescriptorInternal(String propertyName) throws BeansException {
@@ -474,7 +474,7 @@ public class BeanWrapperImpl extends AbstractPropertyAccessor implements BeanWra
/**
* Convert the given value for the specified property to the latter's type.
* <p>This method is only intended for optimizations in a BeanFactory.
* Use the <code>convertIfNecessary</code> methods for programmatic conversion.
* Use the {@code convertIfNecessary} methods for programmatic conversion.
* @param value the value to convert
* @param propertyName the target property
* (note that nested or indexed properties are not supported here)

View File

@@ -87,7 +87,7 @@ public class CachedIntrospectionResults {
* whose lifecycle is not coupled to the application. In such a scenario,
* CachedIntrospectionResults would by default not cache any of the application's
* classes, since they would create a leak in the common ClassLoader.
* <p>Any <code>acceptClassLoader</code> call at application startup should
* <p>Any {@code acceptClassLoader} call at application startup should
* be paired with a {@link #clearClassLoader} call at application shutdown.
* @param classLoader the ClassLoader to accept
*/

View File

@@ -30,8 +30,8 @@ public class ConversionNotSupportedException extends TypeMismatchException {
/**
* Create a new ConversionNotSupportedException.
* @param propertyChangeEvent the PropertyChangeEvent that resulted in the problem
* @param requiredType the required target type (or <code>null</code> if not known)
* @param cause the root cause (may be <code>null</code>)
* @param requiredType the required target type (or {@code null} if not known)
* @param cause the root cause (may be {@code null})
*/
public ConversionNotSupportedException(PropertyChangeEvent propertyChangeEvent, Class requiredType, Throwable cause) {
super(propertyChangeEvent, requiredType, cause);
@@ -39,9 +39,9 @@ public class ConversionNotSupportedException extends TypeMismatchException {
/**
* Create a new ConversionNotSupportedException.
* @param value the offending value that couldn't be converted (may be <code>null</code>)
* @param requiredType the required target type (or <code>null</code> if not known)
* @param cause the root cause (may be <code>null</code>)
* @param value the offending value that couldn't be converted (may be {@code null})
* @param requiredType the required target type (or {@code null} if not known)
* @param cause the root cause (may be {@code null})
*/
public ConversionNotSupportedException(Object value, Class requiredType, Throwable cause) {
super(value, requiredType, cause);

View File

@@ -32,7 +32,7 @@ import org.springframework.util.StringUtils;
/**
* Extension of the standard JavaBeans PropertyDescriptor class,
* overriding <code>getPropertyType()</code> such that a generically
* overriding {@code getPropertyType()} such that a generically
* declared type will be resolved against the containing bean class.
*
* @author Juergen Hoeller

View File

@@ -40,9 +40,9 @@ public interface Mergeable {
* the callee's value set must override those of the supplied object.
* @param parent the object to merge with
* @return the result of the merge operation
* @throws IllegalArgumentException if the supplied parent is <code>null</code>
* @throws IllegalArgumentException if the supplied parent is {@code null}
* @exception IllegalStateException if merging is not enabled for this instance
* (i.e. <code>mergeEnabled</code> equals <code>false</code>).
* (i.e. {@code mergeEnabled} equals {@code false}).
*/
Object merge(Object parent);

View File

@@ -46,7 +46,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
/**
* Creates a new empty MutablePropertyValues object.
* <p>Property values can be added with the <code>add</code> method.
* <p>Property values can be added with the {@code add} method.
* @see #add(String, Object)
*/
public MutablePropertyValues() {
@@ -176,7 +176,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
}
/**
* Overloaded version of <code>addPropertyValue</code> that takes
* Overloaded version of {@code addPropertyValue} that takes
* a property name and a property value.
* <p>Note: As of Spring 3.0, we recommend using the more concise
* and chaining-capable variant {@link #add}.
@@ -234,7 +234,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
}
/**
* Overloaded version of <code>removePropertyValue</code> that takes a property name.
* Overloaded version of {@code removePropertyValue} that takes a property name.
* @param propertyName name of the property
* @see #removePropertyValue(PropertyValue)
*/
@@ -291,7 +291,7 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
* Register the specified property as "processed" in the sense
* of some processor calling the corresponding setter method
* outside of the PropertyValue(s) mechanism.
* <p>This will lead to <code>true</code> being returned from
* <p>This will lead to {@code true} being returned from
* a {@link #contains} call for the specified property.
* @param propertyName the name of the property.
*/
@@ -311,8 +311,8 @@ public class MutablePropertyValues implements PropertyValues, Serializable {
}
/**
* Return whether this holder contains converted values only (<code>true</code>),
* or whether the values still need to be converted (<code>false</code>).
* Return whether this holder contains converted values only ({@code true}),
* or whether the values still need to be converted ({@code false}).
*/
public boolean isConverted() {
return this.converted;

View File

@@ -55,7 +55,7 @@ public abstract class PropertyAccessException extends BeansException implements
/**
* Return the PropertyChangeEvent that resulted in the problem.
* <p>May be <code>null</code>; only available if an actual bean property
* <p>May be {@code null}; only available if an actual bean property
* was affected.
*/
public PropertyChangeEvent getPropertyChangeEvent() {

View File

@@ -57,7 +57,7 @@ public interface PropertyAccessor {
/**
* Determine whether the specified property is readable.
* <p>Returns <code>false</code> if the property doesn't exist.
* <p>Returns {@code false} if the property doesn't exist.
* @param propertyName the property to check
* (may be a nested path and/or an indexed/mapped property)
* @return whether the property is readable
@@ -66,7 +66,7 @@ public interface PropertyAccessor {
/**
* Determine whether the specified property is writable.
* <p>Returns <code>false</code> if the property doesn't exist.
* <p>Returns {@code false} if the property doesn't exist.
* @param propertyName the property to check
* (may be a nested path and/or an indexed/mapped property)
* @return whether the property is writable
@@ -80,7 +80,7 @@ public interface PropertyAccessor {
* @param propertyName the property to check
* (may be a nested path and/or an indexed/mapped property)
* @return the property type for the particular property,
* or <code>null</code> if not determinable
* or {@code null} if not determinable
* @throws InvalidPropertyException if there is no such property or
* if the property isn't readable
* @throws PropertyAccessException if the property was valid but the
@@ -94,7 +94,7 @@ public interface PropertyAccessor {
* @param propertyName the property to check
* (may be a nested path and/or an indexed/mapped property)
* @return the property type for the particular property,
* or <code>null</code> if not determinable
* or {@code null} if not determinable
* @throws InvalidPropertyException if there is no such property or
* if the property isn't readable
*/

View File

@@ -132,8 +132,8 @@ public abstract class PropertyAccessorUtils {
/**
* Determine the canonical name for the given property path.
* Removes surrounding quotes from map keys:<br>
* <code>map['key']</code> -> <code>map[key]</code><br>
* <code>map["key"]</code> -> <code>map[key]</code>
* {@code map['key']} -> {@code map[key]}<br>
* {@code map["key"]} -> {@code map[key]}
* @param propertyName the bean property path
* @return the canonical representation of the property path
*/

View File

@@ -61,14 +61,14 @@ public class PropertyBatchUpdateException extends BeansException {
/**
* Return an array of the propertyAccessExceptions stored in this object.
* <p>Will return the empty array (not <code>null</code>) if there were no errors.
* <p>Will return the empty array (not {@code null}) if there were no errors.
*/
public final PropertyAccessException[] getPropertyAccessExceptions() {
return this.propertyAccessExceptions;
}
/**
* Return the exception for this field, or <code>null</code> if there isn't any.
* Return the exception for this field, or {@code null} if there isn't any.
*/
public PropertyAccessException getPropertyAccessException(String propertyName) {
for (PropertyAccessException pae : this.propertyAccessExceptions) {

View File

@@ -34,14 +34,14 @@ public interface PropertyEditorRegistrar {
/**
* Register custom {@link java.beans.PropertyEditor PropertyEditors} with
* the given <code>PropertyEditorRegistry</code>.
* the given {@code PropertyEditorRegistry}.
* <p>The passed-in registry will usually be a {@link BeanWrapper} or a
* {@link org.springframework.validation.DataBinder DataBinder}.
* <p>It is expected that implementations will create brand new
* <code>PropertyEditors</code> instances for each invocation of this
* method (since <code>PropertyEditors</code> are not threadsafe).
* @param registry the <code>PropertyEditorRegistry</code> to register the
* custom <code>PropertyEditors</code> with
* {@code PropertyEditors} instances for each invocation of this
* method (since {@code PropertyEditors} are not threadsafe).
* @param registry the {@code PropertyEditorRegistry} to register the
* custom {@code PropertyEditors} with
*/
void registerCustomEditors(PropertyEditorRegistry registry);

View File

@@ -47,7 +47,7 @@ public interface PropertyEditorRegistry {
* <p>If the property path denotes an array or Collection property,
* the editor will get applied either to the array/Collection itself
* (the {@link PropertyEditor} has to create an array or Collection value) or
* to each element (the <code>PropertyEditor</code> has to create the element type),
* to each element (the {@code PropertyEditor} has to create the element type),
* depending on the specified required type.
* <p>Note: Only one single registered custom editor per property path
* is supported. In the case of a Collection/array, do not register an editor
@@ -55,24 +55,24 @@ public interface PropertyEditorRegistry {
* <p>For example, if you wanted to register an editor for "items[n].quantity"
* (for all values n), you would use "items.quantity" as the value of the
* 'propertyPath' argument to this method.
* @param requiredType the type of the property. This may be <code>null</code>
* @param requiredType the type of the property. This may be {@code null}
* if a property is given but should be specified in any case, in particular in
* case of a Collection - making clear whether the editor is supposed to apply
* to the entire Collection itself or to each of its entries. So as a general rule:
* <b>Do not specify <code>null</code> here in case of a Collection/array!</b>
* <b>Do not specify {@code null} here in case of a Collection/array!</b>
* @param propertyPath the path of the property (name or nested path), or
* <code>null</code> if registering an editor for all properties of the given type
* {@code null} if registering an editor for all properties of the given type
* @param propertyEditor editor to register
*/
void registerCustomEditor(Class<?> requiredType, String propertyPath, PropertyEditor propertyEditor);
/**
* Find a custom property editor for the given type and property.
* @param requiredType the type of the property (can be <code>null</code> if a property
* @param requiredType the type of the property (can be {@code null} if a property
* is given but should be specified in any case for consistency checking)
* @param propertyPath the path of the property (name or nested path), or
* <code>null</code> if looking for an editor for all properties of the given type
* @return the registered editor, or <code>null</code> if none
* {@code null} if looking for an editor for all properties of the given type
* @return the registered editor, or {@code null} if none
*/
PropertyEditor findCustomEditor(Class<?> requiredType, String propertyPath);

View File

@@ -163,7 +163,7 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
* Retrieve the default editor for the given property type, if any.
* <p>Lazily registers the default editors, if they are active.
* @param requiredType type of the property
* @return the default editor, or <code>null</code> if none found
* @return the default editor, or {@code null} if none found
* @see #registerDefaultEditors
*/
public PropertyEditor getDefaultEditor(Class<?> requiredType) {
@@ -349,9 +349,9 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
* Determine whether this registry contains a custom editor
* for the specified array/collection element.
* @param elementType the target type of the element
* (can be <code>null</code> if not known)
* (can be {@code null} if not known)
* @param propertyPath the property path (typically of the array/collection;
* can be <code>null</code> if not known)
* can be {@code null} if not known)
* @return whether a matching custom editor has been found
*/
public boolean hasCustomEditorForElement(Class<?> elementType, String propertyPath) {
@@ -372,11 +372,11 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
* Determine the property type for the given property path.
* <p>Called by {@link #findCustomEditor} if no required type has been specified,
* to be able to find a type-specific editor even if just given a property path.
* <p>The default implementation always returns <code>null</code>.
* BeanWrapperImpl overrides this with the standard <code>getPropertyType</code>
* <p>The default implementation always returns {@code null}.
* BeanWrapperImpl overrides this with the standard {@code getPropertyType}
* method as defined by the BeanWrapper interface.
* @param propertyPath the property path to determine the type for
* @return the type of the property, or <code>null</code> if not determinable
* @return the type of the property, or {@code null} if not determinable
* @see BeanWrapper#getPropertyType(String)
*/
protected Class<?> getPropertyType(String propertyPath) {
@@ -387,7 +387,7 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
* Get custom editor that has been registered for the given property.
* @param propertyName the property path to look for
* @param requiredType the type to look for
* @return the custom editor, or <code>null</code> if none specific for this property
* @return the custom editor, or {@code null} if none specific for this property
*/
private PropertyEditor getCustomEditor(String propertyName, Class<?> requiredType) {
CustomEditorHolder holder = this.customEditorsForPath.get(propertyName);
@@ -397,9 +397,9 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
/**
* Get custom editor for the given type. If no direct match found,
* try custom editor for superclass (which will in any case be able
* to render a value as String via <code>getAsText</code>).
* to render a value as String via {@code getAsText}).
* @param requiredType the type to look for
* @return the custom editor, or <code>null</code> if none found for this type
* @return the custom editor, or {@code null} if none found for this type
* @see java.beans.PropertyEditor#getAsText()
*/
private PropertyEditor getCustomEditor(Class<?> requiredType) {
@@ -436,7 +436,7 @@ public class PropertyEditorRegistrySupport implements PropertyEditorRegistry {
* Guess the property type of the specified property from the registered
* custom editors (provided that they were registered for a specific type).
* @param propertyName the name of the property
* @return the property type, or <code>null</code> if not determinable
* @return the property type, or {@code null} if not determinable
*/
protected Class<?> guessPropertyTypeFromEditors(String propertyName) {
if (this.customEditorsForPath != null) {

View File

@@ -122,7 +122,7 @@ final class PropertyMatches {
/**
* Generate possible property alternatives for the given property and
* class. Internally uses the <code>getStringDistance</code> method, which
* class. Internally uses the {@code getStringDistance} method, which
* in turn uses the Levenshtein algorithm to determine the distance between
* two Strings.
* @param propertyDescriptors the JavaBeans property descriptors to search

View File

@@ -65,7 +65,7 @@ public class PropertyValue extends BeanMetadataAttributeAccessor implements Seri
/**
* Create a new PropertyValue instance.
* @param name the name of the property (never <code>null</code>)
* @param name the name of the property (never {@code null})
* @param value the value of the property (possibly before type conversion)
*/
public PropertyValue(String name, Object value) {
@@ -75,7 +75,7 @@ public class PropertyValue extends BeanMetadataAttributeAccessor implements Seri
/**
* Copy constructor.
* @param original the PropertyValue to copy (never <code>null</code>)
* @param original the PropertyValue to copy (never {@code null})
*/
public PropertyValue(PropertyValue original) {
Assert.notNull(original, "Original must not be null");
@@ -94,7 +94,7 @@ public class PropertyValue extends BeanMetadataAttributeAccessor implements Seri
/**
* Constructor that exposes a new value for an original value holder.
* The original holder will be exposed as source of the new holder.
* @param original the PropertyValue to link to (never <code>null</code>)
* @param original the PropertyValue to link to (never {@code null})
* @param newValue the new value to apply
*/
public PropertyValue(PropertyValue original, Object newValue) {
@@ -149,8 +149,8 @@ public class PropertyValue extends BeanMetadataAttributeAccessor implements Seri
}
/**
* Return whether this holder contains a converted value already (<code>true</code>),
* or whether the value still needs to be converted (<code>false</code>).
* Return whether this holder contains a converted value already ({@code true}),
* or whether the value still needs to be converted ({@code false}).
*/
public synchronized boolean isConverted() {
return this.converted;

View File

@@ -35,17 +35,17 @@ public interface PropertyValues {
/**
* Return the property value with the given name, if any.
* @param propertyName the name to search for
* @return the property value, or <code>null</code>
* @return the property value, or {@code null}
*/
PropertyValue getPropertyValue(String propertyName);
/**
* Return the changes since the previous PropertyValues.
* Subclasses should also override <code>equals</code>.
* Subclasses should also override {@code equals}.
* @param old old property values
* @return PropertyValues updated or new properties.
* Return empty PropertyValues if there are no changes.
* @see java.lang.Object#equals
* @see Object#equals
*/
PropertyValues changesSince(PropertyValues old);

View File

@@ -33,11 +33,11 @@ public interface TypeConverter {
/**
* Convert the value to the required type (if necessary from a String).
* <p>Conversions from String to any type will typically use the <code>setAsText</code>
* <p>Conversions from String to any type will typically use the {@code setAsText}
* method of the PropertyEditor class, or a Spring Converter in a ConversionService.
* @param value the value to convert
* @param requiredType the type we must convert to
* (or <code>null</code> if not known, for example in case of a collection element)
* (or {@code null} if not known, for example in case of a collection element)
* @return the new value, possibly the result of type conversion
* @throws TypeMismatchException if type conversion failed
* @see java.beans.PropertyEditor#setAsText(String)
@@ -49,13 +49,13 @@ public interface TypeConverter {
/**
* Convert the value to the required type (if necessary from a String).
* <p>Conversions from String to any type will typically use the <code>setAsText</code>
* <p>Conversions from String to any type will typically use the {@code setAsText}
* method of the PropertyEditor class, or a Spring Converter in a ConversionService.
* @param value the value to convert
* @param requiredType the type we must convert to
* (or <code>null</code> if not known, for example in case of a collection element)
* (or {@code null} if not known, for example in case of a collection element)
* @param methodParam the method parameter that is the target of the conversion
* (for analysis of generic types; may be <code>null</code>)
* (for analysis of generic types; may be {@code null})
* @return the new value, possibly the result of type conversion
* @throws TypeMismatchException if type conversion failed
* @see java.beans.PropertyEditor#setAsText(String)
@@ -68,13 +68,13 @@ public interface TypeConverter {
/**
* Convert the value to the required type (if necessary from a String).
* <p>Conversions from String to any type will typically use the <code>setAsText</code>
* <p>Conversions from String to any type will typically use the {@code setAsText}
* method of the PropertyEditor class, or a Spring Converter in a ConversionService.
* @param value the value to convert
* @param requiredType the type we must convert to
* (or <code>null</code> if not known, for example in case of a collection element)
* (or {@code null} if not known, for example in case of a collection element)
* @param field the reflective field that is the target of the conversion
* (for analysis of generic types; may be <code>null</code>)
* (for analysis of generic types; may be {@code null})
* @return the new value, possibly the result of type conversion
* @throws TypeMismatchException if type conversion failed
* @see java.beans.PropertyEditor#setAsText(String)

View File

@@ -81,9 +81,9 @@ class TypeConverterDelegate {
* Convert the value to the specified required type.
* @param newValue the proposed new value
* @param requiredType the type we must convert to
* (or <code>null</code> if not known, for example in case of a collection element)
* (or {@code null} if not known, for example in case of a collection element)
* @param methodParam the method parameter that is the target of the conversion
* (may be <code>null</code>)
* (may be {@code null})
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
*/
@@ -98,9 +98,9 @@ class TypeConverterDelegate {
* Convert the value to the specified required type.
* @param newValue the proposed new value
* @param requiredType the type we must convert to
* (or <code>null</code> if not known, for example in case of a collection element)
* (or {@code null} if not known, for example in case of a collection element)
* @param field the reflective field that is the target of the conversion
* (may be <code>null</code>)
* (may be {@code null})
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
*/
@@ -114,10 +114,10 @@ class TypeConverterDelegate {
/**
* Convert the value to the required type for the specified property.
* @param propertyName name of the property
* @param oldValue the previous value, if available (may be <code>null</code>)
* @param oldValue the previous value, if available (may be {@code null})
* @param newValue the proposed new value
* @param requiredType the type we must convert to
* (or <code>null</code> if not known, for example in case of a collection element)
* (or {@code null} if not known, for example in case of a collection element)
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
*/
@@ -132,10 +132,10 @@ class TypeConverterDelegate {
* Convert the value to the required type (if necessary from a String),
* for the specified property.
* @param propertyName name of the property
* @param oldValue the previous value, if available (may be <code>null</code>)
* @param oldValue the previous value, if available (may be {@code null})
* @param newValue the proposed new value
* @param requiredType the type we must convert to
* (or <code>null</code> if not known, for example in case of a collection element)
* (or {@code null} if not known, for example in case of a collection element)
* @param typeDescriptor the descriptor for the target property or field
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
@@ -326,7 +326,7 @@ class TypeConverterDelegate {
/**
* Find a default editor for the given type.
* @param requiredType the type to find an editor for
* @return the corresponding editor, or <code>null</code> if none
* @return the corresponding editor, or {@code null} if none
*/
private PropertyEditor findDefaultEditor(Class requiredType) {
PropertyEditor editor = null;
@@ -344,10 +344,10 @@ class TypeConverterDelegate {
/**
* Convert the value to the required type (if necessary from a String),
* using the given property editor.
* @param oldValue the previous value, if available (may be <code>null</code>)
* @param oldValue the previous value, if available (may be {@code null})
* @param newValue the proposed new value
* @param requiredType the type we must convert to
* (or <code>null</code> if not known, for example in case of a collection element)
* (or {@code null} if not known, for example in case of a collection element)
* @param editor the PropertyEditor to use
* @return the new value, possibly the result of type conversion
* @throws IllegalArgumentException if type conversion failed
@@ -434,7 +434,7 @@ class TypeConverterDelegate {
/**
* Convert the given text value using the given property editor.
* @param oldValue the previous value, if available (may be <code>null</code>)
* @param oldValue the previous value, if available (may be {@code null})
* @param newTextValue the proposed text value
* @param editor the PropertyEditor to use
* @return the converted value

View File

@@ -51,8 +51,8 @@ public class TypeMismatchException extends PropertyAccessException {
/**
* Create a new TypeMismatchException.
* @param propertyChangeEvent the PropertyChangeEvent that resulted in the problem
* @param requiredType the required target type (or <code>null</code> if not known)
* @param cause the root cause (may be <code>null</code>)
* @param requiredType the required target type (or {@code null} if not known)
* @param cause the root cause (may be {@code null})
*/
public TypeMismatchException(PropertyChangeEvent propertyChangeEvent, Class requiredType, Throwable cause) {
super(propertyChangeEvent,
@@ -69,8 +69,8 @@ public class TypeMismatchException extends PropertyAccessException {
/**
* Create a new TypeMismatchException without PropertyChangeEvent.
* @param value the offending value that couldn't be converted (may be <code>null</code>)
* @param requiredType the required target type (or <code>null</code> if not known)
* @param value the offending value that couldn't be converted (may be {@code null})
* @param requiredType the required target type (or {@code null} if not known)
*/
public TypeMismatchException(Object value, Class requiredType) {
this(value, requiredType, null);
@@ -78,9 +78,9 @@ public class TypeMismatchException extends PropertyAccessException {
/**
* Create a new TypeMismatchException without PropertyChangeEvent.
* @param value the offending value that couldn't be converted (may be <code>null</code>)
* @param requiredType the required target type (or <code>null</code> if not known)
* @param cause the root cause (may be <code>null</code>)
* @param value the offending value that couldn't be converted (may be {@code null})
* @param requiredType the required target type (or {@code null} if not known)
* @param cause the root cause (may be {@code null})
*/
public TypeMismatchException(Object value, Class requiredType, Throwable cause) {
super("Failed to convert value of type '" + ClassUtils.getDescriptiveType(value) + "'" +
@@ -92,7 +92,7 @@ public class TypeMismatchException extends PropertyAccessException {
/**
* Return the offending value (may be <code>null</code>)
* Return the offending value (may be {@code null})
*/
@Override
public Object getValue() {

View File

@@ -38,7 +38,7 @@ public abstract class AnnotationBeanUtils {
/**
* Copy the properties of the supplied {@link Annotation} to the supplied target bean.
* Any properties defined in <code>excludedProperties</code> will not be copied.
* Any properties defined in {@code excludedProperties} will not be copied.
* @param ann the annotation to copy from
* @param bean the bean instance to copy to
* @param excludedProperties the names of excluded properties, if any
@@ -50,11 +50,11 @@ public abstract class AnnotationBeanUtils {
/**
* Copy the properties of the supplied {@link Annotation} to the supplied target bean.
* Any properties defined in <code>excludedProperties</code> will not be copied.
* Any properties defined in {@code excludedProperties} will not be copied.
* <p>A specified value resolver may resolve placeholders in property values, for example.
* @param ann the annotation to copy from
* @param bean the bean instance to copy to
* @param valueResolver a resolve to post-process String property values (may be <code>null</code>)
* @param valueResolver a resolve to post-process String property values (may be {@code null})
* @param excludedProperties the names of excluded properties, if any
* @see org.springframework.beans.BeanWrapper
*/

View File

@@ -42,12 +42,12 @@ public interface BeanClassLoaderAware extends Aware {
* a bean instance.
* <p>Invoked <i>after</i> the population of normal bean properties but
* <i>before</i> an initialization callback such as
* {@link org.springframework.beans.factory.InitializingBean InitializingBean's}
* {@link org.springframework.beans.factory.InitializingBean#afterPropertiesSet()}
* {@link InitializingBean InitializingBean's}
* {@link InitializingBean#afterPropertiesSet()}
* method or a custom init-method.
* @param classLoader the owning class loader; may be <code>null</code> in
* which case a default <code>ClassLoader</code> must be used, for example
* the <code>ClassLoader</code> obtained via
* @param classLoader the owning class loader; may be {@code null} in
* which case a default {@code ClassLoader} must be used, for example
* the {@code ClassLoader} obtained via
* {@link org.springframework.util.ClassUtils#getDefaultClassLoader()}
*/
void setBeanClassLoader(ClassLoader classLoader);

View File

@@ -135,7 +135,7 @@ public class BeanCreationException extends FatalBeanException {
/**
* Return the related causes, if any.
* @return the array of related causes, or <code>null</code> if none
* @return the array of related causes, or {@code null} if none
*/
public Throwable[] getRelatedCauses() {
if (this.relatedCauses == null) {

View File

@@ -44,7 +44,7 @@ public class BeanDefinitionStoreException extends FatalBeanException {
/**
* Create a new BeanDefinitionStoreException.
* @param msg the detail message (used as exception message as-is)
* @param cause the root cause (may be <code>null</code>)
* @param cause the root cause (may be {@code null})
*/
public BeanDefinitionStoreException(String msg, Throwable cause) {
super(msg, cause);
@@ -64,7 +64,7 @@ public class BeanDefinitionStoreException extends FatalBeanException {
* Create a new BeanDefinitionStoreException.
* @param resourceDescription description of the resource that the bean definition came from
* @param msg the detail message (used as exception message as-is)
* @param cause the root cause (may be <code>null</code>)
* @param cause the root cause (may be {@code null})
*/
public BeanDefinitionStoreException(String resourceDescription, String msg, Throwable cause) {
super(msg, cause);
@@ -88,7 +88,7 @@ public class BeanDefinitionStoreException extends FatalBeanException {
* @param beanName the name of the bean requested
* @param msg the detail message (appended to an introductory message that indicates
* the resource and the name of the bean)
* @param cause the root cause (may be <code>null</code>)
* @param cause the root cause (may be {@code null})
*/
public BeanDefinitionStoreException(String resourceDescription, String beanName, String msg, Throwable cause) {
super("Invalid bean definition with name '" + beanName + "' defined in " + resourceDescription + ": " + msg, cause);

View File

@@ -48,7 +48,7 @@ import org.springframework.beans.BeansException;
* implemented using this BeanFactory interface and its subinterfaces.
*
* <p>Normally a BeanFactory will load bean definitions stored in a configuration
* source (such as an XML document), and use the <code>org.springframework.beans</code>
* source (such as an XML document), and use the {@code org.springframework.beans}
* package to configure the beans. However, an implementation could simply return
* Java objects it creates as necessary directly in Java code. There are no
* constraints on how the definitions could be stored: LDAP, RDBMS, XML,
@@ -63,26 +63,26 @@ import org.springframework.beans.BeansException;
*
* <p>Bean factory implementations should support the standard bean lifecycle interfaces
* as far as possible. The full set of initialization methods and their standard order is:<br>
* 1. BeanNameAware's <code>setBeanName</code><br>
* 2. BeanClassLoaderAware's <code>setBeanClassLoader</code><br>
* 3. BeanFactoryAware's <code>setBeanFactory</code><br>
* 4. ResourceLoaderAware's <code>setResourceLoader</code>
* 1. BeanNameAware's {@code setBeanName}<br>
* 2. BeanClassLoaderAware's {@code setBeanClassLoader}<br>
* 3. BeanFactoryAware's {@code setBeanFactory}<br>
* 4. ResourceLoaderAware's {@code setResourceLoader}
* (only applicable when running in an application context)<br>
* 5. ApplicationEventPublisherAware's <code>setApplicationEventPublisher</code>
* 5. ApplicationEventPublisherAware's {@code setApplicationEventPublisher}
* (only applicable when running in an application context)<br>
* 6. MessageSourceAware's <code>setMessageSource</code>
* 6. MessageSourceAware's {@code setMessageSource}
* (only applicable when running in an application context)<br>
* 7. ApplicationContextAware's <code>setApplicationContext</code>
* 7. ApplicationContextAware's {@code setApplicationContext}
* (only applicable when running in an application context)<br>
* 8. ServletContextAware's <code>setServletContext</code>
* 8. ServletContextAware's {@code setServletContext}
* (only applicable when running in a web application context)<br>
* 9. <code>postProcessBeforeInitialization</code> methods of BeanPostProcessors<br>
* 10. InitializingBean's <code>afterPropertiesSet</code><br>
* 9. {@code postProcessBeforeInitialization} methods of BeanPostProcessors<br>
* 10. InitializingBean's {@code afterPropertiesSet}<br>
* 11. a custom init-method definition<br>
* 12. <code>postProcessAfterInitialization</code> methods of BeanPostProcessors
* 12. {@code postProcessAfterInitialization} methods of BeanPostProcessors
*
* <p>On shutdown of a bean factory, the following lifecycle methods apply:<br>
* 1. DisposableBean's <code>destroy</code><br>
* 1. DisposableBean's {@code destroy}<br>
* 2. a custom destroy-method definition
*
* @author Rod Johnson
@@ -109,7 +109,7 @@ public interface BeanFactory {
/**
* Used to dereference a {@link FactoryBean} instance and distinguish it from
* beans <i>created</i> by the FactoryBean. For example, if the bean named
* <code>myJndiObject</code> is a FactoryBean, getting <code>&myJndiObject</code>
* {@code myJndiObject} is a FactoryBean, getting {@code &myJndiObject}
* will return the factory, not the instance returned by the factory.
*/
String FACTORY_BEAN_PREFIX = "&";
@@ -139,8 +139,8 @@ public interface BeanFactory {
* Will ask the parent factory if the bean cannot be found in this factory instance.
* @param name the name of the bean to retrieve
* @param requiredType type the bean must match. Can be an interface or superclass
* of the actual class, or <code>null</code> for any match. For example, if the value
* is <code>Object.class</code>, this method will succeed whatever the class of the
* of the actual class, or {@code null} for any match. For example, if the value
* is {@code Object.class}, this method will succeed whatever the class of the
* returned instance.
* @return an instance of the bean
* @throws NoSuchBeanDefinitionException if there's no such bean definition
@@ -200,7 +200,7 @@ public interface BeanFactory {
/**
* Is this bean a shared singleton? That is, will {@link #getBean} always
* return the same instance?
* <p>Note: This method returning <code>false</code> does not clearly indicate
* <p>Note: This method returning {@code false} does not clearly indicate
* independent instances. It indicates non-singleton instances, which may correspond
* to a scoped bean as well. Use the {@link #isPrototype} operation to explicitly
* check for independent instances.
@@ -217,7 +217,7 @@ public interface BeanFactory {
/**
* Is this bean a prototype? That is, will {@link #getBean} always return
* independent instances?
* <p>Note: This method returning <code>false</code> does not clearly indicate
* <p>Note: This method returning {@code false} does not clearly indicate
* a singleton object. It indicates non-independent instances, which may correspond
* to a scoped bean as well. Use the {@link #isSingleton} operation to explicitly
* check for a shared singleton instance.
@@ -240,8 +240,8 @@ public interface BeanFactory {
* Will ask the parent factory if the bean cannot be found in this factory instance.
* @param name the name of the bean to query
* @param targetType the type to match against
* @return <code>true</code> if the bean type matches,
* <code>false</code> if it doesn't match or cannot be determined yet
* @return {@code true} if the bean type matches,
* {@code false} if it doesn't match or cannot be determined yet
* @throws NoSuchBeanDefinitionException if there is no bean with the given name
* @since 2.0.1
* @see #getBean
@@ -257,7 +257,7 @@ public interface BeanFactory {
* <p>Translates aliases back to the corresponding canonical bean name.
* Will ask the parent factory if the bean cannot be found in this factory instance.
* @param name the name of the bean to query
* @return the type of the bean, or <code>null</code> if not determinable
* @return the type of the bean, or {@code null} if not determinable
* @throws NoSuchBeanDefinitionException if there is no bean with the given name
* @since 1.1.2
* @see #getBean

View File

@@ -45,7 +45,7 @@ public interface BeanFactoryAware extends Aware {
* <p>Invoked after the population of normal bean properties
* but before an initialization callback such as
* {@link InitializingBean#afterPropertiesSet()} or a custom init-method.
* @param beanFactory owning BeanFactory (never <code>null</code>).
* @param beanFactory owning BeanFactory (never {@code null}).
* The bean can immediately call methods on the factory.
* @throws BeansException in case of initialization errors
* @see BeanInitializationException

View File

@@ -133,7 +133,7 @@ public abstract class BeanFactoryUtils {
* <p>Does consider objects created by FactoryBeans, which means that FactoryBeans
* will get initialized. If the object created by the FactoryBean doesn't match,
* the raw FactoryBean itself will be matched against the type.
* <p>This version of <code>beanNamesForTypeIncludingAncestors</code> automatically
* <p>This version of {@code beanNamesForTypeIncludingAncestors} automatically
* includes prototypes and FactoryBeans.
* @param lbf the bean factory
* @param type the type that beans must match
@@ -300,7 +300,7 @@ public abstract class BeanFactoryUtils {
* <p>Does consider objects created by FactoryBeans, which means that FactoryBeans
* will get initialized. If the object created by the FactoryBean doesn't match,
* the raw FactoryBean itself will be matched against the type.
* <p>This version of <code>beanOfTypeIncludingAncestors</code> automatically includes
* <p>This version of {@code beanOfTypeIncludingAncestors} automatically includes
* prototypes and FactoryBeans.
* <p><b>Note: Beans of the same name will take precedence at the 'lowest' factory level,
* i.e. such beans will be returned from the lowest factory that they are being found in,
@@ -310,7 +310,7 @@ public abstract class BeanFactoryUtils {
* @param lbf the bean factory
* @param type type of bean to match
* @return the matching bean instance
* @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
* @throws NoSuchBeanDefinitionException
* if 0 or more than 1 beans of the given type were found
* @throws BeansException if the bean could not be created
*/
@@ -375,12 +375,12 @@ public abstract class BeanFactoryUtils {
* <p>Does consider objects created by FactoryBeans, which means that FactoryBeans
* will get initialized. If the object created by the FactoryBean doesn't match,
* the raw FactoryBean itself will be matched against the type.
* <p>This version of <code>beanOfType</code> automatically includes
* <p>This version of {@code beanOfType} automatically includes
* prototypes and FactoryBeans.
* @param lbf the bean factory
* @param type type of bean to match
* @return the matching bean instance
* @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
* @throws NoSuchBeanDefinitionException
* if 0 or more than 1 beans of the given type were found
* @throws BeansException if the bean could not be created
*/

View File

@@ -60,12 +60,12 @@ public interface FactoryBean<T> {
* <p>If this FactoryBean is not fully initialized yet at the time of
* the call (for example because it is involved in a circular reference),
* throw a corresponding {@link FactoryBeanNotInitializedException}.
* <p>As of Spring 2.0, FactoryBeans are allowed to return <code>null</code>
* <p>As of Spring 2.0, FactoryBeans are allowed to return {@code null}
* objects. The factory will consider this as normal value to be used; it
* will not throw a FactoryBeanNotInitializedException in this case anymore.
* FactoryBean implementations are encouraged to throw
* FactoryBeanNotInitializedException themselves now, as appropriate.
* @return an instance of the bean (can be <code>null</code>)
* @return an instance of the bean (can be {@code null})
* @throws Exception in case of creation errors
* @see FactoryBeanNotInitializedException
*/
@@ -73,7 +73,7 @@ public interface FactoryBean<T> {
/**
* Return the type of object that this FactoryBean creates,
* or <code>null</code> if not known in advance.
* or {@code null} if not known in advance.
* <p>This allows one to check for specific types of beans without
* instantiating objects, for example on autowiring.
* <p>In the case of implementations that are creating a singleton object,
@@ -84,10 +84,10 @@ public interface FactoryBean<T> {
* been fully initialized. It must not rely on state created during
* initialization; of course, it can still use such state if available.
* <p><b>NOTE:</b> Autowiring will simply ignore FactoryBeans that return
* <code>null</code> here. Therefore it is highly recommended to implement
* {@code null} here. Therefore it is highly recommended to implement
* this method properly, using the current state of the FactoryBean.
* @return the type of object that this FactoryBean creates,
* or <code>null</code> if not known at the time of the call
* or {@code null} if not known at the time of the call
* @see ListableBeanFactory#getBeansOfType
*/
Class<?> getObjectType();
@@ -97,20 +97,20 @@ public interface FactoryBean<T> {
* will {@link #getObject()} always return the same object
* (a reference that can be cached)?
* <p><b>NOTE:</b> If a FactoryBean indicates to hold a singleton object,
* the object returned from <code>getObject()</code> might get cached
* by the owning BeanFactory. Hence, do not return <code>true</code>
* the object returned from {@code getObject()} might get cached
* by the owning BeanFactory. Hence, do not return {@code true}
* unless the FactoryBean always exposes the same reference.
* <p>The singleton status of the FactoryBean itself will generally
* be provided by the owning BeanFactory; usually, it has to be
* defined as singleton there.
* <p><b>NOTE:</b> This method returning <code>false</code> does not
* <p><b>NOTE:</b> This method returning {@code false} does not
* necessarily indicate that returned objects are independent instances.
* An implementation of the extended {@link SmartFactoryBean} interface
* may explicitly indicate independent instances through its
* {@link SmartFactoryBean#isPrototype()} method. Plain {@link FactoryBean}
* implementations which do not implement this extended interface are
* simply assumed to always return independent instances if the
* <code>isSingleton()</code> implementation returns <code>false</code>.
* {@code isSingleton()} implementation returns {@code false}.
* @return whether the exposed object is a singleton
* @see #getObject()
* @see SmartFactoryBean#isPrototype()

View File

@@ -19,7 +19,7 @@ package org.springframework.beans.factory;
import org.springframework.beans.FatalBeanException;
/**
* Exception to be thrown from a FactoryBean's <code>getObject()</code> method
* Exception to be thrown from a FactoryBean's {@code getObject()} method
* if the bean is not fully initialized yet, for example because it is involved
* in a circular reference.
*

View File

@@ -20,7 +20,7 @@ package org.springframework.beans.factory;
* Sub-interface implemented by bean factories that can be part
* of a hierarchy.
*
* <p>The corresponding <code>setParentBeanFactory</code> method for bean
* <p>The corresponding {@code setParentBeanFactory} method for bean
* factories that allow setting the parent in a configurable
* fashion can be found in the ConfigurableBeanFactory interface.
*
@@ -32,18 +32,18 @@ package org.springframework.beans.factory;
public interface HierarchicalBeanFactory extends BeanFactory {
/**
* Return the parent bean factory, or <code>null</code> if there is none.
* Return the parent bean factory, or {@code null} if there is none.
*/
BeanFactory getParentBeanFactory();
/**
* Return whether the local bean factory contains a bean of the given name,
* ignoring beans defined in ancestor contexts.
* <p>This is an alternative to <code>containsBean</code>, ignoring a bean
* <p>This is an alternative to {@code containsBean}, ignoring a bean
* of the given name from an ancestor bean factory.
* @param name the name of the bean to query
* @return whether a bean with the given name is defined in the local factory
* @see org.springframework.beans.factory.BeanFactory#containsBean
* @see BeanFactory#containsBean
*/
boolean containsLocalBean(String name);

View File

@@ -36,15 +36,15 @@ import org.springframework.beans.BeansException;
* <p>The methods in this interface will just respect bean definitions of this factory.
* They will ignore any singleton beans that have been registered by other means like
* {@link org.springframework.beans.factory.config.ConfigurableBeanFactory}'s
* <code>registerSingleton</code> method, with the exception of
* <code>getBeanNamesOfType</code> and <code>getBeansOfType</code> which will check
* such manually registered singletons too. Of course, BeanFactory's <code>getBean</code>
* {@code registerSingleton} method, with the exception of
* {@code getBeanNamesOfType} and {@code getBeansOfType} which will check
* such manually registered singletons too. Of course, BeanFactory's {@code getBean}
* does allow transparent access to such special beans as well. However, in typical
* scenarios, all beans will be defined by external bean definitions anyway, so most
* applications don't need to worry about this differentation.
*
* <p><b>NOTE:</b> With the exception of <code>getBeanDefinitionCount</code>
* and <code>containsBeanDefinition</code>, the methods in this interface
* <p><b>NOTE:</b> With the exception of {@code getBeanDefinitionCount}
* and {@code containsBeanDefinition}, the methods in this interface
* are not designed for frequent invocation. Implementations may be slow.
*
* @author Rod Johnson
@@ -87,7 +87,7 @@ public interface ListableBeanFactory extends BeanFactory {
/**
* Return the names of beans matching the given type (including subclasses),
* judging from either bean definitions or the value of <code>getObjectType</code>
* judging from either bean definitions or the value of {@code getObjectType}
* in the case of FactoryBeans.
* <p><b>NOTE: This method introspects top-level beans only.</b> It does <i>not</i>
* check nested beans which might match the specified type as well.
@@ -95,16 +95,16 @@ public interface ListableBeanFactory extends BeanFactory {
* will get initialized. If the object created by the FactoryBean doesn't match,
* the raw FactoryBean itself will be matched against the type.
* <p>Does not consider any hierarchy this factory may participate in.
* Use BeanFactoryUtils' <code>beanNamesForTypeIncludingAncestors</code>
* Use BeanFactoryUtils' {@code beanNamesForTypeIncludingAncestors}
* to include beans in ancestor factories too.
* <p>Note: Does <i>not</i> ignore singleton beans that have been registered
* by other means than bean definitions.
* <p>This version of <code>getBeanNamesForType</code> matches all kinds of beans,
* <p>This version of {@code getBeanNamesForType} matches all kinds of beans,
* be it singletons, prototypes, or FactoryBeans. In most implementations, the
* result will be the same as for <code>getBeanNamesOfType(type, true, true)</code>.
* result will be the same as for {@code getBeanNamesOfType(type, true, true)}.
* <p>Bean names returned by this method should always return bean names <i>in the
* order of definition</i> in the backend configuration, as far as possible.
* @param type the class or interface to match, or <code>null</code> for all bean names
* @param type the class or interface to match, or {@code null} for all bean names
* @return the names of beans (or objects created by FactoryBeans) matching
* the given object type (including subclasses), or an empty array if none
* @see FactoryBean#getObjectType
@@ -114,7 +114,7 @@ public interface ListableBeanFactory extends BeanFactory {
/**
* Return the names of beans matching the given type (including subclasses),
* judging from either bean definitions or the value of <code>getObjectType</code>
* judging from either bean definitions or the value of {@code getObjectType}
* in the case of FactoryBeans.
* <p><b>NOTE: This method introspects top-level beans only.</b> It does <i>not</i>
* check nested beans which might match the specified type as well.
@@ -124,13 +124,13 @@ public interface ListableBeanFactory extends BeanFactory {
* type. If "allowEagerInit" is not set, only raw FactoryBeans will be checked
* (which doesn't require initialization of each FactoryBean).
* <p>Does not consider any hierarchy this factory may participate in.
* Use BeanFactoryUtils' <code>beanNamesForTypeIncludingAncestors</code>
* Use BeanFactoryUtils' {@code beanNamesForTypeIncludingAncestors}
* to include beans in ancestor factories too.
* <p>Note: Does <i>not</i> ignore singleton beans that have been registered
* by other means than bean definitions.
* <p>Bean names returned by this method should always return bean names <i>in the
* order of definition</i> in the backend configuration, as far as possible.
* @param type the class or interface to match, or <code>null</code> for all bean names
* @param type the class or interface to match, or {@code null} for all bean names
* @param includeNonSingletons whether to include prototype or scoped beans too
* or just singletons (also applies to FactoryBeans)
* @param allowEagerInit whether to initialize <i>lazy-init singletons</i> and
@@ -148,24 +148,24 @@ public interface ListableBeanFactory extends BeanFactory {
/**
* Return the bean instances that match the given object type (including
* subclasses), judging from either bean definitions or the value of
* <code>getObjectType</code> in the case of FactoryBeans.
* {@code getObjectType} in the case of FactoryBeans.
* <p><b>NOTE: This method introspects top-level beans only.</b> It does <i>not</i>
* check nested beans which might match the specified type as well.
* <p>Does consider objects created by FactoryBeans, which means that FactoryBeans
* will get initialized. If the object created by the FactoryBean doesn't match,
* the raw FactoryBean itself will be matched against the type.
* <p>Does not consider any hierarchy this factory may participate in.
* Use BeanFactoryUtils' <code>beansOfTypeIncludingAncestors</code>
* Use BeanFactoryUtils' {@code beansOfTypeIncludingAncestors}
* to include beans in ancestor factories too.
* <p>Note: Does <i>not</i> ignore singleton beans that have been registered
* by other means than bean definitions.
* <p>This version of getBeansOfType matches all kinds of beans, be it
* singletons, prototypes, or FactoryBeans. In most implementations, the
* result will be the same as for <code>getBeansOfType(type, true, true)</code>.
* result will be the same as for {@code getBeansOfType(type, true, true)}.
* <p>The Map returned by this method should always return bean names and
* corresponding bean instances <i>in the order of definition</i> in the
* backend configuration, as far as possible.
* @param type the class or interface to match, or <code>null</code> for all concrete beans
* @param type the class or interface to match, or {@code null} for all concrete beans
* @return a Map with the matching beans, containing the bean names as
* keys and the corresponding bean instances as values
* @throws BeansException if a bean could not be created
@@ -178,7 +178,7 @@ public interface ListableBeanFactory extends BeanFactory {
/**
* Return the bean instances that match the given object type (including
* subclasses), judging from either bean definitions or the value of
* <code>getObjectType</code> in the case of FactoryBeans.
* {@code getObjectType} in the case of FactoryBeans.
* <p><b>NOTE: This method introspects top-level beans only.</b> It does <i>not</i>
* check nested beans which might match the specified type as well.
* <p>Does consider objects created by FactoryBeans if the "allowEagerInit" flag is set,
@@ -187,14 +187,14 @@ public interface ListableBeanFactory extends BeanFactory {
* type. If "allowEagerInit" is not set, only raw FactoryBeans will be checked
* (which doesn't require initialization of each FactoryBean).
* <p>Does not consider any hierarchy this factory may participate in.
* Use BeanFactoryUtils' <code>beansOfTypeIncludingAncestors</code>
* Use BeanFactoryUtils' {@code beansOfTypeIncludingAncestors}
* to include beans in ancestor factories too.
* <p>Note: Does <i>not</i> ignore singleton beans that have been registered
* by other means than bean definitions.
* <p>The Map returned by this method should always return bean names and
* corresponding bean instances <i>in the order of definition</i> in the
* backend configuration, as far as possible.
* @param type the class or interface to match, or <code>null</code> for all concrete beans
* @param type the class or interface to match, or {@code null} for all concrete beans
* @param includeNonSingletons whether to include prototype or scoped beans too
* or just singletons (also applies to FactoryBeans)
* @param allowEagerInit whether to initialize <i>lazy-init singletons</i> and
@@ -212,7 +212,7 @@ public interface ListableBeanFactory extends BeanFactory {
throws BeansException;
/**
* Find all beans whose <code>Class</code> has the supplied {@link java.lang.annotation.Annotation} type.
* Find all beans whose {@code Class} has the supplied {@link java.lang.annotation.Annotation} type.
* @param annotationType the type of annotation to look for
* @return a Map with the matching beans, containing the bean names as
* keys and the corresponding bean instances as values
@@ -222,12 +222,12 @@ public interface ListableBeanFactory extends BeanFactory {
throws BeansException;
/**
* Find a {@link Annotation} of <code>annotationType</code> on the specified
* Find a {@link Annotation} of {@code annotationType} on the specified
* bean, traversing its interfaces and super classes if no annotation can be
* found on the given class itself.
* @param beanName the name of the bean to look for annotations on
* @param annotationType the annotation class to look for
* @return the annotation of the given type found, or <code>null</code>
* @return the annotation of the given type found, or {@code null}
*/
<A extends Annotation> A findAnnotationOnBean(String beanName, Class<A> annotationType);

View File

@@ -29,7 +29,7 @@ import org.springframework.beans.BeansException;
* of the latter are normally meant to be defined as SPI instances in a
* {@link BeanFactory}, while implementations of this class are normally meant
* to be fed as an API to other beans (through injection). As such, the
* <code>getObject()</code> method has different exception handling behavior.
* {@code getObject()} method has different exception handling behavior.
*
* @author Colin Sampaleanu
* @since 1.0.2
@@ -40,7 +40,7 @@ public interface ObjectFactory<T> {
/**
* Return an instance (possibly shared or independent)
* of the object managed by this factory.
* @return an instance of the bean (should never be <code>null</code>)
* @return an instance of the bean (should never be {@code null})
* @throws BeansException in case of creation errors
*/
T getObject() throws BeansException;

View File

@@ -20,12 +20,12 @@ package org.springframework.beans.factory;
* Extension of the {@link FactoryBean} interface. Implementations may
* indicate whether they always return independent instances, for the
* case where their {@link #isSingleton()} implementation returning
* <code>false</code> does not clearly indicate independent instances.
* {@code false} does not clearly indicate independent instances.
*
* <p>Plain {@link FactoryBean} implementations which do not implement
* this extended interface are simply assumed to always return independent
* instances if their {@link #isSingleton()} implementation returns
* <code>false</code>; the exposed object is only accessed on demand.
* {@code false}; the exposed object is only accessed on demand.
*
* <p><b>NOTE:</b> This interface is a special purpose interface, mainly for
* internal use within the framework and within collaborating frameworks.
@@ -47,7 +47,7 @@ public interface SmartFactoryBean<T> extends FactoryBean<T> {
* be provided by the owning {@link BeanFactory}; usually, it has to be
* defined as singleton there.
* <p>This method is supposed to strictly check for independent instances;
* it should not return <code>true</code> for scoped objects or other
* it should not return {@code true} for scoped objects or other
* kinds of non-singleton, non-independent objects. For this reason,
* this is not simply the inverted form of {@link #isSingleton()}.
* @return whether the exposed object is a prototype
@@ -62,7 +62,7 @@ public interface SmartFactoryBean<T> extends FactoryBean<T> {
* of its singleton object (if any)?
* <p>A standard FactoryBean is not expected to initialize eagerly:
* Its {@link #getObject()} will only be called for actual access, even
* in case of a singleton object. Returning <code>true</code> from this
* in case of a singleton object. Returning {@code true} from this
* method suggests that {@link #getObject()} should be called eagerly,
* also applying post-processors eagerly. This may make sense in case
* of a {@link #isSingleton() singleton} object, in particular if

View File

@@ -21,7 +21,7 @@ import org.springframework.beans.BeansException;
/**
* Defines a contract for the lookup, use, and release of a
* {@link org.springframework.beans.factory.BeanFactory},
* or a <code>BeanFactory</code> subclass such as an
* or a {@code BeanFactory} subclass such as an
* {@link org.springframework.context.ApplicationContext}.
*
* <p>Where this interface is implemented as a singleton class such as
@@ -29,20 +29,20 @@ import org.springframework.beans.BeansException;
* suggests that it be used sparingly and with caution. By far the vast majority
* of the code inside an application is best written in a Dependency Injection
* style, where that code is served out of a
* <code>BeanFactory</code>/<code>ApplicationContext</code> container, and has
* {@code BeanFactory}/{@code ApplicationContext} container, and has
* its own dependencies supplied by the container when it is created. However,
* even such a singleton implementation sometimes has its use in the small glue
* layers of code that is sometimes needed to tie other code together. For
* example, third party code may try to construct new objects directly, without
* the ability to force it to get these objects out of a <code>BeanFactory</code>.
* the ability to force it to get these objects out of a {@code BeanFactory}.
* If the object constructed by the third party code is just a small stub or
* proxy, which then uses an implementation of this class to get a
* <code>BeanFactory</code> from which it gets the real object, to which it
* {@code BeanFactory} from which it gets the real object, to which it
* delegates, then proper Dependency Injection has been achieved.
*
* <p>As another example, in a complex J2EE app with multiple layers, with each
* layer having its own <code>ApplicationContext</code> definition (in a
* hierarchy), a class like <code>SingletonBeanFactoryLocator</code> may be used
* layer having its own {@code ApplicationContext} definition (in a
* hierarchy), a class like {@code SingletonBeanFactoryLocator} may be used
* to demand load these contexts.
*
* @author Colin Sampaleanu
@@ -55,13 +55,13 @@ public interface BeanFactoryLocator {
/**
* Use the {@link org.springframework.beans.factory.BeanFactory} (or derived
* interface such as {@link org.springframework.context.ApplicationContext})
* specified by the <code>factoryKey</code> parameter.
* specified by the {@code factoryKey} parameter.
* <p>The definition is possibly loaded/created as needed.
* @param factoryKey a resource name specifying which <code>BeanFactory</code> the
* <code>BeanFactoryLocator</code> must return for usage. The actual meaning of the
* resource name is specific to the implementation of <code>BeanFactoryLocator</code>.
* @return the <code>BeanFactory</code> instance, wrapped as a {@link BeanFactoryReference} object
* @throws BeansException if there is an error loading or accessing the <code>BeanFactory</code>
* @param factoryKey a resource name specifying which {@code BeanFactory} the
* {@code BeanFactoryLocator} must return for usage. The actual meaning of the
* resource name is specific to the implementation of {@code BeanFactoryLocator}.
* @return the {@code BeanFactory} instance, wrapped as a {@link BeanFactoryReference} object
* @throws BeansException if there is an error loading or accessing the {@code BeanFactory}
*/
BeanFactoryReference useBeanFactory(String factoryKey) throws BeansException;

View File

@@ -34,7 +34,7 @@ public interface BeanFactoryReference {
/**
* Return the {@link BeanFactory} instance held by this reference.
* @throws IllegalStateException if invoked after <code>release()</code> has been called
* @throws IllegalStateException if invoked after {@code release()} has been called
*/
BeanFactory getFactory();
@@ -42,14 +42,14 @@ public interface BeanFactoryReference {
* Indicate that the {@link BeanFactory} instance referred to by this object is not
* needed any longer by the client code which obtained the {@link BeanFactoryReference}.
* <p>Depending on the actual implementation of {@link BeanFactoryLocator}, and
* the actual type of <code>BeanFactory</code>, this may possibly not actually
* do anything; alternately in the case of a 'closeable' <code>BeanFactory</code>
* the actual type of {@code BeanFactory}, this may possibly not actually
* do anything; alternately in the case of a 'closeable' {@code BeanFactory}
* or derived class (such as {@link org.springframework.context.ApplicationContext})
* may 'close' it, or may 'close' it once no more references remain.
* <p>In an EJB usage scenario this would normally be called from
* <code>ejbRemove()</code> and <code>ejbPassivate()</code>.
* {@code ejbRemove()} and {@code ejbPassivate()}.
* <p>This is safe to call multiple times.
* @throws FatalBeanException if the <code>BeanFactory</code> cannot be released
* @throws FatalBeanException if the {@code BeanFactory} cannot be released
* @see BeanFactoryLocator
* @see org.springframework.context.access.ContextBeanFactoryReference
* @see org.springframework.context.ConfigurableApplicationContext#close()

View File

@@ -66,12 +66,12 @@ import org.springframework.core.io.support.ResourcePatternUtils;
* <p>Consider an example application scenario:
*
* <ul>
* <li><code>com.mycompany.myapp.util.applicationContext.xml</code> -
* <li>{@code com.mycompany.myapp.util.applicationContext.xml} -
* ApplicationContext definition file which defines beans for 'util' layer.
* <li><code>com.mycompany.myapp.dataaccess-applicationContext.xml</code> -
* <li>{@code com.mycompany.myapp.dataaccess-applicationContext.xml} -
* ApplicationContext definition file which defines beans for 'data access' layer.
* Depends on the above.
* <li><code>com.mycompany.myapp.services.applicationContext.xml</code> -
* <li>{@code com.mycompany.myapp.services.applicationContext.xml} -
* ApplicationContext definition file which defines beans for 'services' layer.
* Depends on the above.
* </ul>
@@ -107,7 +107,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
*
* <p>Given the above-mentioned three ApplicationContexts, consider the simplest
* SingletonBeanFactoryLocator usage scenario, where there is only one single
* <code>beanRefFactory.xml</code> definition file:
* {@code beanRefFactory.xml} definition file:
*
* <pre class="code">&lt;?xml version="1.0" encoding="UTF-8"?>
* &lt;!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
@@ -137,7 +137,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
* MyClass zed = bf.getFactory().getBean("mybean");
* </pre>
*
* Another relatively simple variation of the <code>beanRefFactory.xml</code> definition file could be:
* Another relatively simple variation of the {@code beanRefFactory.xml} definition file could be:
*
* <pre class="code">&lt;?xml version="1.0" encoding="UTF-8"?>
* &lt;!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
@@ -193,10 +193,10 @@ import org.springframework.core.io.support.ResourcePatternUtils;
* actual definition file(s) for the SingletonBeanFactoryLocator maps that id to
* a real context id.
*
* <p>A final example is more complex, with a <code>beanRefFactory.xml</code> for every module.
* <p>A final example is more complex, with a {@code beanRefFactory.xml} for every module.
* All the files are automatically combined to create the final definition.
*
* <p><code>beanRefFactory.xml</code> file inside jar for util module:
* <p>{@code beanRefFactory.xml} file inside jar for util module:
*
* <pre class="code">&lt;?xml version="1.0" encoding="UTF-8"?>
* &lt;!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
@@ -211,7 +211,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
* &lt;/beans>
* </pre>
*
* <code>beanRefFactory.xml</code> file inside jar for data-access module:<br>
* {@code beanRefFactory.xml} file inside jar for data-access module:<br>
*
* <pre class="code">&lt;?xml version="1.0" encoding="UTF-8"?>
* &lt;!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
@@ -230,7 +230,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
* &lt;/beans>
* </pre>
*
* <code>beanRefFactory.xml</code> file inside jar for services module:
* {@code beanRefFactory.xml} file inside jar for services module:
*
* <pre class="code">&lt;?xml version="1.0" encoding="UTF-8"?>
* &lt;!DOCTYPE beans PUBLIC "-//SPRING//DTD BEAN 2.0//EN" "http://www.springframework.org/dtd/spring-beans-2.0.dtd">
@@ -249,7 +249,7 @@ import org.springframework.core.io.support.ResourcePatternUtils;
* &lt;/beans>
* </pre>
*
* <code>beanRefFactory.xml</code> file inside jar for mypackage module. This doesn't
* {@code beanRefFactory.xml} file inside jar for mypackage module. This doesn't
* create any of its own contexts, but allows the other ones to be referred to be
* a name known to this module:
*
@@ -280,7 +280,7 @@ public class SingletonBeanFactoryLocator implements BeanFactoryLocator {
/**
* Returns an instance which uses the default "classpath*:beanRefFactory.xml",
* as the name of the definition file(s). All resources returned by calling the
* current thread context ClassLoader's <code>getResources</code> method with
* current thread context ClassLoader's {@code getResources} method with
* this name will be combined to create a BeanFactory definition set.
* @return the corresponding BeanFactoryLocator instance
* @throws BeansException in case of factory loading failure
@@ -293,7 +293,7 @@ public class SingletonBeanFactoryLocator implements BeanFactoryLocator {
* Returns an instance which uses the the specified selector, as the name of the
* definition file(s). In the case of a name with a Spring 'classpath*:' prefix,
* or with no prefix, which is treated the same, the current thread context
* ClassLoader's <code>getResources</code> method will be called with this value
* ClassLoader's {@code getResources} method will be called with this value
* to get all resources having that name. These resources will then be combined to
* form a definition. In the case where the name uses a Spring 'classpath:' prefix,
* or a standard URL prefix, then only one resource file will be loaded as the

View File

@@ -30,7 +30,7 @@ import org.apache.commons.logging.LogFactory;
import org.springframework.beans.factory.BeanFactory;
/**
* Unified EL <code>ELResolver</code> that delegates to a Spring BeanFactory,
* Unified EL {@code ELResolver} that delegates to a Spring BeanFactory,
* resolving name references to Spring-defined beans.
*
* @author Juergen Hoeller
@@ -110,7 +110,7 @@ public abstract class SpringBeanELResolver extends ELResolver {
/**
* Retrieve the Spring BeanFactory to delegate bean name resolution to.
* @param elContext the current ELContext
* @return the Spring BeanFactory (never <code>null</code>)
* @return the Spring BeanFactory (never {@code null})
*/
protected abstract BeanFactory getBeanFactory(ELContext elContext);

View File

@@ -34,7 +34,7 @@ public interface AnnotatedBeanDefinition extends BeanDefinition {
/**
* Obtain the annotation metadata (as well as basic class metadata)
* for this bean definition's bean class.
* @return the annotation metadata object (never <code>null</code>)
* @return the annotation metadata object (never {@code null})
*/
AnnotationMetadata getMetadata();

View File

@@ -71,7 +71,7 @@ public @interface Autowired {
/**
* Declares whether the annotated dependency is required.
* <p>Defaults to <code>true</code>.
* <p>Defaults to {@code true}.
*/
boolean required() default true;

View File

@@ -67,10 +67,10 @@ import org.springframework.util.ReflectionUtils;
* Spring's {@link Autowired @Autowired} and {@link Value @Value} annotations.
*
* <p>Also supports JSR-330's {@link javax.inject.Inject @Inject} annotation,
* if available, as a direct alternative to Spring's own <code>@Autowired</code>.
* if available, as a direct alternative to Spring's own {@code @Autowired}.
*
* <p>Only one constructor (at max) of any given bean class may carry this
* annotation with the 'required' parameter set to <code>true</code>,
* annotation with the 'required' parameter set to {@code true},
* indicating <i>the</i> constructor to autowire when used as a Spring bean.
* If multiple <i>non-required</i> constructors carry the annotation, they
* will be considered as candidates for autowiring. The constructor with
@@ -187,8 +187,8 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
/**
* Set the boolean value that marks a dependency as required
* <p>For example if using 'required=true' (the default),
* this value should be <code>true</code>; but if using
* 'optional=false', this value should be <code>false</code>.
* this value should be {@code true}; but if using
* 'optional=false', this value should be {@code false}.
* @see #setRequiredParameterName(String)
*/
public void setRequiredParameterValue(boolean requiredParameterValue) {
@@ -292,7 +292,7 @@ public class AutowiredAnnotationBeanPostProcessor extends InstantiationAwareBean
/**
* 'Native' processing method for direct calls with an arbitrary target instance,
* resolving all of its fields and methods which are annotated with <code>@Autowired</code>.
* resolving all of its fields and methods which are annotated with {@code @Autowired}.
* @param bean the target instance to process
* @throws BeansException if autowiring failed
*/

View File

@@ -26,7 +26,7 @@ import java.lang.annotation.Target;
/**
* Marks a class as being eligible for Spring-driven configuration.
*
* <p>Typically used with the AspectJ <code>AnnotationBeanConfigurerAspect</code>.
* <p>Typically used with the AspectJ {@code AnnotationBeanConfigurerAspect}.
*
* @author Rod Johnson
* @author Rob Harrop

View File

@@ -57,7 +57,7 @@ import org.springframework.util.Assert;
* still be desirable), because all that this class does is enforce that a
* 'required' property has actually been configured with a value. It does
* <b>not</b> check anything else... In particular, it does not check that a
* configured value is not <code>null</code>.
* configured value is not {@code null}.
*
* <p>Note: A default RequiredAnnotationBeanPostProcessor will be registered
* by the "context:annotation-config" and "context:component-scan" XML tags.
@@ -163,7 +163,7 @@ public class RequiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP
* {@link #SKIP_REQUIRED_CHECK_ATTRIBUTE} attribute in the bean definition, if any.
* @param beanFactory the BeanFactory to check against
* @param beanName the name of the bean to check against
* @return <code>true</code> to skip the bean; <code>false</code> to process it
* @return {@code true} to skip the bean; {@code false} to process it
*/
protected boolean shouldSkip(ConfigurableListableBeanFactory beanFactory, String beanName) {
if (beanFactory == null || !beanFactory.containsBeanDefinition(beanName)) {
@@ -178,9 +178,9 @@ public class RequiredAnnotationBeanPostProcessor extends InstantiationAwareBeanP
* <p>This implementation looks for the existence of a
* {@link #setRequiredAnnotationType "required" annotation}
* on the supplied {@link PropertyDescriptor property}.
* @param propertyDescriptor the target PropertyDescriptor (never <code>null</code>)
* @return <code>true</code> if the supplied property has been marked as being required;
* <code>false</code> if not, or if the supplied property does not have a setter method
* @param propertyDescriptor the target PropertyDescriptor (never {@code null})
* @return {@code true} if the supplied property has been marked as being required;
* {@code false} if not, or if the supplied property does not have a setter method
*/
protected boolean isRequiredProperty(PropertyDescriptor propertyDescriptor) {
Method setter = propertyDescriptor.getWriteMethod();

View File

@@ -41,7 +41,7 @@ import org.springframework.util.ReflectionUtils;
* Simple template superclass for {@link FactoryBean} implementations that
* creates a singleton or a prototype object, depending on a flag.
*
* <p>If the "singleton" flag is <code>true</code> (the default),
* <p>If the "singleton" flag is {@code true} (the default),
* this class will create the object that it creates exactly once
* on initialization and subsequently return said singleton instance
* on all calls to the {@link #getObject()} method.
@@ -78,7 +78,7 @@ public abstract class AbstractFactoryBean<T>
/**
* Set if a singleton should be created, or a new object on each request
* otherwise. Default is <code>true</code> (a singleton).
* otherwise. Default is {@code true} (a singleton).
*/
public void setSingleton(boolean singleton) {
this.singleton = singleton;
@@ -211,11 +211,11 @@ public abstract class AbstractFactoryBean<T>
* FactoryBean is supposed to implement, for use with an 'early singleton
* proxy' that will be exposed in case of a circular reference.
* <p>The default implementation returns this FactoryBean's object type,
* provided that it is an interface, or <code>null</code> else. The latter
* provided that it is an interface, or {@code null} else. The latter
* indicates that early singleton access is not supported by this FactoryBean.
* This will lead to a FactoryBeanNotInitializedException getting thrown.
* @return the interfaces to use for 'early singletons',
* or <code>null</code> to indicate a FactoryBeanNotInitializedException
* or {@code null} to indicate a FactoryBeanNotInitializedException
* @see org.springframework.beans.factory.FactoryBeanNotInitializedException
*/
protected Class[] getEarlySingletonInterfaces() {

View File

@@ -137,8 +137,8 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
/**
* Configure the given raw bean: autowiring bean properties, applying
* bean property values, applying factory callbacks such as <code>setBeanName</code>
* and <code>setBeanFactory</code>, and also applying all bean post processors
* bean property values, applying factory callbacks such as {@code setBeanName}
* and {@code setBeanFactory}, and also applying all bean post processors
* (including ones which might wrap the given raw bean).
* <p>This is effectively a superset of what {@link #initializeBean} provides,
* fully applying the configuration specified by the corresponding bean definition.
@@ -158,7 +158,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
* Resolve the specified dependency against the beans defined in this factory.
* @param descriptor the descriptor for the dependency
* @param beanName the name of the bean which declares the present dependency
* @return the resolved object, or <code>null</code> if none found
* @return the resolved object, or {@code null} if none found
* @throws BeansException in dependency resolution failed
*/
Object resolveDependency(DependencyDescriptor descriptor, String beanName) throws BeansException;
@@ -190,7 +190,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
/**
* Instantiate a new bean instance of the given class with the specified autowire
* strategy. All constants defined in this interface are supported here.
* Can also be invoked with <code>AUTOWIRE_NO</code> in order to just apply
* Can also be invoked with {@code AUTOWIRE_NO} in order to just apply
* before-instantiation callbacks (e.g. for annotation-driven injection).
* <p>Does <i>not</i> apply standard {@link BeanPostProcessor BeanPostProcessors}
* callbacks or perform any further initialization of the bean. This interface
@@ -217,7 +217,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
/**
* Autowire the bean properties of the given bean instance by name or type.
* Can also be invoked with <code>AUTOWIRE_NO</code> in order to just apply
* Can also be invoked with {@code AUTOWIRE_NO} in order to just apply
* after-instantiation callbacks (e.g. for annotation-driven injection).
* <p>Does <i>not</i> apply standard {@link BeanPostProcessor BeanPostProcessors}
* callbacks or perform any further initialization of the bean. This interface
@@ -262,7 +262,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
/**
* Initialize the given raw bean, applying factory callbacks
* such as <code>setBeanName</code> and <code>setBeanFactory</code>,
* such as {@code setBeanName} and {@code setBeanFactory},
* also applying all bean post processors (including ones which
* might wrap the given raw bean).
* <p>Note that no bean definition of the given name has to exist
@@ -278,7 +278,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
/**
* Apply {@link BeanPostProcessor BeanPostProcessors} to the given existing bean
* instance, invoking their <code>postProcessBeforeInitialization</code> methods.
* instance, invoking their {@code postProcessBeforeInitialization} methods.
* The returned bean instance may be a wrapper around the original.
* @param existingBean the new bean instance
* @param beanName the name of the bean
@@ -291,7 +291,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
/**
* Apply {@link BeanPostProcessor BeanPostProcessors} to the given existing bean
* instance, invoking their <code>postProcessAfterInitialization</code> methods.
* instance, invoking their {@code postProcessAfterInitialization} methods.
* The returned bean instance may be a wrapper around the original.
* @param existingBean the new bean instance
* @param beanName the name of the bean
@@ -310,7 +310,7 @@ public interface AutowireCapableBeanFactory extends BeanFactory {
* resolving the present dependency) are supposed to be added to
* @param typeConverter the TypeConverter to use for populating arrays and
* collections
* @return the resolved object, or <code>null</code> if none found
* @return the resolved object, or {@code null} if none found
* @throws BeansException in dependency resolution failed
*/
Object resolveDependency(DependencyDescriptor descriptor, String beanName,

View File

@@ -54,16 +54,16 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
/**
* Role hint indicating that a <code>BeanDefinition</code> is a major part
* Role hint indicating that a {@code BeanDefinition} is a major part
* of the application. Typically corresponds to a user-defined bean.
*/
int ROLE_APPLICATION = 0;
/**
* Role hint indicating that a <code>BeanDefinition</code> is a supporting
* Role hint indicating that a {@code BeanDefinition} is a supporting
* part of some larger configuration, typically an outer
* {@link org.springframework.beans.factory.parsing.ComponentDefinition}.
* <code>SUPPORT</code> beans are considered important enough to be aware
* {@code SUPPORT} beans are considered important enough to be aware
* of when looking more closely at a particular
* {@link org.springframework.beans.factory.parsing.ComponentDefinition},
* but not when looking at the overall configuration of an application.
@@ -71,7 +71,7 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
int ROLE_SUPPORT = 1;
/**
* Role hint indicating that a <code>BeanDefinition</code> is providing an
* Role hint indicating that a {@code BeanDefinition} is providing an
* entirely background role and has no relevance to the end-user. This hint is
* used when registering beans that are completely part of the internal workings
* of a {@link org.springframework.beans.factory.parsing.ComponentDefinition}.
@@ -126,14 +126,14 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
* The method will be invoked on the specified factory bean, if any,
* or otherwise as a static method on the local bean class.
* @param factoryMethodName static factory method name,
* or <code>null</code> if normal constructor creation should be used
* or {@code null} if normal constructor creation should be used
* @see #getBeanClassName()
*/
void setFactoryMethodName(String factoryMethodName);
/**
* Return the name of the current target scope for this bean,
* or <code>null</code> if not known yet.
* or {@code null} if not known yet.
*/
String getScope();
@@ -152,7 +152,7 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
/**
* Set whether this bean should be lazily initialized.
* <p>If <code>false</code>, the bean will get instantiated on startup by bean
* <p>If {@code false}, the bean will get instantiated on startup by bean
* factories that perform eager initialization of singletons.
*/
void setLazyInit(boolean lazyInit);
@@ -196,14 +196,14 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
/**
* Return the constructor argument values for this bean.
* <p>The returned instance can be modified during bean factory post-processing.
* @return the ConstructorArgumentValues object (never <code>null</code>)
* @return the ConstructorArgumentValues object (never {@code null})
*/
ConstructorArgumentValues getConstructorArgumentValues();
/**
* Return the property values to be applied to a new instance of the bean.
* <p>The returned instance can be modified during bean factory post-processing.
* @return the MutablePropertyValues object (never <code>null</code>)
* @return the MutablePropertyValues object (never {@code null})
*/
MutablePropertyValues getPropertyValues();
@@ -228,9 +228,9 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
boolean isAbstract();
/**
* Get the role hint for this <code>BeanDefinition</code>. The role hint
* Get the role hint for this {@code BeanDefinition}. The role hint
* provides tools with an indication of the importance of a particular
* <code>BeanDefinition</code>.
* {@code BeanDefinition}.
* @see #ROLE_APPLICATION
* @see #ROLE_INFRASTRUCTURE
* @see #ROLE_SUPPORT
@@ -249,7 +249,7 @@ public interface BeanDefinition extends AttributeAccessor, BeanMetadataElement {
String getResourceDescription();
/**
* Return the originating BeanDefinition, or <code>null</code> if none.
* Return the originating BeanDefinition, or {@code null} if none.
* Allows for retrieving the decorated bean definition, if any.
* <p>Note that this method returns the immediate originator. Iterate through the
* originator chain to find the original BeanDefinition as defined by the user.

View File

@@ -57,7 +57,7 @@ public class BeanDefinitionHolder implements BeanMetadataElement {
* Create a new BeanDefinitionHolder.
* @param beanDefinition the BeanDefinition to wrap
* @param beanName the name of the bean, as specified for the bean definition
* @param aliases alias names for the bean, or <code>null</code> if none
* @param aliases alias names for the bean, or {@code null} if none
*/
public BeanDefinitionHolder(BeanDefinition beanDefinition, String beanName, String[] aliases) {
Assert.notNull(beanDefinition, "BeanDefinition must not be null");
@@ -71,7 +71,7 @@ public class BeanDefinitionHolder implements BeanMetadataElement {
* Copy constructor: Create a new BeanDefinitionHolder with the
* same contents as the given BeanDefinitionHolder instance.
* <p>Note: The wrapped BeanDefinition reference is taken as-is;
* it is <code>not</code> deeply copied.
* it is {@code not} deeply copied.
* @param beanDefinitionHolder the BeanDefinitionHolder to copy
*/
public BeanDefinitionHolder(BeanDefinitionHolder beanDefinitionHolder) {
@@ -98,7 +98,7 @@ public class BeanDefinitionHolder implements BeanMetadataElement {
/**
* Return the alias names for the bean, as specified directly for the bean definition.
* @return the array of alias names, or <code>null</code> if none
* @return the array of alias names, or {@code null} if none
*/
public String[] getAliases() {
return this.aliases;

View File

@@ -43,13 +43,13 @@ public interface BeanPostProcessor {
/**
* Apply this BeanPostProcessor to the given new bean instance <i>before</i> any bean
* initialization callbacks (like InitializingBean's <code>afterPropertiesSet</code>
* initialization callbacks (like InitializingBean's {@code afterPropertiesSet}
* or a custom init-method). The bean will already be populated with property values.
* The returned bean instance may be a wrapper around the original.
* @param bean the new bean instance
* @param beanName the name of the bean
* @return the bean instance to use, either the original or a wrapped one; if
* <code>null</code>, no subsequent BeanPostProcessors will be invoked
* {@code null}, no subsequent BeanPostProcessors will be invoked
* @throws org.springframework.beans.BeansException in case of errors
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
*/
@@ -57,20 +57,20 @@ public interface BeanPostProcessor {
/**
* Apply this BeanPostProcessor to the given new bean instance <i>after</i> any bean
* initialization callbacks (like InitializingBean's <code>afterPropertiesSet</code>
* initialization callbacks (like InitializingBean's {@code afterPropertiesSet}
* or a custom init-method). The bean will already be populated with property values.
* The returned bean instance may be a wrapper around the original.
* <p>In case of a FactoryBean, this callback will be invoked for both the FactoryBean
* instance and the objects created by the FactoryBean (as of Spring 2.0). The
* post-processor can decide whether to apply to either the FactoryBean or created
* objects or both through corresponding <code>bean instanceof FactoryBean</code> checks.
* objects or both through corresponding {@code bean instanceof FactoryBean} checks.
* <p>This callback will also be invoked after a short-circuiting triggered by a
* {@link InstantiationAwareBeanPostProcessor#postProcessBeforeInstantiation} method,
* in contrast to all other BeanPostProcessor callbacks.
* @param bean the new bean instance
* @param beanName the name of the bean
* @return the bean instance to use, either the original or a wrapped one; if
* <code>null</code>, no subsequent BeanPostProcessors will be invoked
* {@code null}, no subsequent BeanPostProcessors will be invoked
* @throws org.springframework.beans.BeansException in case of errors
* @see org.springframework.beans.factory.InitializingBean#afterPropertiesSet
* @see org.springframework.beans.factory.FactoryBean

View File

@@ -33,7 +33,7 @@ import org.springframework.beans.BeanMetadataElement;
public interface BeanReference extends BeanMetadataElement {
/**
* Return the target bean name that this reference points to (never <code>null</code>).
* Return the target bean name that this reference points to (never {@code null}).
*/
String getBeanName();

View File

@@ -30,7 +30,7 @@ import org.springframework.beans.factory.SmartFactoryBean;
* using this FactoryBean to link it in and expose it under a different name.
* Effectively, this corresponds to an alias for the target bean.
*
* <p><b>NOTE:</b> For XML bean definition files, an <code>&lt;alias&gt;</code>
* <p><b>NOTE:</b> For XML bean definition files, an {@code &lt;alias&gt;}
* tag is available that effectively achieves the same.
*
* <p>A special capability of this FactoryBean is enabled through its configuration

View File

@@ -51,14 +51,14 @@ public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, Single
/**
* Scope identifier for the standard singleton scope: "singleton".
* Custom scopes can be added via <code>registerScope</code>.
* Custom scopes can be added via {@code registerScope}.
* @see #registerScope
*/
String SCOPE_SINGLETON = "singleton";
/**
* Scope identifier for the standard prototype scope: "prototype".
* Custom scopes can be added via <code>registerScope</code>.
* Custom scopes can be added via {@code registerScope}.
* @see #registerScope
*/
String SCOPE_PROTOTYPE = "prototype";
@@ -83,7 +83,7 @@ public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, Single
* Spring 2.0 by default: Bean definitions only carry bean class names,
* to be resolved once the factory processes the bean definition.
* @param beanClassLoader the class loader to use,
* or <code>null</code> to suggest the default class loader
* or {@code null} to suggest the default class loader
*/
void setBeanClassLoader(ClassLoader beanClassLoader);
@@ -255,14 +255,14 @@ public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, Single
* <p>This will only return explicitly registered scopes.
* Built-in scopes such as "singleton" and "prototype" won't be exposed.
* @param scopeName the name of the scope
* @return the registered Scope implementation, or <code>null</code> if none
* @return the registered Scope implementation, or {@code null} if none
* @see #registerScope
*/
Scope getRegisteredScope(String scopeName);
/**
* Provides a security access control context relevant to this factory.
* @return the applicable AccessControlContext (never <code>null</code>)
* @return the applicable AccessControlContext (never {@code null})
* @since 3.0
*/
AccessControlContext getAccessControlContext();
@@ -314,7 +314,7 @@ public interface ConfigurableBeanFactory extends HierarchicalBeanFactory, Single
* Determine whether the bean with the given name is a FactoryBean.
* @param name the name of the bean to check
* @return whether the bean is a FactoryBean
* (<code>false</code> means the bean exists but is not a FactoryBean)
* ({@code false} means the bean exists but is not a FactoryBean)
* @throws NoSuchBeanDefinitionException if there is no bean with the given name
* @since 2.5
*/

View File

@@ -115,7 +115,7 @@ public interface ConfigurableListableBeanFactory
/**
* Return whether this factory's bean definitions are frozen,
* i.e. are not supposed to be modified or post-processed any further.
* @return <code>true</code> if the factory's configuration is considered frozen
* @return {@code true} if the factory's configuration is considered frozen
*/
boolean isConfigurationFrozen();

View File

@@ -142,9 +142,9 @@ public class ConstructorArgumentValues {
/**
* Get argument value for the given index in the constructor argument list.
* @param index the index in the constructor argument list
* @param requiredType the type to match (can be <code>null</code> to match
* @param requiredType the type to match (can be {@code null} to match
* untyped values only)
* @return the ValueHolder for the argument, or <code>null</code> if none set
* @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getIndexedArgumentValue(int index, Class requiredType) {
return getIndexedArgumentValue(index, requiredType, null);
@@ -153,11 +153,11 @@ public class ConstructorArgumentValues {
/**
* Get argument value for the given index in the constructor argument list.
* @param index the index in the constructor argument list
* @param requiredType the type to match (can be <code>null</code> to match
* @param requiredType the type to match (can be {@code null} to match
* untyped values only)
* @param requiredName the type to match (can be <code>null</code> to match
* @param requiredName the type to match (can be {@code null} to match
* unnamed values only)
* @return the ValueHolder for the argument, or <code>null</code> if none set
* @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getIndexedArgumentValue(int index, Class requiredType, String requiredName) {
Assert.isTrue(index >= 0, "Index must not be negative");
@@ -245,7 +245,7 @@ public class ConstructorArgumentValues {
/**
* Look for a generic argument value that matches the given type.
* @param requiredType the type to match
* @return the ValueHolder for the argument, or <code>null</code> if none set
* @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getGenericArgumentValue(Class requiredType) {
return getGenericArgumentValue(requiredType, null, null);
@@ -255,7 +255,7 @@ public class ConstructorArgumentValues {
* Look for a generic argument value that matches the given type.
* @param requiredType the type to match
* @param requiredName the name to match
* @return the ValueHolder for the argument, or <code>null</code> if none set
* @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getGenericArgumentValue(Class requiredType, String requiredName) {
return getGenericArgumentValue(requiredType, requiredName, null);
@@ -265,13 +265,13 @@ public class ConstructorArgumentValues {
* Look for the next generic argument value that matches the given type,
* ignoring argument values that have already been used in the current
* resolution process.
* @param requiredType the type to match (can be <code>null</code> to find
* @param requiredType the type to match (can be {@code null} to find
* an arbitrary next generic argument value)
* @param requiredName the name to match (can be <code>null</code> to not
* @param requiredName the name to match (can be {@code null} to not
* match argument values by name)
* @param usedValueHolders a Set of ValueHolder objects that have already been used
* in the current resolution process and should therefore not be returned again
* @return the ValueHolder for the argument, or <code>null</code> if none found
* @return the ValueHolder for the argument, or {@code null} if none found
*/
public ValueHolder getGenericArgumentValue(Class requiredType, String requiredName, Set<ValueHolder> usedValueHolders) {
for (ValueHolder valueHolder : this.genericArgumentValues) {
@@ -310,7 +310,7 @@ public class ConstructorArgumentValues {
* in the constructor argument list or generically matches by type.
* @param index the index in the constructor argument list
* @param requiredType the type to match
* @return the ValueHolder for the argument, or <code>null</code> if none set
* @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getArgumentValue(int index, Class requiredType) {
return getArgumentValue(index, requiredType, null, null);
@@ -322,7 +322,7 @@ public class ConstructorArgumentValues {
* @param index the index in the constructor argument list
* @param requiredType the type to match
* @param requiredName the name to match
* @return the ValueHolder for the argument, or <code>null</code> if none set
* @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getArgumentValue(int index, Class requiredType, String requiredName) {
return getArgumentValue(index, requiredType, requiredName, null);
@@ -332,13 +332,13 @@ public class ConstructorArgumentValues {
* Look for an argument value that either corresponds to the given index
* in the constructor argument list or generically matches by type.
* @param index the index in the constructor argument list
* @param requiredType the type to match (can be <code>null</code> to find
* @param requiredType the type to match (can be {@code null} to find
* an untyped argument value)
* @param usedValueHolders a Set of ValueHolder objects that have already
* been used in the current resolution process and should therefore not
* be returned again (allowing to return the next generic argument match
* in case of multiple generic argument values of the same type)
* @return the ValueHolder for the argument, or <code>null</code> if none set
* @return the ValueHolder for the argument, or {@code null} if none set
*/
public ValueHolder getArgumentValue(int index, Class requiredType, String requiredName, Set<ValueHolder> usedValueHolders) {
Assert.isTrue(index >= 0, "Index must not be negative");
@@ -512,7 +512,7 @@ public class ConstructorArgumentValues {
}
/**
* Set the configuration source <code>Object</code> for this metadata element.
* Set the configuration source {@code Object} for this metadata element.
* <p>The exact type of the object will depend on the configuration mechanism used.
*/
public void setSource(Object source) {
@@ -524,8 +524,8 @@ public class ConstructorArgumentValues {
}
/**
* Return whether this holder contains a converted value already (<code>true</code>),
* or whether the value still needs to be converted (<code>false</code>).
* Return whether this holder contains a converted value already ({@code true}),
* or whether the value still needs to be converted ({@code false}).
*/
public synchronized boolean isConverted() {
return this.converted;
@@ -551,7 +551,7 @@ public class ConstructorArgumentValues {
/**
* Determine whether the content of this ValueHolder is equal
* to the content of the given other ValueHolder.
* <p>Note that ValueHolder does not implement <code>equals</code>
* <p>Note that ValueHolder does not implement {@code equals}
* directly, to allow for multiple ValueHolder instances with the
* same content to reside in the same Set.
*/
@@ -562,7 +562,7 @@ public class ConstructorArgumentValues {
/**
* Determine whether the hash code of the content of this ValueHolder.
* <p>Note that ValueHolder does not implement <code>hashCode</code>
* <p>Note that ValueHolder does not implement {@code hashCode}
* directly, to allow for multiple ValueHolder instances with the
* same content to reside in the same Set.
*/

View File

@@ -126,10 +126,10 @@ public class CustomEditorConfigurer implements BeanFactoryPostProcessor, BeanCla
/**
* Specify the {@link PropertyEditorRegistrar PropertyEditorRegistrars}
* to apply to beans defined within the current application context.
* <p>This allows for sharing <code>PropertyEditorRegistrars</code> with
* <p>This allows for sharing {@code PropertyEditorRegistrars} with
* {@link org.springframework.validation.DataBinder DataBinders}, etc.
* Furthermore, it avoids the need for synchronization on custom editors:
* A <code>PropertyEditorRegistrar</code> will always create fresh editor
* A {@code PropertyEditorRegistrar} will always create fresh editor
* instances for each bean creation attempt.
* @see ConfigurableListableBeanFactory#addPropertyEditorRegistrar
*/

View File

@@ -143,7 +143,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Return the wrapped MethodParameter, if any.
* <p>Note: Either MethodParameter or Field is available.
* @return the MethodParameter, or <code>null</code> if none
* @return the MethodParameter, or {@code null} if none
*/
public MethodParameter getMethodParameter() {
return this.methodParameter;
@@ -152,7 +152,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Return the wrapped Field, if any.
* <p>Note: Either MethodParameter or Field is available.
* @return the Field, or <code>null</code> if none
* @return the Field, or {@code null} if none
*/
public Field getField() {
return this.field;
@@ -199,7 +199,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Determine the name of the wrapped parameter/field.
* @return the declared name (never <code>null</code>)
* @return the declared name (never {@code null})
*/
public String getDependencyName() {
return (this.field != null ? this.field.getName() : this.methodParameter.getParameterName());
@@ -207,7 +207,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Determine the declared (non-generic) type of the wrapped parameter/field.
* @return the declared type (never <code>null</code>)
* @return the declared type (never {@code null})
*/
public Class<?> getDependencyType() {
if (this.field != null) {
@@ -238,7 +238,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Determine the generic element type of the wrapped Collection parameter/field, if any.
* @return the generic type, or <code>null</code> if none
* @return the generic type, or {@code null} if none
*/
public Class<?> getCollectionType() {
return (this.field != null ?
@@ -248,7 +248,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Determine the generic key type of the wrapped Map parameter/field, if any.
* @return the generic type, or <code>null</code> if none
* @return the generic type, or {@code null} if none
*/
public Class<?> getMapKeyType() {
return (this.field != null ?
@@ -258,7 +258,7 @@ public class DependencyDescriptor implements Serializable {
/**
* Determine the generic value type of the wrapped Map parameter/field, if any.
* @return the generic type, or <code>null</code> if none
* @return the generic type, or {@code null} if none
*/
public Class<?> getMapValueType() {
return (this.field != null ?

View File

@@ -32,7 +32,7 @@ public interface DestructionAwareBeanPostProcessor extends BeanPostProcessor {
/**
* Apply this BeanPostProcessor to the given bean instance before
* its destruction. Can invoke custom destruction callbacks.
* <p>Like DisposableBean's <code>destroy</code> and a custom destroy method,
* <p>Like DisposableBean's {@code destroy} and a custom destroy method,
* this callback just applies to singleton beans in the factory (including
* inner beans).
* @param bean the bean instance to be destroyed

View File

@@ -61,7 +61,7 @@ public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor {
* @param beanClass the class of the bean to be instantiated
* @param beanName the name of the bean
* @return the bean object to expose instead of a default instance of the target bean,
* or <code>null</code> to proceed with default instantiation
* or {@code null} to proceed with default instantiation
* @throws org.springframework.beans.BeansException in case of errors
* @see org.springframework.beans.factory.support.AbstractBeanDefinition#hasBeanClass
* @see org.springframework.beans.factory.support.AbstractBeanDefinition#getFactoryMethodName
@@ -76,9 +76,9 @@ public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor {
* for a typical example.
* @param bean the bean instance created, with properties not having been set yet
* @param beanName the name of the bean
* @return <code>true</code> if properties should be set on the bean; <code>false</code>
* if property population should be skipped. Normal implementations should return <code>true</code>.
* Returning <code>false</code> will also prevent any subsequent InstantiationAwareBeanPostProcessor
* @return {@code true} if properties should be set on the bean; {@code false}
* if property population should be skipped. Normal implementations should return {@code true}.
* Returning {@code false} will also prevent any subsequent InstantiationAwareBeanPostProcessor
* instances being invoked on this bean instance.
* @throws org.springframework.beans.BeansException in case of errors
*/
@@ -91,13 +91,13 @@ public interface InstantiationAwareBeanPostProcessor extends BeanPostProcessor {
* <p>Also allows for replacing the property values to apply, typically through
* creating a new MutablePropertyValues instance based on the original PropertyValues,
* adding or removing specific values.
* @param pvs the property values that the factory is about to apply (never <code>null</code>)
* @param pvs the property values that the factory is about to apply (never {@code null})
* @param pds the relevant property descriptors for the target bean (with ignored
* dependency types - which the factory handles specifically - already filtered out)
* @param bean the bean instance created, but whose properties have not yet been set
* @param beanName the name of the bean
* @return the actual property values to apply to to the given bean
* (can be the passed-in PropertyValues instance), or <code>null</code>
* (can be the passed-in PropertyValues instance), or {@code null}
* to skip property population
* @throws org.springframework.beans.BeansException in case of errors
* @see org.springframework.beans.MutablePropertyValues

View File

@@ -49,7 +49,7 @@ public class ListFactoryBean extends AbstractFactoryBean<List> {
/**
* Set the class to use for the target List. Can be populated with a fully
* qualified class name when defined in a Spring application context.
* <p>Default is a <code>java.util.ArrayList</code>.
* <p>Default is a {@code java.util.ArrayList}.
* @see java.util.ArrayList
*/
public void setTargetListClass(Class targetListClass) {

View File

@@ -194,7 +194,7 @@ public class MethodInvokingFactoryBean extends ArgumentConvertingMethodInvoker
/**
* Return the type of object that this FactoryBean creates,
* or <code>null</code> if not known in advance.
* or {@code null} if not known in advance.
*/
public Class<?> getObjectType() {
if (!isPrepared()) {

View File

@@ -57,7 +57,7 @@ import org.springframework.util.Assert;
*
*&lt;/beans&gt;</pre>
*
* <p>The attendant <code>MyClientBean</code> class implementation might look
* <p>The attendant {@code MyClientBean} class implementation might look
* something like this:
*
* <pre class="code">package a.b.c;

View File

@@ -25,7 +25,7 @@ import org.springframework.beans.factory.InitializingBean;
/**
* Subclass of PropertyPlaceholderConfigurer that supports JDK 1.4's
* Preferences API (<code>java.util.prefs</code>).
* Preferences API ({@code java.util.prefs}).
*
* <p>Tries to resolve placeholders as keys first in the user preferences,
* then in the system preferences, then in this configurer's properties.
@@ -110,7 +110,7 @@ public class PreferencesPlaceholderConfigurer extends PropertyPlaceholderConfigu
* @param path the preferences path (placeholder part before '/')
* @param key the preferences key (placeholder part after '/')
* @param preferences the Preferences to resolve against
* @return the value for the placeholder, or <code>null</code> if none found
* @return the value for the placeholder, or {@code null} if none found
*/
protected String resolvePlaceholder(String path, String key, Preferences preferences) {
if (path != null) {

View File

@@ -52,7 +52,7 @@ import org.springframework.beans.factory.BeanInitializationException;
* the same bean property, the <i>last</i> one will win (due to the overriding mechanism).
*
* <p>Property values can be converted after reading them in, through overriding
* the <code>convertPropertyValue</code> method. For example, encrypted values
* the {@code convertPropertyValue} method. For example, encrypted values
* can be detected and decrypted accordingly before processing them.
*
* @author Juergen Hoeller

View File

@@ -137,8 +137,8 @@ public class PropertyPlaceholderConfigurer extends PlaceholderConfigurerSupport
/**
* Resolve the given placeholder using the given properties, performing
* a system properties check according to the given mode.
* <p>The default implementation delegates to <code>resolvePlaceholder
* (placeholder, props)</code> before/after the system properties check.
* <p>The default implementation delegates to {@code resolvePlaceholder
* (placeholder, props)} before/after the system properties check.
* <p>Subclasses can override this for custom resolution strategies,
* including customized points for the system properties check.
* @param placeholder the placeholder to resolve
@@ -174,7 +174,7 @@ public class PropertyPlaceholderConfigurer extends PlaceholderConfigurerSupport
* after this method is invoked, according to the system properties mode.
* @param placeholder the placeholder to resolve
* @param props the merged properties of this configurer
* @return the resolved value, of <code>null</code> if none
* @return the resolved value, of {@code null} if none
* @see #setSystemPropertiesMode
*/
protected String resolvePlaceholder(String placeholder, Properties props) {
@@ -185,10 +185,10 @@ public class PropertyPlaceholderConfigurer extends PlaceholderConfigurerSupport
* Resolve the given key as JVM system property, and optionally also as
* system environment variable if no matching system property has been found.
* @param key the placeholder to resolve as system property key
* @return the system property value, or <code>null</code> if not found
* @return the system property value, or {@code null} if not found
* @see #setSearchSystemEnvironment
* @see java.lang.System#getProperty(String)
* @see java.lang.System#getenv(String)
* @see System#getProperty(String)
* @see System#getenv(String)
*/
protected String resolveSystemProperty(String key) {
try {

View File

@@ -31,8 +31,8 @@ import org.springframework.util.Assert;
* <p>This is basically a JSR-330 compliant variant of Spring's good old
* {@link ObjectFactoryCreatingFactoryBean}. It can be used for traditional
* external dependency injection configuration that targets a property or
* constructor argument of type <code>javax.inject.Provider</code>, as an
* alternative to JSR-330's <code>@Inject</code> annotation-driven approach.
* constructor argument of type {@code javax.inject.Provider}, as an
* alternative to JSR-330's {@code @Inject} annotation-driven approach.
*
* @author Juergen Hoeller
* @since 3.0.2

View File

@@ -49,7 +49,7 @@ public class RuntimeBeanNameReference implements BeanReference {
}
/**
* Set the configuration source <code>Object</code> for this metadata element.
* Set the configuration source {@code Object} for this metadata element.
* <p>The exact type of the object will depend on the configuration mechanism used.
*/
public void setSource(Object source) {

View File

@@ -74,7 +74,7 @@ public class RuntimeBeanReference implements BeanReference {
}
/**
* Set the configuration source <code>Object</code> for this metadata element.
* Set the configuration source {@code Object} for this metadata element.
* <p>The exact type of the object will depend on the configuration mechanism used.
*/
public void setSource(Object source) {

View File

@@ -38,14 +38,14 @@ import org.springframework.beans.factory.ObjectFactory;
* this SPI is completely generic: It provides the ability to get and put
* objects from any underlying storage mechanism, such as an HTTP session
* or a custom conversation mechanism. The name passed into this class's
* <code>get</code> and <code>remove</code> methods will identify the
* {@code get} and {@code remove} methods will identify the
* target object in the current scope.
*
* <p><code>Scope</code> implementations are expected to be thread-safe.
* One <code>Scope</code> instance can be used with multiple bean factories
* <p>{@code Scope} implementations are expected to be thread-safe.
* One {@code Scope} instance can be used with multiple bean factories
* at the same time, if desired (unless it explicitly wants to be aware of
* the containing BeanFactory), with any number of threads accessing
* the <code>Scope</code> concurrently from any number of factories.
* the {@code Scope} concurrently from any number of factories.
*
* @author Juergen Hoeller
* @author Rob Harrop
@@ -67,14 +67,14 @@ public interface Scope {
* @param name the name of the object to retrieve
* @param objectFactory the {@link ObjectFactory} to use to create the scoped
* object if it is not present in the underlying storage mechanism
* @return the desired object (never <code>null</code>)
* @return the desired object (never {@code null})
*/
Object get(String name, ObjectFactory<?> objectFactory);
/**
* Remove the object with the given <code>name</code> from the underlying scope.
* <p>Returns <code>null</code> if no object was found; otherwise
* returns the removed <code>Object</code>.
* Remove the object with the given {@code name} from the underlying scope.
* <p>Returns {@code null} if no object was found; otherwise
* returns the removed {@code Object}.
* <p>Note that an implementation should also remove a registered destruction
* callback for the specified object, if any. It does, however, <i>not</i>
* need to <i>execute</i> a registered destruction callback in this case,
@@ -83,7 +83,7 @@ public interface Scope {
* {@link UnsupportedOperationException} if they do not support explicitly
* removing an object.
* @param name the name of the object to remove
* @return the removed object, or <code>null</code> if no object was present
* @return the removed object, or {@code null} if no object was present
* @see #registerDestructionCallback
*/
Object remove(String name);
@@ -122,7 +122,7 @@ public interface Scope {
* Resolve the contextual object for the given key, if any.
* E.g. the HttpServletRequest object for key "request".
* @param key the contextual key
* @return the corresponding object, or <code>null</code> if none found
* @return the corresponding object, or {@code null} if none found
*/
Object resolveContextualObject(String key);
@@ -135,9 +135,9 @@ public interface Scope {
* case of a custom conversation that sits within the overall session,
* the specific ID for the current conversation would be appropriate.
* <p><b>Note: This is an optional operation.</b> It is perfectly valid to
* return <code>null</code> in an implementation of this method if the
* return {@code null} in an implementation of this method if the
* underlying storage mechanism has no obvious candidate for such an ID.
* @return the conversation ID, or <code>null</code> if there is no
* @return the conversation ID, or {@code null} if there is no
* conversation ID for the current scope
*/
String getConversationId();

View File

@@ -36,8 +36,8 @@ import org.springframework.util.StringUtils;
/**
* A {@link FactoryBean} implementation that takes an interface which must have one or more
* methods with the signatures <code>MyType xxx()</code> or <code>MyType xxx(MyIdType id)</code>
* (typically, <code>MyService getService()</code> or <code>MyService getService(String id)</code>)
* methods with the signatures {@code MyType xxx()} or {@code MyType xxx(MyIdType id)}
* (typically, {@code MyService getService()} or {@code MyService getService(String id)})
* and creates a dynamic proxy which implements that interface, delegating to an
* underlying {@link org.springframework.beans.factory.BeanFactory}.
*
@@ -51,7 +51,7 @@ import org.springframework.util.StringUtils;
* setter or constructor injection of the target bean is preferable.</b>
*
* <p>On invocation of the no-arg factory method, or the single-arg factory
* method with a String id of <code>null</code> or empty String, if exactly
* method with a String id of {@code null} or empty String, if exactly
* <b>one</b> bean in the factory matches the return type of the factory
* method, that bean is returned, otherwise a
* {@link org.springframework.beans.factory.NoSuchBeanDefinitionException}
@@ -64,7 +64,7 @@ import org.springframework.util.StringUtils;
*
* <p>A factory method argument will usually be a String, but can also be an
* int or a custom enumeration type, for example, stringified via
* <code>toString</code>. The resulting String can be used as bean name as-is,
* {@code toString}. The resulting String can be used as bean name as-is,
* provided that corresponding beans are defined in the bean factory.
* Alternatively, {@link #setServiceMappings(java.util.Properties) a custom mapping}
* between service ids and bean names can be defined.
@@ -99,7 +99,7 @@ import org.springframework.util.StringUtils;
*
*&lt;/beans></pre>
*
* <p>The attendant <code>MyClientBean</code> class implementation might then
* <p>The attendant {@code MyClientBean} class implementation might then
* look something like this:
*
* <pre class="code">package a.b.c;
@@ -151,7 +151,7 @@ import org.springframework.util.StringUtils;
*
*&lt;/beans></pre>
*
* <p>The attendant <code>MyClientBean</code> class implementation might then
* <p>The attendant {@code MyClientBean} class implementation might then
* look something like this:
*
* <pre class="code">package a.b.c;
@@ -202,8 +202,8 @@ public class ServiceLocatorFactoryBean implements FactoryBean<Object>, BeanFacto
/**
* Set the service locator interface to use, which must have one or more methods with
* the signatures <code>MyType xxx()</code> or <code>MyType xxx(MyIdType id)</code>
* (typically, <code>MyService getService()</code> or <code>MyService getService(String id)</code>).
* the signatures {@code MyType xxx()} or {@code MyType xxx(MyIdType id)}
* (typically, {@code MyService getService()} or {@code MyService getService(String id)}).
* See the {@link ServiceLocatorFactoryBean class-level Javadoc} for
* information on the semantics of such methods.
*/
@@ -214,8 +214,8 @@ public class ServiceLocatorFactoryBean implements FactoryBean<Object>, BeanFacto
/**
* Set the exception class that the service locator should throw if service
* lookup failed. The specified exception class must have a constructor
* with one of the following parameter types: <code>(String, Throwable)</code>
* or <code>(Throwable)</code> or <code>(String)</code>.
* with one of the following parameter types: {@code (String, Throwable)}
* or {@code (Throwable)} or {@code (String)}.
* <p>If not specified, subclasses of Spring's BeansException will be thrown,
* for example NoSuchBeanDefinitionException. As those are unchecked, the
* caller does not need to handle them, so it might be acceptable that
@@ -236,7 +236,7 @@ public class ServiceLocatorFactoryBean implements FactoryBean<Object>, BeanFacto
* Set mappings between service ids (passed into the service locator)
* and bean names (in the bean factory). Service ids that are not defined
* here will be treated as bean names as-is.
* <p>The empty string as service id key defines the mapping for <code>null</code> and
* <p>The empty string as service id key defines the mapping for {@code null} and
* empty string, and for factory methods without parameter. If not defined,
* a single matching bean will be retrieved from the bean factory.
* @param serviceMappings mappings between service ids and bean names,
@@ -271,8 +271,8 @@ public class ServiceLocatorFactoryBean implements FactoryBean<Object>, BeanFacto
* Determine the constructor to use for the given service locator exception
* class. Only called in case of a custom service locator exception.
* <p>The default implementation looks for a constructor with one of the
* following parameter types: <code>(String, Throwable)</code>
* or <code>(Throwable)</code> or <code>(String)</code>.
* following parameter types: {@code (String, Throwable)}
* or {@code (Throwable)} or {@code (String)}.
* @param exceptionClass the exception class
* @return the constructor to use
* @see #setServiceLocatorExceptionClass

View File

@@ -37,9 +37,9 @@ public interface SingletonBeanRegistry {
* under the given bean name.
* <p>The given instance is supposed to be fully initialized; the registry
* will not perform any initialization callbacks (in particular, it won't
* call InitializingBean's <code>afterPropertiesSet</code> method).
* call InitializingBean's {@code afterPropertiesSet} method).
* The given instance will not receive any destruction callbacks
* (like DisposableBean's <code>destroy</code> method) either.
* (like DisposableBean's {@code destroy} method) either.
* <p>When running within a full BeanFactory: <b>Register a bean definition
* instead of an existing instance if your bean is supposed to receive
* initialization and/or destruction callbacks.</b>
@@ -65,23 +65,23 @@ public interface SingletonBeanRegistry {
* <p><b>NOTE:</b> This lookup method is not aware of FactoryBean prefixes or aliases.
* You need to resolve the canonical bean name first before obtaining the singleton instance.
* @param beanName the name of the bean to look for
* @return the registered singleton object, or <code>null</code> if none found
* @return the registered singleton object, or {@code null} if none found
* @see ConfigurableListableBeanFactory#getBeanDefinition
*/
Object getSingleton(String beanName);
/**
* Check if this registry contains a singleton instance with the given name.
* <p>Only checks already instantiated singletons; does not return <code>true</code>
* <p>Only checks already instantiated singletons; does not return {@code true}
* for singleton bean definitions which have not been instantiated yet.
* <p>The main purpose of this method is to check manually registered singletons
* (see {@link #registerSingleton}). Can also be used to check whether a
* singleton defined by a bean definition has already been created.
* <p>To check whether a bean factory contains a bean definition with a given name,
* use ListableBeanFactory's <code>containsBeanDefinition</code>. Calling both
* <code>containsBeanDefinition</code> and <code>containsSingleton</code> answers
* use ListableBeanFactory's {@code containsBeanDefinition}. Calling both
* {@code containsBeanDefinition} and {@code containsSingleton} answers
* whether a specific bean factory contains a local bean instance with the given name.
* <p>Use BeanFactory's <code>containsBean</code> for general checks whether the
* <p>Use BeanFactory's {@code containsBean} for general checks whether the
* factory knows about a bean with a given name (whether manually registered singleton
* instance or created by bean definition), also checking ancestor factories.
* <p><b>NOTE:</b> This lookup method is not aware of FactoryBean prefixes or aliases.
@@ -101,7 +101,7 @@ public interface SingletonBeanRegistry {
* <p>The main purpose of this method is to check manually registered singletons
* (see {@link #registerSingleton}). Can also be used to check which singletons
* defined by a bean definition have already been created.
* @return the list of names as a String array (never <code>null</code>)
* @return the list of names as a String array (never {@code null})
* @see #registerSingleton
* @see org.springframework.beans.factory.support.BeanDefinitionRegistry#getBeanDefinitionNames
* @see org.springframework.beans.factory.ListableBeanFactory#getBeanDefinitionNames

View File

@@ -41,16 +41,16 @@ public interface SmartInstantiationAwareBeanPostProcessor extends InstantiationA
* processor's {@link #postProcessBeforeInstantiation} callback.
* @param beanClass the raw class of the bean
* @param beanName the name of the bean
* @return the type of the bean, or <code>null</code> if not predictable
* @return the type of the bean, or {@code null} if not predictable
* @throws org.springframework.beans.BeansException in case of errors
*/
Class<?> predictBeanType(Class<?> beanClass, String beanName) throws BeansException;
/**
* Determine the candidate constructors to use for the given bean.
* @param beanClass the raw class of the bean (never <code>null</code>)
* @param beanClass the raw class of the bean (never {@code null})
* @param beanName the name of the bean
* @return the candidate constructors, or <code>null</code> if none specified
* @return the candidate constructors, or {@code null} if none specified
* @throws org.springframework.beans.BeansException in case of errors
*/
Constructor<?>[] determineCandidateConstructors(Class<?> beanClass, String beanName) throws BeansException;

View File

@@ -164,7 +164,7 @@ public class TypedStringValue implements BeanMetadataElement {
/**
* Set the configuration source <code>Object</code> for this metadata element.
* Set the configuration source {@code Object} for this metadata element.
* <p>The exact type of the object will depend on the configuration mechanism used.
*/
public void setSource(Object source) {

View File

@@ -48,7 +48,7 @@ public class AliasDefinition implements BeanMetadataElement {
* Create a new AliasDefinition.
* @param beanName the canonical name of the bean
* @param alias the alias registered for the bean
* @param source the source object (may be <code>null</code>)
* @param source the source object (may be {@code null})
*/
public AliasDefinition(String beanName, String alias, Object source) {
Assert.notNull(beanName, "Bean name must not be null");

View File

@@ -54,7 +54,7 @@ public class BeanComponentDefinition extends BeanDefinitionHolder implements Com
* Create a new BeanComponentDefinition for the given bean.
* @param beanDefinition the BeanDefinition
* @param beanName the name of the bean
* @param aliases alias names for the bean, or <code>null</code> if none
* @param aliases alias names for the bean, or {@code null} if none
*/
public BeanComponentDefinition(BeanDefinition beanDefinition, String beanName, String[] aliases) {
super(beanDefinition, beanName, aliases);

View File

@@ -33,18 +33,18 @@ import org.springframework.beans.factory.config.BeanReference;
* applications it is important that there is some mechanism in place to tie the {@link BeanDefinition BeanDefinitions}
* in the {@link org.springframework.beans.factory.BeanFactory} back to the configuration data in a way
* that has concrete meaning to the end user. As such, {@link org.springframework.beans.factory.xml.NamespaceHandler}
* implementations are able to publish events in the form of a <code>ComponentDefinition</code> for each
* logical entity being configured. Third parties can then {@link org.springframework.beans.factory.parsing.ReaderEventListener subscribe to these events},
* implementations are able to publish events in the form of a {@code ComponentDefinition} for each
* logical entity being configured. Third parties can then {@link ReaderEventListener subscribe to these events},
* allowing for a user-centric view of the bean metadata.
*
* <p>Each <code>ComponentDefinition</code> has a {@link #getSource source object} which is configuration-specific.
* <p>Each {@code ComponentDefinition} has a {@link #getSource source object} which is configuration-specific.
* In the case of XML-based configuration this is typically the {@link org.w3c.dom.Node} which contains the user
* supplied configuration information. In addition to this, each {@link BeanDefinition} enclosed in a
* <code>ComponentDefinition</code> has its own {@link BeanDefinition#getSource() source object} which may point
* {@code ComponentDefinition} has its own {@link BeanDefinition#getSource() source object} which may point
* to a different, more specific, set of configuration data. Beyond this, individual pieces of bean metadata such
* as the {@link org.springframework.beans.PropertyValue PropertyValues} may also have a source object giving an
* even greater level of detail. Source object extraction is handled through the
* {@link org.springframework.beans.factory.parsing.SourceExtractor} which can be customized as required.
* {@link SourceExtractor} which can be customized as required.
*
* <p>Whilst direct access to important {@link BeanReference BeanReferences} is provided through
* {@link #getBeanReferences}, tools may wish to inspect all {@link BeanDefinition BeanDefinitions} to gather
@@ -60,7 +60,7 @@ import org.springframework.beans.factory.config.BeanReference;
* {@link BeanDefinition#getRole role identifier}. The role is essentially a hint to the tool as to how
* important the configuration provider believes a {@link BeanDefinition} is to the end user. It is expected
* that tools will <strong>not</strong> display all {@link BeanDefinition BeanDefinitions} for a given
* <code>ComponentDefinition</code> choosing instead to filter based on the role. Tools may choose to make
* {@code ComponentDefinition} choosing instead to filter based on the role. Tools may choose to make
* this filtering user configurable. Particular notice should be given to the
* {@link BeanDefinition#ROLE_INFRASTRUCTURE INFRASTRUCTURE role identifier}. {@link BeanDefinition BeanDefinitions}
* classified with this role are completely unimportant to the end user and are required only for
@@ -77,7 +77,7 @@ import org.springframework.beans.factory.config.BeanReference;
public interface ComponentDefinition extends BeanMetadataElement {
/**
* Get the user-visible name of this <code>ComponentDefinition</code>.
* Get the user-visible name of this {@code ComponentDefinition}.
* <p>This should link back directly to the corresponding configuration data
* for this component in a given context.
*/
@@ -86,14 +86,14 @@ public interface ComponentDefinition extends BeanMetadataElement {
/**
* Return a friendly description of the described component.
* <p>Implementations are encouraged to return the same value from
* <code>toString()</code>.
* {@code toString()}.
*/
String getDescription();
/**
* Return the {@link BeanDefinition BeanDefinitions} that were registered
* to form this <code>ComponentDefinition</code>.
* <p>It should be noted that a <code>ComponentDefinition</code> may well be related with
* to form this {@code ComponentDefinition}.
* <p>It should be noted that a {@code ComponentDefinition} may well be related with
* other {@link BeanDefinition BeanDefinitions} via {@link BeanReference references},
* however these are <strong>not</strong> included as they may be not available immediately.
* Important {@link BeanReference BeanReferences} are available from {@link #getBeanReferences()}.
@@ -112,7 +112,7 @@ public interface ComponentDefinition extends BeanMetadataElement {
/**
* Return the set of {@link BeanReference BeanReferences} that are considered
* to be important to this <code>ComponentDefinition</code>.
* to be important to this {@code ComponentDefinition}.
* <p>Other {@link BeanReference BeanReferences} may exist within the associated
* {@link BeanDefinition BeanDefinitions}, however these are not considered
* to be needed for validation or for user visualization.

View File

@@ -41,9 +41,9 @@ public class ConstructorArgumentEntry implements ParseState.Entry {
/**
* Creates a new instance of the {@link ConstructorArgumentEntry} class
* representing a constructor argument at the supplied <code>index</code>.
* representing a constructor argument at the supplied {@code index}.
* @param index the index of the constructor argument
* @throws IllegalArgumentException if the supplied <code>index</code>
* @throws IllegalArgumentException if the supplied {@code index}
* is less than zero
*/
public ConstructorArgumentEntry(int index) {

View File

@@ -41,7 +41,7 @@ public class FailFastProblemReporter implements ProblemReporter {
/**
* Set the {@link Log logger} that is to be used to report warnings.
* <p>If set to <code>null</code> then a default {@link Log logger} set to
* <p>If set to {@code null} then a default {@link Log logger} set to
* the name of the instance class will be used.
* @param logger the {@link Log logger} that is to be used to report warnings
*/
@@ -69,7 +69,7 @@ public class FailFastProblemReporter implements ProblemReporter {
}
/**
* Writes the supplied {@link Problem} to the {@link Log} at <code>WARN</code> level.
* Writes the supplied {@link Problem} to the {@link Log} at {@code WARN} level.
* @param problem the source of the warning
*/
public void warning(Problem problem) {

View File

@@ -47,7 +47,7 @@ public class ImportDefinition implements BeanMetadataElement {
/**
* Create a new ImportDefinition.
* @param importedResource the location of the imported resource
* @param source the source object (may be <code>null</code>)
* @param source the source object (may be {@code null})
*/
public ImportDefinition(String importedResource, Object source) {
this(importedResource, null, source);
@@ -56,7 +56,7 @@ public class ImportDefinition implements BeanMetadataElement {
/**
* Create a new ImportDefinition.
* @param importedResource the location of the imported resource
* @param source the source object (may be <code>null</code>)
* @param source the source object (may be {@code null})
*/
public ImportDefinition(String importedResource, Resource[] actualResources, Object source) {
Assert.notNull(importedResource, "Imported resource must not be null");

View File

@@ -27,7 +27,7 @@ import org.springframework.util.Assert;
* {@link #getSource() source} location might be 'The bean defined on
* line 76 of beans.properties has an invalid Class'; another source might
* be the actual DOM Element from a parsed XML {@link org.w3c.dom.Document};
* or the source object might simply be <code>null</code>.
* or the source object might simply be {@code null}.
*
* @author Rob Harrop
* @since 2.0
@@ -51,7 +51,7 @@ public class Location {
* Create a new instance of the {@link Location} class.
* @param resource the resource with which this location is associated
* @param source the actual location within the associated resource
* (may be <code>null</code>)
* (may be {@code null})
*/
public Location(Resource resource, Object source) {
Assert.notNull(resource, "Resource must not be null");
@@ -69,7 +69,7 @@ public class Location {
/**
* Get the actual location within the associated {@link #getResource() resource}
* (may be <code>null</code>).
* (may be {@code null}).
* <p>See the {@link Location class level javadoc for this class} for examples
* of what the actual type of the returned object may be.
*/

View File

@@ -19,7 +19,7 @@ package org.springframework.beans.factory.parsing;
import org.springframework.core.io.Resource;
/**
* Simple implementation of {@link SourceExtractor} that returns <code>null</code>
* Simple implementation of {@link SourceExtractor} that returns {@code null}
* as the source metadata.
*
* <p>This is the default implementation and prevents too much metadata from being
@@ -31,7 +31,7 @@ import org.springframework.core.io.Resource;
public class NullSourceExtractor implements SourceExtractor {
/**
* This implementation simply returns <code>null</code> for any input.
* This implementation simply returns {@code null} for any input.
*/
public Object extractSource(Object sourceCandidate, Resource definitionResource) {
return null;

View File

@@ -44,15 +44,15 @@ public final class ParseState {
/**
* Create a new <code>ParseState</code> with an empty {@link Stack}.
* Create a new {@code ParseState} with an empty {@link Stack}.
*/
public ParseState() {
this.state = new Stack();
}
/**
* Create a new <code>ParseState</code> whose {@link Stack} is a {@link Object#clone clone}
* of that of the passed in <code>ParseState</code>.
* Create a new {@code ParseState} whose {@link Stack} is a {@link Object#clone clone}
* of that of the passed in {@code ParseState}.
*/
private ParseState(ParseState other) {
this.state = (Stack) other.state.clone();
@@ -75,7 +75,7 @@ public final class ParseState {
/**
* Return the {@link Entry} currently at the top of the {@link Stack} or
* <code>null</code> if the {@link Stack} is empty.
* {@code null} if the {@link Stack} is empty.
*/
public Entry peek() {
return (Entry) (this.state.empty() ? null : this.state.peek());
@@ -91,7 +91,7 @@ public final class ParseState {
/**
* Returns a tree-style representation of the current <code>ParseState</code>.
* Returns a tree-style representation of the current {@code ParseState}.
*/
@Override
public String toString() {

View File

@@ -35,9 +35,9 @@ import org.springframework.core.io.Resource;
public class PassThroughSourceExtractor implements SourceExtractor {
/**
* Simply returns the supplied <code>sourceCandidate</code> as-is.
* Simply returns the supplied {@code sourceCandidate} as-is.
* @param sourceCandidate the source metadata
* @return the supplied <code>sourceCandidate</code>
* @return the supplied {@code sourceCandidate}
*/
public Object extractSource(Object sourceCandidate, Resource definingResource) {
return sourceCandidate;

View File

@@ -61,8 +61,8 @@ public class Problem {
/**
* Create a new instance of the {@link Problem} class.
* @param message a message detailing the problem
* @param rootCause the underlying expection that caused the error (may be <code>null</code>)
* @param message a message detailing the problem
* @param rootCause the underlying expection that caused the error (may be {@code null})
* @param parseState the {@link ParseState} at the time of the error
* @param location the location within a bean configuration source that triggered the error
*/
@@ -100,14 +100,14 @@ public class Problem {
}
/**
* Get the {@link ParseState} at the time of the error (may be <code>null</code>).
* Get the {@link ParseState} at the time of the error (may be {@code null}).
*/
public ParseState getParseState() {
return this.parseState;
}
/**
* Get the underlying expection that caused the error (may be <code>null</code>).
* Get the underlying expection that caused the error (may be {@code null}).
*/
public Throwable getRootCause() {
return this.rootCause;

View File

@@ -31,21 +31,21 @@ public interface ProblemReporter {
* Called when a fatal error is encountered during the parsing process.
* <p>Implementations must treat the given problem as fatal,
* i.e. they have to eventually raise an exception.
* @param problem the source of the error (never <code>null</code>)
* @param problem the source of the error (never {@code null})
*/
void fatal(Problem problem);
/**
* Called when an error is encountered during the parsing process.
* <p>Implementations may choose to treat errors as fatal.
* @param problem the source of the error (never <code>null</code>)
* @param problem the source of the error (never {@code null})
*/
void error(Problem problem);
/**
* Called when a warning is raised during the parsing process.
* <p>Warnings are <strong>never</strong> considered to be fatal.
* @param problem the source of the warning (never <code>null</code>)
* @param problem the source of the warning (never {@code null})
*/
void warning(Problem problem);

View File

@@ -32,7 +32,7 @@ public class PropertyEntry implements ParseState.Entry {
/**
* Creates a new instance of the {@link PropertyEntry} class.
* @param name the name of the JavaBean property represented by this instance
* @throws IllegalArgumentException if the supplied <code>name</code> is <code>null</code>
* @throws IllegalArgumentException if the supplied {@code name} is {@code null}
* or consists wholly of whitespace
*/
public PropertyEntry(String name) {

View File

@@ -38,10 +38,10 @@ public interface SourceExtractor {
/**
* Extract the source metadata from the candidate object supplied
* by the configuration parser.
* @param sourceCandidate the original source metadata (never <code>null</code>)
* @param sourceCandidate the original source metadata (never {@code null})
* @param definingResource the resource that defines the given source object
* (may be <code>null</code>)
* @return the source metadata object to store (may be <code>null</code>)
* (may be {@code null})
* @return the source metadata object to store (may be {@code null})
*/
Object extractSource(Object sourceCandidate, Resource definingResource);

View File

@@ -164,7 +164,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
/**
* Create a new AbstractAutowireCapableBeanFactory with the given parent.
* @param parentBeanFactory parent bean factory, or <code>null</code> if none
* @param parentBeanFactory parent bean factory, or {@code null} if none
*/
public AbstractAutowireCapableBeanFactory(BeanFactory parentBeanFactory) {
this();
@@ -467,13 +467,13 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
/**
* Actually create the specified bean. Pre-creation processing has already happened
* at this point, e.g. checking <code>postProcessBeforeInstantiation</code> callbacks.
* at this point, e.g. checking {@code postProcessBeforeInstantiation} callbacks.
* <p>Differentiates between default bean instantiation, use of a
* factory method, and autowiring a constructor.
* @param beanName the name of the bean
* @param mbd the merged bean definition for the bean
* @param args arguments to use if creating a prototype using explicit arguments to a
* static factory method. This parameter must be <code>null</code> except in this case.
* static factory method. This parameter must be {@code null} except in this case.
* @return a new instance of the bean
* @throws BeanCreationException if the bean could not be created
* @see #instantiateBean
@@ -606,8 +606,8 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
* @param beanName the name of the bean (for error handling purposes)
* @param mbd the merged bean definition for the bean
* @param typesToMatch the types to match in case of internal type matching purposes
* (also signals that the returned <code>Class</code> will never be exposed to application code)
* @return the type for the bean if determinable, or <code>null</code> else
* (also signals that the returned {@code Class} will never be exposed to application code)
* @return the type for the bean if determinable, or {@code null} else
* @see #createBean
*/
protected Class getTypeForFactoryMethod(String beanName, RootBeanDefinition mbd, Class[] typesToMatch) {
@@ -668,7 +668,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
/**
* This implementation attempts to query the FactoryBean's generic parameter metadata
* if present to determine the object type. If not present, i.e. the FactoryBean is
* declared as a raw type, checks the FactoryBean's <code>getObjectType</code> method
* declared as a raw type, checks the FactoryBean's {@code getObjectType} method
* on a plain instance of the FactoryBean, without bean properties applied yet.
* If this doesn't return a type yet, a full creation of the FactoryBean is
* used as fallback (through delegation to the superclass's implementation).
@@ -755,11 +755,11 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
/**
* Obtain a "shortcut" singleton FactoryBean instance to use for a
* <code>getObjectType()</code> call, without full initialization
* {@code getObjectType()} call, without full initialization
* of the FactoryBean.
* @param beanName the name of the bean
* @param mbd the bean definition for the bean
* @return the FactoryBean instance, or <code>null</code> to indicate
* @return the FactoryBean instance, or {@code null} to indicate
* that we couldn't obtain a shortcut FactoryBean instance
*/
private FactoryBean getSingletonFactoryBeanForTypeCheck(String beanName, RootBeanDefinition mbd) {
@@ -796,11 +796,11 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
/**
* Obtain a "shortcut" non-singleton FactoryBean instance to use for a
* <code>getObjectType()</code> call, without full initialization
* {@code getObjectType()} call, without full initialization
* of the FactoryBean.
* @param beanName the name of the bean
* @param mbd the bean definition for the bean
* @return the FactoryBean instance, or <code>null</code> to indicate
* @return the FactoryBean instance, or {@code null} to indicate
* that we couldn't obtain a shortcut FactoryBean instance
*/
private FactoryBean getNonSingletonFactoryBeanForTypeCheck(String beanName, RootBeanDefinition mbd) {
@@ -827,7 +827,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
/**
* Apply MergedBeanDefinitionPostProcessors to the specified bean definition,
* invoking their <code>postProcessMergedBeanDefinition</code> methods.
* invoking their {@code postProcessMergedBeanDefinition} methods.
* @param mbd the merged bean definition for the bean
* @param beanType the actual type of the managed bean instance
* @param beanName the name of the bean
@@ -856,7 +856,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
* before-instantiation shortcut for the specified bean.
* @param beanName the name of the bean
* @param mbd the bean definition for the bean
* @return the shortcut-determined bean instance, or <code>null</code> if none
* @return the shortcut-determined bean instance, or {@code null} if none
*/
protected Object resolveBeforeInstantiation(String beanName, RootBeanDefinition mbd) {
Object bean = null;
@@ -875,13 +875,13 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
/**
* Apply InstantiationAwareBeanPostProcessors to the specified bean definition
* (by class and name), invoking their <code>postProcessBeforeInstantiation</code> methods.
* (by class and name), invoking their {@code postProcessBeforeInstantiation} methods.
* <p>Any returned object will be used as the bean instead of actually instantiating
* the target bean. A <code>null</code> return value from the post-processor will
* the target bean. A {@code null} return value from the post-processor will
* result in the target bean being instantiated.
* @param beanClass the class of the bean to be instantiated
* @param beanName the name of the bean
* @return the bean object to use instead of a default instance of the target bean, or <code>null</code>
* @return the bean object to use instead of a default instance of the target bean, or {@code null}
* @throws BeansException if any post-processing failed
* @see InstantiationAwareBeanPostProcessor#postProcessBeforeInstantiation
*/
@@ -962,7 +962,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
* {@link SmartInstantiationAwareBeanPostProcessor SmartInstantiationAwareBeanPostProcessors}.
* @param beanClass the raw class of the bean
* @param beanName the name of the bean
* @return the candidate constructors, or <code>null</code> if none specified
* @return the candidate constructors, or {@code null} if none specified
* @throws org.springframework.beans.BeansException in case of errors
* @see org.springframework.beans.factory.config.SmartInstantiationAwareBeanPostProcessor#determineCandidateConstructors
*/
@@ -1019,7 +1019,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
* @param beanName the name of the bean
* @param mbd the bean definition for the bean
* @param explicitArgs argument values passed in programmatically via the getBean method,
* or <code>null</code> if none (-> use constructor argument values from bean definition)
* or {@code null} if none (-> use constructor argument values from bean definition)
* @return BeanWrapper for the new instance
* @see #getBean(String, Object[])
*/
@@ -1040,7 +1040,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
* @param mbd the bean definition for the bean
* @param ctors the chosen candidate constructors
* @param explicitArgs argument values passed in programmatically via the getBean method,
* or <code>null</code> if none (-> use constructor argument values from bean definition)
* or {@code null} if none (-> use constructor argument values from bean definition)
* @return BeanWrapper for the new instance
*/
protected BeanWrapper autowireConstructor(
@@ -1452,7 +1452,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
* @param beanName the bean name in the factory (for debugging purposes)
* @param bean the new bean instance we may need to initialize
* @param mbd the bean definition that the bean was created with
* (can also be <code>null</code>, if given an existing bean instance)
* (can also be {@code null}, if given an existing bean instance)
* @return the initialized bean instance (potentially wrapped)
* @see BeanNameAware
* @see BeanClassLoaderAware
@@ -1516,7 +1516,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
* @param beanName the bean name in the factory (for debugging purposes)
* @param bean the new bean instance we may need to initialize
* @param mbd the merged bean definition that the bean was created with
* (can also be <code>null</code>, if given an existing bean instance)
* (can also be {@code null}, if given an existing bean instance)
* @throws Throwable if thrown by init methods or by the invocation process
* @see #invokeCustomInitMethod
*/
@@ -1619,7 +1619,7 @@ public abstract class AbstractAutowireCapableBeanFactory extends AbstractBeanFac
/**
* Applies the <code>postProcessAfterInitialization</code> callback of all
* Applies the {@code postProcessAfterInitialization} callback of all
* registered BeanPostProcessors, giving them a chance to post-process the
* object obtained from FactoryBeans (for example, to auto-proxy them).
* @see #applyBeanPostProcessorsAfterInitialization

View File

@@ -277,13 +277,13 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
* definition (presumably the child).
* <ul>
* <li>Will override beanClass if specified in the given bean definition.
* <li>Will always take <code>abstract</code>, <code>scope</code>,
* <code>lazyInit</code>, <code>autowireMode</code>, <code>dependencyCheck</code>,
* and <code>dependsOn</code> from the given bean definition.
* <li>Will add <code>constructorArgumentValues</code>, <code>propertyValues</code>,
* <code>methodOverrides</code> from the given bean definition to existing ones.
* <li>Will override <code>factoryBeanName</code>, <code>factoryMethodName</code>,
* <code>initMethodName</code>, and <code>destroyMethodName</code> if specified
* <li>Will always take {@code abstract}, {@code scope},
* {@code lazyInit}, {@code autowireMode}, {@code dependencyCheck},
* and {@code dependsOn} from the given bean definition.
* <li>Will add {@code constructorArgumentValues}, {@code propertyValues},
* {@code methodOverrides} from the given bean definition to existing ones.
* <li>Will override {@code factoryBeanName}, {@code factoryMethodName},
* {@code initMethodName}, and {@code destroyMethodName} if specified
* in the given bean definition.
* </ul>
*/
@@ -369,7 +369,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/**
* Return the class of the wrapped bean, if already resolved.
* @return the bean class, or <code>null</code> if none defined
* @return the bean class, or {@code null} if none defined
* @throws IllegalStateException if the bean definition does not define a bean class,
* or a specified bean class name has not been resolved into an actual Class
*/
@@ -499,7 +499,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/**
* Set whether this bean should be lazily initialized.
* <p>If <code>false</code>, the bean will get instantiated on startup by bean
* <p>If {@code false}, the bean will get instantiated on startup by bean
* factories that perform eager initialization of singletons.
*/
public void setLazyInit(boolean lazyInit) {
@@ -696,7 +696,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
}
/**
* Specify whether to resolve constructors in lenient mode (<code>true</code>,
* Specify whether to resolve constructors in lenient mode ({@code true},
* which is the default) or to switch to strict resolution (throwing an exception
* in case of ambigious constructors that all match when converting the arguments,
* whereas lenient mode would use the one with the 'closest' type matches).
@@ -721,7 +721,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
}
/**
* Return constructor argument values for this bean (never <code>null</code>).
* Return constructor argument values for this bean (never {@code null}).
*/
public ConstructorArgumentValues getConstructorArgumentValues() {
return this.constructorArgumentValues;
@@ -742,7 +742,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
}
/**
* Return property values for this bean (never <code>null</code>).
* Return property values for this bean (never {@code null}).
*/
public MutablePropertyValues getPropertyValues() {
return this.propertyValues;
@@ -782,7 +782,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
}
/**
* Set the name of the initializer method. The default is <code>null</code>
* Set the name of the initializer method. The default is {@code null}
* in which case there is no initializer method.
*/
public void setInitMethodName(String initMethodName) {
@@ -798,7 +798,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/**
* Specify whether or not the configured init method is the default.
* Default value is <code>false</code>.
* Default value is {@code false}.
* @see #setInitMethodName
*/
public void setEnforceInitMethod(boolean enforceInitMethod) {
@@ -814,7 +814,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
}
/**
* Set the name of the destroy method. The default is <code>null</code>
* Set the name of the destroy method. The default is {@code null}
* in which case there is no destroy method.
*/
public void setDestroyMethodName(String destroyMethodName) {
@@ -830,7 +830,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/**
* Specify whether or not the configured destroy method is the default.
* Default value is <code>false</code>.
* Default value is {@code false}.
* @see #setDestroyMethodName
*/
public void setEnforceDestroyMethod(boolean enforceDestroyMethod) {
@@ -849,7 +849,7 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/**
* Set whether this bean definition is 'synthetic', that is, not defined
* by the application itself (for example, an infrastructure bean such
* as a helper for auto-proxying, created through <code>&ltaop:config&gt;</code>).
* as a helper for auto-proxying, created through {@code &ltaop:config&gt;}).
*/
public void setSynthetic(boolean synthetic) {
this.synthetic = synthetic;
@@ -864,14 +864,14 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
}
/**
* Set the role hint for this <code>BeanDefinition</code>.
* Set the role hint for this {@code BeanDefinition}.
*/
public void setRole(int role) {
this.role = role;
}
/**
* Return the role hint for this <code>BeanDefinition</code>.
* Return the role hint for this {@code BeanDefinition}.
*/
public int getRole() {
return this.role;
@@ -981,9 +981,9 @@ public abstract class AbstractBeanDefinition extends BeanMetadataAttributeAccess
/**
* Public declaration of Object's <code>clone()</code> method.
* Public declaration of Object's {@code clone()} method.
* Delegates to {@link #cloneBeanDefinition()}.
* @see java.lang.Object#clone()
* @see Object#clone()
*/
@Override
public Object clone() {

View File

@@ -112,7 +112,7 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable
* will be capable of resolving resource patterns to Resource arrays.
* <p>Default is PathMatchingResourcePatternResolver, also capable of
* resource pattern resolving through the ResourcePatternResolver interface.
* <p>Setting this to <code>null</code> suggests that absolute resource loading
* <p>Setting this to {@code null} suggests that absolute resource loading
* is not available for this bean definition reader.
* @see org.springframework.core.io.support.ResourcePatternResolver
* @see org.springframework.core.io.support.PathMatchingResourcePatternResolver
@@ -127,10 +127,10 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable
/**
* Set the ClassLoader to use for bean classes.
* <p>Default is <code>null</code>, which suggests to not load bean classes
* <p>Default is {@code null}, which suggests to not load bean classes
* eagerly but rather to just register bean definitions with class names,
* with the corresponding Classes to be resolved later (or never).
* @see java.lang.Thread#getContextClassLoader()
* @see Thread#getContextClassLoader()
*/
public void setBeanClassLoader(ClassLoader beanClassLoader) {
this.beanClassLoader = beanClassLoader;
@@ -187,7 +187,7 @@ public abstract class AbstractBeanDefinitionReader implements EnvironmentCapable
* @param location the resource location, to be loaded with the ResourceLoader
* (or ResourcePatternResolver) of this bean definition reader
* @param actualResources a Set to be filled with the actual Resource objects
* that have been resolved during the loading process. May be <code>null</code>
* that have been resolved during the loading process. May be {@code null}
* to indicate that the caller is not interested in those Resource objects.
* @return the number of bean definitions found
* @throws BeanDefinitionStoreException in case of loading or parsing errors

View File

@@ -178,7 +178,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
/**
* Create a new AbstractBeanFactory with the given parent.
* @param parentBeanFactory parent bean factory, or <code>null</code> if none
* @param parentBeanFactory parent bean factory, or {@code null} if none
* @see #getBean
*/
public AbstractBeanFactory(BeanFactory parentBeanFactory) {
@@ -718,7 +718,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
/**
* Return the custom TypeConverter to use, if any.
* @return the custom TypeConverter, or <code>null</code> if none specified
* @return the custom TypeConverter, or {@code null} if none specified
*/
protected TypeConverter getCustomTypeConverter() {
return this.typeConverter;
@@ -858,7 +858,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
/**
* Return a 'merged' BeanDefinition for the given bean name,
* merging a child bean definition with its parent if necessary.
* <p>This <code>getMergedBeanDefinition</code> considers bean definition
* <p>This {@code getMergedBeanDefinition} considers bean definition
* in ancestors as well.
* @param name the name of the bean to retrieve the merged definition for
* (may be an alias)
@@ -1116,7 +1116,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
* @param beanName the name of the bean definition
* @param bd the original bean definition (Root/ChildBeanDefinition)
* @param containingBd the containing bean definition in case of inner bean,
* or <code>null</code> in case of a top-level bean
* or {@code null} in case of a top-level bean
* @return a (potentially merged) RootBeanDefinition for the given bean
* @throws BeanDefinitionStoreException in case of an invalid bean definition
*/
@@ -1234,8 +1234,8 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
* @param mbd the merged bean definition to determine the class for
* @param beanName the name of the bean (for error handling purposes)
* @param typesToMatch the types to match in case of internal type matching purposes
* (also signals that the returned <code>Class</code> will never be exposed to application code)
* @return the resolved bean class (or <code>null</code> if none)
* (also signals that the returned {@code Class} will never be exposed to application code)
* @return the resolved bean class (or {@code null} if none)
* @throws CannotLoadBeanClassException if we failed to load the class
*/
protected Class<?> resolveBeanClass(final RootBeanDefinition mbd, String beanName, final Class<?>... typesToMatch)
@@ -1313,8 +1313,8 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
* @param beanName the name of the bean
* @param mbd the merged bean definition to determine the type for
* @param typesToMatch the types to match in case of internal type matching purposes
* (also signals that the returned <code>Class</code> will never be exposed to application code)
* @return the type of the bean, or <code>null</code> if not predictable
* (also signals that the returned {@code Class} will never be exposed to application code)
* @return the type of the bean, or {@code null} if not predictable
*/
protected Class<?> predictBeanType(String beanName, RootBeanDefinition mbd, Class<?>... typesToMatch) {
if (mbd.getFactoryMethodName() != null) {
@@ -1337,15 +1337,15 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
/**
* Determine the bean type for the given FactoryBean definition, as far as possible.
* Only called if there is no singleton instance registered for the target bean already.
* <p>The default implementation creates the FactoryBean via <code>getBean</code>
* to call its <code>getObjectType</code> method. Subclasses are encouraged to optimize
* <p>The default implementation creates the FactoryBean via {@code getBean}
* to call its {@code getObjectType} method. Subclasses are encouraged to optimize
* this, typically by just instantiating the FactoryBean but not populating it yet,
* trying whether its <code>getObjectType</code> method already returns a type.
* trying whether its {@code getObjectType} method already returns a type.
* If no type found, a full FactoryBean creation as performed by this implementation
* should be used as fallback.
* @param beanName the name of the bean
* @param mbd the merged bean definition for the bean
* @return the type for the bean if determinable, or <code>null</code> else
* @return the type for the bean if determinable, or {@code null} else
* @see org.springframework.beans.factory.FactoryBean#getObjectType()
* @see #getBean(String)
*/
@@ -1381,7 +1381,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
* Determine whether the specified bean is eligible for having
* its bean definition metadata cached.
* @param beanName the name of the bean
* @return <code>true</code> if the bean's metadata may be cached
* @return {@code true} if the bean's metadata may be cached
* at this point already
*/
protected boolean isBeanEligibleForMetadataCaching(String beanName) {
@@ -1392,7 +1392,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
* Remove the singleton instance (if any) for the given bean name,
* but only if it hasn't been used for other purposes than type checking.
* @param beanName the name of the bean
* @return <code>true</code> if actually removed, <code>false</code> otherwise
* @return {@code true} if actually removed, {@code false} otherwise
*/
protected boolean removeSingletonIfCreatedForTypeCheckOnly(String beanName) {
if (!this.alreadyCreated.containsKey(beanName)) {
@@ -1512,7 +1512,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
/**
* Check if this bean factory contains a bean definition with the given name.
* Does not consider any hierarchy this factory may participate in.
* Invoked by <code>containsBean</code> when no cached singleton instance is found.
* Invoked by {@code containsBean} when no cached singleton instance is found.
* <p>Depending on the nature of the concrete bean factory implementation,
* this operation might be expensive (for example, because of directory lookups
* in external registries). However, for listable bean factories, this usually
@@ -1537,7 +1537,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
* public interface there. The same implementation can serve for both this
* template method and the public interface method in that case.
* @param beanName the name of the bean to find a definition for
* @return the BeanDefinition for this prototype name (never <code>null</code>)
* @return the BeanDefinition for this prototype name (never {@code null})
* @throws org.springframework.beans.factory.NoSuchBeanDefinitionException
* if the bean definition cannot be resolved
* @throws BeansException in case of errors
@@ -1557,7 +1557,7 @@ public abstract class AbstractBeanFactory extends FactoryBeanRegistrySupport imp
* @param beanName the name of the bean
* @param mbd the merged bean definition for the bean
* @param args arguments to use if creating a prototype using explicit arguments to a
* static factory method. This parameter must be <code>null</code> except in this case.
* static factory method. This parameter must be {@code null} except in this case.
* @return a new instance of the bean
* @throws BeanCreationException if the bean could not be created
*/

View File

@@ -59,7 +59,7 @@ public class AutowireCandidateQualifier extends BeanMetadataAttributeAccessor {
/**
* Construct a qualifier to match against an annotation of the
* given type whose <code>value</code> attribute also matches
* given type whose {@code value} attribute also matches
* the specified value.
* @param type the annotation type
* @param value the annotation value to match
@@ -70,7 +70,7 @@ public class AutowireCandidateQualifier extends BeanMetadataAttributeAccessor {
/**
* Construct a qualifier to match against an annotation of the
* given type name whose <code>value</code> attribute also matches
* given type name whose {@code value} attribute also matches
* the specified value.
* <p>The type name may match the fully-qualified class name of
* the annotation or the short class name (without the package).

View File

@@ -42,7 +42,7 @@ public interface AutowireCandidateResolver {
* Determine whether a default value is suggested for the given dependency.
* @param descriptor the descriptor for the target method parameter or field
* @return the value suggested (typically an expression String),
* or <code>null</code> if none found
* or {@code null} if none found
* @since 3.0
*/
Object getSuggestedValue(DependencyDescriptor descriptor);

View File

@@ -33,7 +33,7 @@ import org.springframework.util.ObjectUtils;
public class BeanDefinitionBuilder {
/**
* Create a new <code>BeanDefinitionBuilder</code> used to construct a {@link GenericBeanDefinition}.
* Create a new {@code BeanDefinitionBuilder} used to construct a {@link GenericBeanDefinition}.
*/
public static BeanDefinitionBuilder genericBeanDefinition() {
BeanDefinitionBuilder builder = new BeanDefinitionBuilder();
@@ -42,8 +42,8 @@ public class BeanDefinitionBuilder {
}
/**
* Create a new <code>BeanDefinitionBuilder</code> used to construct a {@link GenericBeanDefinition}.
* @param beanClass the <code>Class</code> of the bean that the definition is being created for
* Create a new {@code BeanDefinitionBuilder} used to construct a {@link GenericBeanDefinition}.
* @param beanClass the {@code Class} of the bean that the definition is being created for
*/
public static BeanDefinitionBuilder genericBeanDefinition(Class beanClass) {
BeanDefinitionBuilder builder = new BeanDefinitionBuilder();
@@ -53,7 +53,7 @@ public class BeanDefinitionBuilder {
}
/**
* Create a new <code>BeanDefinitionBuilder</code> used to construct a {@link GenericBeanDefinition}.
* Create a new {@code BeanDefinitionBuilder} used to construct a {@link GenericBeanDefinition}.
* @param beanClassName the class name for the bean that the definition is being created for
*/
public static BeanDefinitionBuilder genericBeanDefinition(String beanClassName) {
@@ -64,16 +64,16 @@ public class BeanDefinitionBuilder {
}
/**
* Create a new <code>BeanDefinitionBuilder</code> used to construct a {@link RootBeanDefinition}.
* @param beanClass the <code>Class</code> of the bean that the definition is being created for
* Create a new {@code BeanDefinitionBuilder} used to construct a {@link RootBeanDefinition}.
* @param beanClass the {@code Class} of the bean that the definition is being created for
*/
public static BeanDefinitionBuilder rootBeanDefinition(Class beanClass) {
return rootBeanDefinition(beanClass, null);
}
/**
* Create a new <code>BeanDefinitionBuilder</code> used to construct a {@link RootBeanDefinition}.
* @param beanClass the <code>Class</code> of the bean that the definition is being created for
* Create a new {@code BeanDefinitionBuilder} used to construct a {@link RootBeanDefinition}.
* @param beanClass the {@code Class} of the bean that the definition is being created for
* @param factoryMethodName the name of the method to use to construct the bean instance
*/
public static BeanDefinitionBuilder rootBeanDefinition(Class beanClass, String factoryMethodName) {
@@ -85,7 +85,7 @@ public class BeanDefinitionBuilder {
}
/**
* Create a new <code>BeanDefinitionBuilder</code> used to construct a {@link RootBeanDefinition}.
* Create a new {@code BeanDefinitionBuilder} used to construct a {@link RootBeanDefinition}.
* @param beanClassName the class name for the bean that the definition is being created for
*/
public static BeanDefinitionBuilder rootBeanDefinition(String beanClassName) {
@@ -93,7 +93,7 @@ public class BeanDefinitionBuilder {
}
/**
* Create a new <code>BeanDefinitionBuilder</code> used to construct a {@link RootBeanDefinition}.
* Create a new {@code BeanDefinitionBuilder} used to construct a {@link RootBeanDefinition}.
* @param beanClassName the class name for the bean that the definition is being created for
* @param factoryMethodName the name of the method to use to construct the bean instance
*/
@@ -106,7 +106,7 @@ public class BeanDefinitionBuilder {
}
/**
* Create a new <code>BeanDefinitionBuilder</code> used to construct a {@link ChildBeanDefinition}.
* Create a new {@code BeanDefinitionBuilder} used to construct a {@link ChildBeanDefinition}.
* @param parentName the name of the parent bean
*/
public static BeanDefinitionBuilder childBeanDefinition(String parentName) {
@@ -117,7 +117,7 @@ public class BeanDefinitionBuilder {
/**
* The <code>BeanDefinition</code> instance we are creating.
* The {@code BeanDefinition} instance we are creating.
*/
private AbstractBeanDefinition beanDefinition;

View File

@@ -19,7 +19,7 @@ package org.springframework.beans.factory.support;
import org.springframework.util.StringUtils;
/**
* A simple holder for <code>BeanDefinition</code> property defaults.
* A simple holder for {@code BeanDefinition} property defaults.
*
* @author Mark Fisher
* @since 2.5

View File

@@ -46,27 +46,27 @@ public interface BeanDefinitionReader {
BeanDefinitionRegistry getRegistry();
/**
* Return the resource loader to use for resource locations.
* Can be checked for the <b>ResourcePatternResolver</b> interface and cast
* accordingly, for loading multiple resources for a given resource pattern.
* <p>Null suggests that absolute resource loading is not available
* for this bean definition reader.
* <p>This is mainly meant to be used for importing further resources
* from within a bean definition resource, for example via the "import"
* tag in XML bean definitions. It is recommended, however, to apply
* such imports relative to the defining resource; only explicit full
* resource locations will trigger absolute resource loading.
* <p>There is also a <code>loadBeanDefinitions(String)</code> method available,
* for loading bean definitions from a resource location (or location pattern).
* This is a convenience to avoid explicit ResourceLoader handling.
* @see #loadBeanDefinitions(String)
* @see org.springframework.core.io.support.ResourcePatternResolver
*/
* Return the resource loader to use for resource locations.
* Can be checked for the <b>ResourcePatternResolver</b> interface and cast
* accordingly, for loading multiple resources for a given resource pattern.
* <p>Null suggests that absolute resource loading is not available
* for this bean definition reader.
* <p>This is mainly meant to be used for importing further resources
* from within a bean definition resource, for example via the "import"
* tag in XML bean definitions. It is recommended, however, to apply
* such imports relative to the defining resource; only explicit full
* resource locations will trigger absolute resource loading.
* <p>There is also a {@code loadBeanDefinitions(String)} method available,
* for loading bean definitions from a resource location (or location pattern).
* This is a convenience to avoid explicit ResourceLoader handling.
* @see #loadBeanDefinitions(String)
* @see org.springframework.core.io.support.ResourcePatternResolver
*/
ResourceLoader getResourceLoader();
/**
* Return the class loader to use for bean classes.
* <p><code>null</code> suggests to not load bean classes eagerly
* <p>{@code null} suggests to not load bean classes eagerly
* but rather to just register bean definitions with class names,
* with the corresponding Classes to be resolved later (or never).
*/

View File

@@ -49,7 +49,7 @@ public class BeanDefinitionReaderUtils {
* @param parentName the name of the parent bean, if any
* @param className the name of the bean class, if any
* @param classLoader the ClassLoader to use for loading bean classes
* (can be <code>null</code> to just register bean classes by name)
* (can be {@code null} to just register bean classes by name)
* @return the bean definition
* @throws ClassNotFoundException if the bean class could not be loaded
*/

View File

@@ -71,7 +71,7 @@ public interface BeanDefinitionRegistry extends AliasRegistry {
/**
* Return the BeanDefinition for the given bean name.
* @param beanName name of the bean to find a definition for
* @return the BeanDefinition for the given name (never <code>null</code>)
* @return the BeanDefinition for the given name (never {@code null})
* @throws NoSuchBeanDefinitionException if there is no such bean definition
*/
BeanDefinition getBeanDefinition(String beanName) throws NoSuchBeanDefinitionException;

View File

@@ -94,7 +94,7 @@ class BeanDefinitionValueResolver {
* Collections that will need to be resolved.
* <li>A ManagedMap. In this case the value may be a RuntimeBeanReference
* or Collection that will need to be resolved.
* <li>An ordinary object or <code>null</code>, in which case it's left alone.
* <li>An ordinary object or {@code null}, in which case it's left alone.
* @param argName the name of the argument that the value is defined for
* @param value the value object to resolve
* @return the resolved object
@@ -232,7 +232,7 @@ class BeanDefinitionValueResolver {
/**
* Resolve the target type in the given TypedStringValue.
* @param value the TypedStringValue to resolve
* @return the resolved target type (or <code>null</code> if none specified)
* @return the resolved target type (or {@code null} if none specified)
* @throws ClassNotFoundException if the specified type cannot be resolved
* @see TypedStringValue#resolveTargetType
*/

Some files were not shown because too many files have changed in this diff Show More