Remove trailing whitespace in source files
find . -type f -name "*.java" -or -name "*.aj" | \
xargs perl -p -i -e "s/[ \t]*$//g" {} \;
Issue: SPR-10127
This commit is contained in:
committed by
Chris Beams
parent
44a474a014
commit
1762157ad1
@@ -38,7 +38,7 @@ public @interface CacheEvict {
|
||||
|
||||
/**
|
||||
* Qualifier value for the specified cached operation.
|
||||
* <p>May be used to determine the target cache (or caches), matching the qualifier
|
||||
* <p>May be used to determine the target cache (or caches), matching the qualifier
|
||||
* value (or the bean name(s)) of (a) specific bean definition.
|
||||
*/
|
||||
String[] value();
|
||||
@@ -50,7 +50,7 @@ public @interface CacheEvict {
|
||||
String key() default "";
|
||||
|
||||
/**
|
||||
* Spring Expression Language (SpEL) attribute used for conditioning the method caching.
|
||||
* Spring Expression Language (SpEL) attribute used for conditioning the method caching.
|
||||
* <p>Default is "", meaning the method is always cached.
|
||||
*/
|
||||
String condition() default "";
|
||||
|
||||
@@ -52,7 +52,7 @@ public @interface Cacheable {
|
||||
String key() default "";
|
||||
|
||||
/**
|
||||
* Spring Expression Language (SpEL) attribute used for conditioning the method caching.
|
||||
* Spring Expression Language (SpEL) attribute used for conditioning the method caching.
|
||||
* <p>Default is "", meaning the method is always cached.
|
||||
*/
|
||||
String condition() default "";
|
||||
|
||||
@@ -223,7 +223,7 @@ public abstract class CacheAspectSupport implements InitializingBean {
|
||||
|
||||
return invoker.invoke();
|
||||
}
|
||||
|
||||
|
||||
private void inspectBeforeCacheEvicts(Collection<CacheOperationContext> evictions) {
|
||||
inspectCacheEvicts(evictions, true);
|
||||
}
|
||||
@@ -326,7 +326,7 @@ public abstract class CacheAspectSupport implements InitializingBean {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// return a status only if at least on cacheable matched
|
||||
if (atLeastOnePassed) {
|
||||
return new CacheStatus(cUpdates, updateRequire, retVal);
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.beans.factory.config.AutowireCapableBeanFactory;
|
||||
import org.springframework.core.env.EnvironmentCapable;
|
||||
import org.springframework.core.io.support.ResourcePatternResolver;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Central interface to provide configuration for an application.
|
||||
* This is read-only while the application is running, but may be
|
||||
* reloaded if the implementation supports this.
|
||||
|
||||
@@ -57,8 +57,8 @@ import org.springframework.beans.factory.Aware;
|
||||
* @see org.springframework.beans.factory.BeanFactoryAware
|
||||
*/
|
||||
public interface ApplicationContextAware extends Aware {
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Set the ApplicationContext that this object runs in.
|
||||
* Normally this call will be used to initialize the object.
|
||||
* <p>Invoked after population of normal bean properties but before an init callback such
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2005 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -24,8 +24,8 @@ package org.springframework.context;
|
||||
* @author Juergen Hoeller
|
||||
*/
|
||||
public interface HierarchicalMessageSource extends MessageSource {
|
||||
|
||||
/**
|
||||
|
||||
/**
|
||||
* Set the parent that will be used to try to resolve messages
|
||||
* that this object can't resolve.
|
||||
* @param parent the parent MessageSource that will be used to
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.context;
|
||||
/**
|
||||
* Interface for objects that are suitable for message resolution in a
|
||||
* {@link MessageSource}.
|
||||
*
|
||||
*
|
||||
* <p>Spring's own validation error classes implement this interface.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2005 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
@@ -19,7 +19,7 @@ package org.springframework.context;
|
||||
/**
|
||||
* Interface for objects that may participate in a phased
|
||||
* process such as lifecycle management.
|
||||
*
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @since 3.0
|
||||
* @see SmartLifecycle
|
||||
|
||||
@@ -46,7 +46,7 @@ import org.springframework.core.io.ResourceLoader;
|
||||
* <p>As alternative to a ResourcePatternResolver dependency, consider exposing
|
||||
* bean properties of type Resource array, populated via pattern Strings with
|
||||
* automatic type conversion by the bean factory.
|
||||
*
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @author Chris Beams
|
||||
* @since 10.03.2004
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2005 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -59,7 +59,7 @@ public class ContextBeanFactoryReference implements BeanFactoryReference {
|
||||
public void release() {
|
||||
if (this.applicationContext != null) {
|
||||
ApplicationContext savedCtx;
|
||||
|
||||
|
||||
// We don't actually guarantee thread-safety, but it's not a lot of extra work.
|
||||
synchronized (this) {
|
||||
savedCtx = this.applicationContext;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2005 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
/**
|
||||
*
|
||||
* Helper infrastructure to locate and access shared application contexts.
|
||||
*
|
||||
*
|
||||
* <p><b>Note: This package is only relevant for special sharing of application
|
||||
* contexts, for example behind EJB facades. It is <i>not</i> used in a typical
|
||||
* web application or standalone application.</b>
|
||||
|
||||
@@ -37,7 +37,7 @@ import org.springframework.util.StringUtils;
|
||||
* {@link org.springframework.stereotype.Component @Component} as a
|
||||
* meta-annotation. For example, Spring's stereotype annotations (such as
|
||||
* {@link org.springframework.stereotype.Repository @Repository}) are
|
||||
* themselves annotated with
|
||||
* themselves annotated with
|
||||
* {@link org.springframework.stereotype.Component @Component}.
|
||||
*
|
||||
* <p>Also supports Java EE 6's {@link javax.annotation.ManagedBean} and
|
||||
|
||||
@@ -118,7 +118,7 @@ import org.springframework.beans.factory.support.AbstractBeanDefinition;
|
||||
* the invocation via a CGLIB proxy. This is analogous to inter-{@code @Transactional}
|
||||
* method calls where in proxy mode, Spring does not intercept the invocation —
|
||||
* Spring does so only in AspectJ mode.
|
||||
*
|
||||
*
|
||||
* <p>For example:
|
||||
*
|
||||
* <pre class="code">
|
||||
|
||||
@@ -256,7 +256,7 @@ public class ClassPathBeanDefinitionScanner extends ClassPathScanningCandidateCo
|
||||
beanDefinitions.add(definitionHolder);
|
||||
registerBeanDefinition(definitionHolder, this.registry);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return beanDefinitions;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@ import org.springframework.util.StringUtils;
|
||||
* to specify a custom CommonAnnotationBeanPostProcessor bean definition!
|
||||
* <p><b>NOTE:</b> Annotation injection will be performed <i>before</i> XML injection; thus
|
||||
* the latter configuration will override the former for properties wired through
|
||||
* both approaches.
|
||||
* both approaches.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.5
|
||||
|
||||
@@ -178,7 +178,7 @@ final class ConfigurationClass {
|
||||
int newCount = currentCount != null ? currentCount + 1 : 1;
|
||||
methodNameCounts.put(fqMethodName, newCount);
|
||||
}
|
||||
|
||||
|
||||
for (String methodName : methodNameCounts.keySet()) {
|
||||
int count = methodNameCounts.get(methodName);
|
||||
if (count > 1) {
|
||||
@@ -186,7 +186,7 @@ final class ConfigurationClass {
|
||||
problemReporter.error(new BeanMethodOverloadingProblem(shortMethodName, count));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// A configuration class may not be final (CGLIB limitation)
|
||||
if (getMetadata().isAnnotated(Configuration.class.getName())) {
|
||||
if (getMetadata().isFinal()) {
|
||||
|
||||
@@ -333,7 +333,7 @@ class ConfigurationClassBeanDefinitionReader {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Configuration classes must be annotated with {@link Configuration @Configuration} or
|
||||
* declare at least one {@link Bean @Bean} method.
|
||||
|
||||
@@ -79,7 +79,7 @@ import static org.springframework.context.annotation.AnnotationConfigUtils.*;
|
||||
* that any {@link Bean} methods declared in Configuration classes have their
|
||||
* respective bean definitions registered before any other BeanFactoryPostProcessor
|
||||
* executes.
|
||||
*
|
||||
*
|
||||
* @author Chris Beams
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.0
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.stereotype.Component;
|
||||
* When used as a type-level annotation in conjunction with the {@link Component}
|
||||
* annotation, indicates the name of a scope to use for instances of the annotated
|
||||
* type.
|
||||
*
|
||||
*
|
||||
* <p>When used as a method-level annotation in conjunction with the
|
||||
* {@link Bean} annotation, indicates the name of a scope to use for
|
||||
* the instance returned from the method.
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.springframework.util.Assert;
|
||||
public class ScopeMetadata {
|
||||
|
||||
private String scopeName = BeanDefinition.SCOPE_SINGLETON;
|
||||
|
||||
|
||||
private ScopedProxyMode scopedProxyMode = ScopedProxyMode.NO;
|
||||
|
||||
|
||||
|
||||
@@ -20,7 +20,7 @@ import org.springframework.beans.factory.config.BeanDefinition;
|
||||
|
||||
/**
|
||||
* Strategy interface for resolving the scope of bean definitions.
|
||||
*
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @since 2.5
|
||||
* @see org.springframework.context.annotation.Scope
|
||||
@@ -40,5 +40,5 @@ public interface ScopeMetadataResolver {
|
||||
* @return the relevant scope metadata; never <code>null</code>
|
||||
*/
|
||||
ScopeMetadata resolveScopeMetadata(BeanDefinition definition);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -34,7 +34,7 @@ class PropertyOverrideBeanDefinitionParser extends AbstractPropertyLoadingBeanDe
|
||||
protected Class getBeanClass(Element element) {
|
||||
return PropertyOverrideConfigurer.class;
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected void doParse(Element element, BeanDefinitionBuilder builder) {
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ import org.springframework.util.StringUtils;
|
||||
* Standard implementation of the
|
||||
* {@link org.springframework.beans.factory.config.BeanExpressionResolver}
|
||||
* interface, parsing and evaluating Spring EL using Spring's expression module.
|
||||
*
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
* @since 3.0
|
||||
* @see org.springframework.expression.ExpressionParser
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
* message sources and for the Observer design pattern, and the
|
||||
* ability for application objects to obtain resources using a
|
||||
* consistent API.
|
||||
*
|
||||
*
|
||||
* <p>There is no necessity for Spring applications to depend
|
||||
* on ApplicationContext or even BeanFactory functionality
|
||||
* explicitly. One of the strengths of the Spring architecture
|
||||
|
||||
@@ -91,10 +91,10 @@ class ApplicationContextAwareProcessor implements BeanPostProcessor {
|
||||
else {
|
||||
invokeAwareInterfaces(bean);
|
||||
}
|
||||
|
||||
|
||||
return bean;
|
||||
}
|
||||
|
||||
|
||||
private void invokeAwareInterfaces(Object bean) {
|
||||
if (bean instanceof Aware) {
|
||||
if (bean instanceof EnvironmentAware) {
|
||||
|
||||
@@ -45,10 +45,10 @@ import org.springframework.context.ApplicationContextException;
|
||||
* @see org.springframework.web.context.support.WebApplicationObjectSupport
|
||||
*/
|
||||
public abstract class ApplicationObjectSupport implements ApplicationContextAware {
|
||||
|
||||
|
||||
/** Logger that is available to subclasses */
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
|
||||
/** ApplicationContext this object runs in */
|
||||
private ApplicationContext applicationContext;
|
||||
|
||||
|
||||
@@ -81,7 +81,7 @@ public class ConversionServiceFactoryBean implements FactoryBean<ConversionServi
|
||||
|
||||
|
||||
// implementing FactoryBean
|
||||
|
||||
|
||||
public ConversionService getObject() {
|
||||
return this.conversionService;
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2005 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.springframework.remoting.rmi.RmiClientInterceptorUtils;
|
||||
* @author Juergen Hoeller
|
||||
*/
|
||||
public abstract class AbstractRemoteSlsbInvokerInterceptor extends AbstractSlsbInvokerInterceptor {
|
||||
|
||||
|
||||
private Class homeInterface;
|
||||
|
||||
private boolean refreshHomeOnConnectFailure = false;
|
||||
|
||||
@@ -42,7 +42,7 @@ import org.aopalliance.intercept.MethodInvocation;
|
||||
* bound at the target location yet. The best solution is to set the lookupHomeOnStartup
|
||||
* property to false, in which case the home will be fetched on first access to the EJB.
|
||||
* (This flag is only true by default for backwards compatibility reasons).
|
||||
*
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Juergen Hoeller
|
||||
* @see AbstractSlsbInvokerInterceptor#setLookupHomeOnStartup
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.util.ClassUtils;
|
||||
*
|
||||
* <p>See {@link org.springframework.jndi.JndiObjectLocator} for info on
|
||||
* how to specify the JNDI location of the target EJB.
|
||||
*
|
||||
*
|
||||
* <p>If you want control over interceptor chaining, use an AOP ProxyFactoryBean
|
||||
* with LocalSlsbInvokerInterceptor rather than rely on this class.
|
||||
*
|
||||
@@ -41,7 +41,7 @@ import org.springframework.util.ClassUtils;
|
||||
* bound at the target location yet. The best solution is to set the "lookupHomeOnStartup"
|
||||
* property to "false", in which case the home will be fetched on first access to the EJB.
|
||||
* (This flag is only true by default for backwards compatibility reasons).
|
||||
*
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @author Colin Sampaleanu
|
||||
* @since 09.05.2003
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.util.ClassUtils;
|
||||
*
|
||||
* <p>See {@link org.springframework.jndi.JndiObjectLocator} for info on
|
||||
* how to specify the JNDI location of the target EJB.
|
||||
*
|
||||
*
|
||||
* <p>If you want control over interceptor chaining, use an AOP ProxyFactoryBean
|
||||
* with SimpleRemoteSlsbInvokerInterceptor rather than rely on this class.
|
||||
*
|
||||
@@ -41,7 +41,7 @@ import org.springframework.util.ClassUtils;
|
||||
* bound at the target location yet. The best solution is to set the lookupHomeOnStartup
|
||||
* property to false, in which case the home will be fetched on first access to the EJB.
|
||||
* (This flag is only true by default for backwards compatibility reasons).
|
||||
*
|
||||
*
|
||||
* <p>This proxy factory is typically used with an RMI business interface, which serves
|
||||
* as super-interface of the EJB component interface. Alternatively, this factory
|
||||
* can also proxy a remote SLSB with a matching non-RMI business interface, i.e. an
|
||||
|
||||
@@ -12,11 +12,11 @@
|
||||
* or may not be EJBs). This gives us the choice of introducing EJB
|
||||
* into an application (or removing EJB from an application) without
|
||||
* affecting code using business objects.
|
||||
*
|
||||
*
|
||||
* <p>The motivation for the classes in this package are discussed in Chapter 11 of
|
||||
* <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/">Expert One-On-One J2EE Design and Development</a>
|
||||
* by Rod Johnson (Wrox, 2002).
|
||||
*
|
||||
*
|
||||
* <p>However, the implementation and naming of classes in this package has changed.
|
||||
* It now uses FactoryBeans and AOP, rather than the custom bean definitions described in
|
||||
* <i>Expert One-on-One J2EE</i>.
|
||||
|
||||
@@ -18,7 +18,7 @@ package org.springframework.ejb.support;
|
||||
|
||||
import javax.jms.MessageListener;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Convenient base class for JMS-based EJB 2.x MDBs. Requires subclasses
|
||||
* to implement the JMS <code>javax.jms.MessageListener</code> interface.
|
||||
*
|
||||
@@ -31,4 +31,4 @@ public abstract class AbstractJmsMessageDrivenBean extends AbstractMessageDriven
|
||||
// Empty: The purpose of this class is to ensure
|
||||
// that subclasses implement <code>javax.jms.MessageListener</code>.
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ import javax.ejb.MessageDrivenContext;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
/**
|
||||
* Convenient base class for EJB 2.x MDBs.
|
||||
* Doesn't require JMS, as EJB 2.1 MDBs are no longer JMS-specific;
|
||||
* see the {@link AbstractJmsMessageDrivenBean} subclass.
|
||||
|
||||
@@ -29,7 +29,7 @@ import org.springframework.beans.FatalBeanException;
|
||||
* method in their custom <code>ejbCreate()</code> and <code>ejbActivate()</code>
|
||||
* methods, and should invoke the <code>unloadBeanFactory()</code> method in
|
||||
* their <code>ejbPassivate</code> method.</b>
|
||||
*
|
||||
*
|
||||
* <p><b>Note: The default BeanFactoryLocator used by this class's superclass
|
||||
* (ContextJndiBeanFactoryLocator) is <b>not</b> serializable. Therefore,
|
||||
* when using the default BeanFactoryLocator, or another variant which is
|
||||
|
||||
@@ -6,17 +6,17 @@
|
||||
* This promotes good EJB practice, with EJB services used for transaction
|
||||
* management, thread management, and (possibly) remoting, while
|
||||
* business logic is implemented in easily testable POJOs.</p>
|
||||
*
|
||||
*
|
||||
* <p>In this model, the EJB is a facade, with as many POJO helpers
|
||||
* behind the BeanFactory as required.</p>
|
||||
*
|
||||
*
|
||||
* <p>Note that the default behavior is to look for an EJB environment variable
|
||||
* with name <code>ejb/BeanFactoryPath</code> that specifies the
|
||||
* location <i>on the classpath</i> of an XML bean factory definition
|
||||
* file (such as <code>/com/mycom/mypackage/mybeans.xml</code>).
|
||||
* If this JNDI key is missing, your EJB subclass won't successfully
|
||||
* initialize in the container.</p>
|
||||
*
|
||||
*
|
||||
* <p><b>Check out the <code>org.springframework.ejb.interceptor</code>
|
||||
* package for equivalent support for the EJB 3 component model</b>,
|
||||
* providing annotation-based autowiring using an EJB 3 interceptor.</p>
|
||||
|
||||
@@ -25,7 +25,7 @@ import java.util.Set;
|
||||
* that formats <code>Date</code> values set on fields annotated with <code>@DateTimeFormat</code>.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
* @since 3.0
|
||||
* @param <A> the annotation type that should trigger formatting
|
||||
*/
|
||||
public interface AnnotationFormatterFactory<A extends Annotation> {
|
||||
@@ -52,5 +52,5 @@ public interface AnnotationFormatterFactory<A extends Annotation> {
|
||||
* @return the parser
|
||||
*/
|
||||
Parser<?> getParser(A annotation, Class<?> fieldType);
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ package org.springframework.format;
|
||||
* A Formatter is both a Printer <i>and</i> a Parser for an object type.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
* @since 3.0
|
||||
* @param <T> the type of object this Formatter formats
|
||||
*/
|
||||
public interface Formatter<T> extends Printer<T>, Parser<T> {
|
||||
|
||||
@@ -20,14 +20,14 @@ import org.springframework.core.convert.converter.Converter;
|
||||
/**
|
||||
* Registers {@link Converter Converters} and {@link Formatter Formatters} with
|
||||
* a FormattingConversionService through the {@link FormatterRegistry} SPI.
|
||||
*
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.1
|
||||
*/
|
||||
public interface FormatterRegistrar {
|
||||
|
||||
/**
|
||||
* Register Formatters and Converters with a FormattingConversionService
|
||||
* Register Formatters and Converters with a FormattingConversionService
|
||||
* through a FormatterRegistry SPI.
|
||||
* @param registry the FormatterRegistry instance to use.
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,7 @@ import java.util.Locale;
|
||||
* Parses text strings to produce instances of T.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
* @since 3.0
|
||||
* @param <T> the type of object this Parser produces
|
||||
*/
|
||||
public interface Parser<T> {
|
||||
|
||||
@@ -22,7 +22,7 @@ import java.util.Locale;
|
||||
* Prints objects of type T for display.
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
* @since 3.0
|
||||
* @param <T> the type of object this Printer prints
|
||||
*/
|
||||
public interface Printer<T> {
|
||||
|
||||
@@ -26,13 +26,13 @@ import java.lang.annotation.Target;
|
||||
* Supports formatting by style or custom pattern string.
|
||||
* Can be applied to any JDK <code>java.lang.Number</code> type.
|
||||
* <p>
|
||||
* For style-based formatting, set the {@link #style()} attribute to be the desired {@link Style}.
|
||||
* For style-based formatting, set the {@link #style()} attribute to be the desired {@link Style}.
|
||||
* For custom formatting, set the {@link #pattern()} attribute to be the number pattern, such as <code>#,###.##</code>.
|
||||
* <p>
|
||||
* Each attribute is mutually exclusive, so only set one attribute per annotation instance (the one most convenient one for your formatting needs).
|
||||
* When the pattern attribute is specified, it takes precedence over the style attribute.
|
||||
* When no annotation attributes are specified, the default format applied is style-based with a style of {@link Style#NUMBER}.
|
||||
*
|
||||
*
|
||||
* @author Keith Donald
|
||||
* @since 3.0
|
||||
* @see java.text.NumberFormat
|
||||
@@ -67,7 +67,7 @@ public @interface NumberFormat {
|
||||
* The general-purpose number format for the current locale.
|
||||
*/
|
||||
NUMBER,
|
||||
|
||||
|
||||
/**
|
||||
* The currency format for the current locale.
|
||||
*/
|
||||
|
||||
@@ -76,7 +76,7 @@ public class NumberFormatAnnotationFormatterFactory
|
||||
public Printer<Number> getPrinter(NumberFormat annotation, Class<?> fieldType) {
|
||||
return configureFormatterFrom(annotation);
|
||||
}
|
||||
|
||||
|
||||
public Parser<Number> getParser(NumberFormat annotation, Class<?> fieldType) {
|
||||
return configureFormatterFrom(annotation);
|
||||
}
|
||||
|
||||
@@ -96,15 +96,15 @@ public class FormattingConversionServiceFactoryBean
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Configure the set of FormatterRegistrars to invoke to register
|
||||
* Converters and Formatters in addition to those added declaratively
|
||||
* <p>Configure the set of FormatterRegistrars to invoke to register
|
||||
* Converters and Formatters in addition to those added declaratively
|
||||
* via {@link #setConverters(Set)} and {@link #setFormatters(Set)}.
|
||||
* <p>FormatterRegistrars are useful when registering multiple related
|
||||
* converters and formatters for a formatting category, such as Date
|
||||
* formatting. All types related needed to support the formatting
|
||||
* <p>FormatterRegistrars are useful when registering multiple related
|
||||
* converters and formatters for a formatting category, such as Date
|
||||
* formatting. All types related needed to support the formatting
|
||||
* category can be registered from one place.
|
||||
* <p>FormatterRegistrars can also be used to register Formatters
|
||||
* indexed under a specific field type different from its own <T>,
|
||||
* <p>FormatterRegistrars can also be used to register Formatters
|
||||
* indexed under a specific field type different from its own <T>,
|
||||
* or when registering a Formatter from a Printer/Parser pair.
|
||||
* @see FormatterRegistry#addFormatterForFieldType(Class, Formatter)
|
||||
* @see FormatterRegistry#addFormatterForFieldType(Class, Printer, Parser)
|
||||
|
||||
@@ -34,7 +34,7 @@ import org.springframework.util.Assert;
|
||||
* @since 2.0
|
||||
*/
|
||||
public class ResourceOverridingShadowingClassLoader extends ShadowingClassLoader {
|
||||
|
||||
|
||||
private static final Enumeration<URL> EMPTY_URL_ENUMERATION = new Enumeration<URL>() {
|
||||
public boolean hasMoreElements() {
|
||||
return false;
|
||||
@@ -43,7 +43,7 @@ public class ResourceOverridingShadowingClassLoader extends ShadowingClassLoader
|
||||
throw new UnsupportedOperationException("Should not be called. I am empty.");
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Key is asked for value: value is actual value
|
||||
@@ -59,7 +59,7 @@ public class ResourceOverridingShadowingClassLoader extends ShadowingClassLoader
|
||||
public ResourceOverridingShadowingClassLoader(ClassLoader enclosingClassLoader) {
|
||||
super(enclosingClassLoader);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Return the resource (if any) at the new path
|
||||
@@ -70,7 +70,7 @@ public class ResourceOverridingShadowingClassLoader extends ShadowingClassLoader
|
||||
public void override(String oldPath, String newPath) {
|
||||
this.overrides.put(oldPath, newPath);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Ensure that a resource with the given path is not found.
|
||||
* @param oldPath the path of the resource to hide even if
|
||||
@@ -111,7 +111,7 @@ public class ResourceOverridingShadowingClassLoader extends ShadowingClassLoader
|
||||
return super.getResourceAsStream(requestedPath);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Enumeration<URL> getResources(String requestedPath) throws IOException {
|
||||
if (this.overrides.containsKey(requestedPath)) {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -24,9 +24,9 @@ import java.lang.reflect.Method;
|
||||
* Reflective wrapper around the GlassFish class loader. Used to
|
||||
* encapsulate the classloader-specific methods (discovered and
|
||||
* called through reflection) from the load-time weaver.
|
||||
*
|
||||
*
|
||||
* <p>Supports GlassFish V1, V2 and V3 (currently in beta).
|
||||
*
|
||||
*
|
||||
* @author Costin Leau
|
||||
* @since 3.0
|
||||
*/
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
/**
|
||||
* Reflective wrapper around a JBoss 5 and 6 class loader methods (discovered and called
|
||||
* through reflection) for load time weaving.
|
||||
*
|
||||
*
|
||||
* @author Costin Leau
|
||||
* @since 3.1
|
||||
*/
|
||||
|
||||
@@ -23,10 +23,10 @@ import java.security.ProtectionDomain;
|
||||
/**
|
||||
* Adapter that implements JBoss Translator interface, delegating to a
|
||||
* standard JDK {@link ClassFileTransformer} underneath.
|
||||
*
|
||||
*
|
||||
* <p>To avoid compile time checks again the vendor API, a dynamic proxy is
|
||||
* being used.
|
||||
*
|
||||
*
|
||||
* @author Costin Leau
|
||||
* @since 3.1
|
||||
*/
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2006-2009 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -26,7 +26,7 @@ import org.springframework.util.Assert;
|
||||
* Reflective wrapper around a OC4J class loader. Used to
|
||||
* encapsulate the classloader-specific methods (discovered and
|
||||
* called through reflection) from the load-time weaver.
|
||||
*
|
||||
*
|
||||
* @author Costin Leau
|
||||
*/
|
||||
class OC4JClassLoaderAdapter {
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2006-2009 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -27,7 +27,7 @@ import java.security.ProtectionDomain;
|
||||
*
|
||||
* <p>To avoid compile time checks again the vendor API, a dynamic proxy is
|
||||
* being used.
|
||||
*
|
||||
*
|
||||
* @author Costin Leau
|
||||
*/
|
||||
class OC4JClassPreprocessorAdapter implements InvocationHandler {
|
||||
|
||||
@@ -45,7 +45,7 @@ public class OC4JLoadTimeWeaver implements LoadTimeWeaver {
|
||||
/**
|
||||
* Creates a new instance of thie {@link OC4JLoadTimeWeaver} class
|
||||
* using the default {@link ClassLoader class loader}.
|
||||
* @see org.springframework.util.ClassUtils#getDefaultClassLoader()
|
||||
* @see org.springframework.util.ClassUtils#getDefaultClassLoader()
|
||||
*/
|
||||
public OC4JLoadTimeWeaver() {
|
||||
this(ClassUtils.getDefaultClassLoader());
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2007 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -29,7 +29,7 @@ import org.springframework.util.Assert;
|
||||
* Reflective wrapper around a WebLogic 10 class loader. Used to
|
||||
* encapsulate the classloader-specific methods (discovered and
|
||||
* called through reflection) from the load-time weaver.
|
||||
*
|
||||
*
|
||||
* @author Costin Leau
|
||||
* @author Juergen Hoeller
|
||||
* @since 2.5
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2007 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
@@ -28,11 +28,11 @@ import java.util.List;
|
||||
import org.springframework.util.Assert;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* Reflective wrapper around a WebSphere 7 class loader. Used to
|
||||
* encapsulate the classloader-specific methods (discovered and
|
||||
* called through reflection) from the load-time weaver.
|
||||
*
|
||||
*
|
||||
* @author Costin Leau
|
||||
* @since 3.1
|
||||
*/
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2011 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@@ -25,10 +25,10 @@ import org.springframework.util.FileCopyUtils;
|
||||
/**
|
||||
* Adapter that implements WebSphere 7.0 ClassPreProcessPlugin interface,
|
||||
* delegating to a standard JDK {@link ClassFileTransformer} underneath.
|
||||
*
|
||||
*
|
||||
* <p>To avoid compile time checks again the vendor API, a dynamic proxy is
|
||||
* being used.
|
||||
*
|
||||
*
|
||||
* @author Costin Leau
|
||||
* @since 3.1
|
||||
*/
|
||||
|
||||
@@ -603,7 +603,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
|
||||
"Unable to register MBean [" + mapValue + "] with key '" + beanKey + "'", ex);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Replaces any bean names used as keys in the <code>NotificationListener</code>
|
||||
* mappings with their corresponding <code>ObjectName</code> values.
|
||||
@@ -782,8 +782,8 @@ public class MBeanExporter extends MBeanRegistrationSupport
|
||||
* interface for the supplied managed resource.
|
||||
* @param managedResource the resource that is to be exported as an MBean
|
||||
* @param beanKey the key associated with the managed bean
|
||||
* @see #createModelMBean()
|
||||
* @see #getMBeanInfo(Object, String)
|
||||
* @see #createModelMBean()
|
||||
* @see #getMBeanInfo(Object, String)
|
||||
*/
|
||||
protected ModelMBean createAndConfigureMBean(Object managedResource, String beanKey)
|
||||
throws MBeanExportException {
|
||||
@@ -1072,7 +1072,7 @@ public class MBeanExporter extends MBeanRegistrationSupport
|
||||
private class NotificationPublisherAwareLazyTargetSource extends LazyInitTargetSource {
|
||||
|
||||
private ModelMBean modelMBean;
|
||||
|
||||
|
||||
private ObjectName objectName;
|
||||
|
||||
public void setModelMBean(ModelMBean modelMBean) {
|
||||
|
||||
@@ -28,7 +28,7 @@ import org.springframework.jmx.support.MetricType;
|
||||
* JDK 1.5+ method-level annotation that indicates to expose a given bean
|
||||
* property as JMX attribute, with added Descriptor properties to indicate that
|
||||
* it is a metric. Only valid when used on a JavaBean getter.
|
||||
*
|
||||
*
|
||||
* @author Jennifer Hickey
|
||||
* @since 3.0
|
||||
* @see org.springframework.jmx.export.metadata.ManagedMetric
|
||||
|
||||
@@ -108,12 +108,12 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
|
||||
* Constant identifier for the log field in a JMX {@link Descriptor}.
|
||||
*/
|
||||
protected static final String FIELD_LOG = "log";
|
||||
|
||||
|
||||
/**
|
||||
* Constant identifier for the logfile field in a JMX {@link Descriptor}.
|
||||
*/
|
||||
protected static final String FIELD_LOG_FILE = "logFile";
|
||||
|
||||
|
||||
/**
|
||||
* Constant identifier for the currency time limit field in a JMX {@link Descriptor}.
|
||||
*/
|
||||
@@ -143,12 +143,12 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
|
||||
* Constant identifier for the persistName field in a JMX {@link Descriptor}.
|
||||
*/
|
||||
protected static final String FIELD_PERSIST_NAME = "persistName";
|
||||
|
||||
|
||||
/**
|
||||
* Constant identifier for the displayName field in a JMX {@link Descriptor}.
|
||||
*/
|
||||
protected static final String FIELD_DISPLAY_NAME = "displayName";
|
||||
|
||||
|
||||
/**
|
||||
* Constant identifier for the units field in a JMX {@link Descriptor}.
|
||||
*/
|
||||
@@ -158,7 +158,7 @@ public abstract class AbstractReflectiveMBeanInfoAssembler extends AbstractMBean
|
||||
* Constant identifier for the metricType field in a JMX {@link Descriptor}.
|
||||
*/
|
||||
protected static final String FIELD_METRIC_TYPE = "metricType";
|
||||
|
||||
|
||||
/**
|
||||
* Constant identifier for the custom metricCategory field in a JMX {@link Descriptor}.
|
||||
*/
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.springframework.util.StringUtils;
|
||||
/**
|
||||
* <code>AbstractReflectiveMBeanInfoAssembler</code> subclass that allows
|
||||
* method names to be explicitly excluded as MBean operations and attributes.
|
||||
*
|
||||
*
|
||||
* <p>Any method not explicitly excluded from the management interface will be exposed to
|
||||
* JMX. JavaBean getters and setters will automatically be exposed as JMX attributes.
|
||||
*
|
||||
|
||||
@@ -49,7 +49,7 @@ public interface JmxAttributeSource {
|
||||
* @throws InvalidMetadataException in case of invalid attributes
|
||||
*/
|
||||
ManagedAttribute getManagedAttribute(Method method) throws InvalidMetadataException;
|
||||
|
||||
|
||||
/**
|
||||
* Implementations should return an instance of <code>ManagedMetric</code>
|
||||
* if the supplied <code>Method</code> has the corresponding metadata.
|
||||
@@ -89,7 +89,7 @@ public interface JmxAttributeSource {
|
||||
* @throws InvalidMetadataException in the case of invalid metadata
|
||||
*/
|
||||
ManagedNotification[] getManagedNotifications(Class<?> clazz) throws InvalidMetadataException;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ import org.springframework.util.CollectionUtils;
|
||||
* <code>ObjectNamingStrategy</code> implementation that builds
|
||||
* <code>ObjectName</code> instances from the key used in the
|
||||
* "beans" map passed to <code>MBeanExporter</code>.
|
||||
*
|
||||
*
|
||||
* <p>Can also check object name mappings, given as <code>Properties</code>
|
||||
* or as <code>mappingLocations</code> of properties files. The key used
|
||||
* to look up is the key used in <code>MBeanExporter</code>'s "beans" map.
|
||||
@@ -123,7 +123,7 @@ public class KeyNamingStrategy implements ObjectNamingStrategy, InitializingBean
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Attempts to retrieve the <code>ObjectName</code> via the given key, trying to
|
||||
|
||||
@@ -64,7 +64,7 @@ public class ModelMBeanNotificationPublisher implements NotificationPublisher {
|
||||
* @param modelMBean the target {@link ModelMBean}; must not be <code>null</code>
|
||||
* @param objectName the {@link ObjectName} of the source {@link ModelMBean}
|
||||
* @param managedResource the managed resource exposed by the supplied {@link ModelMBean}
|
||||
* @throws IllegalArgumentException if any of the parameters is <code>null</code>
|
||||
* @throws IllegalArgumentException if any of the parameters is <code>null</code>
|
||||
*/
|
||||
public ModelMBeanNotificationPublisher(
|
||||
ModelMBeanNotificationBroadcaster modelMBean, ObjectName objectName, Object managedResource) {
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.springframework.util.CollectionUtils;
|
||||
* @see #execute
|
||||
*/
|
||||
public class JndiTemplate {
|
||||
|
||||
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
private Properties environment;
|
||||
@@ -200,7 +200,7 @@ public class JndiTemplate {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Rebind the given object to the current JNDI context, using the given name.
|
||||
* Overwrites any existing binding.
|
||||
@@ -236,5 +236,5 @@ public class JndiTemplate {
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2005 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
* The classes in this package make JNDI easier to use,
|
||||
* facilitating the accessing of configuration stored in JNDI,
|
||||
* and provide useful superclasses for JNDI access classes.
|
||||
*
|
||||
*
|
||||
* <p>The classes in this package are discussed in Chapter 11 of
|
||||
* <a href="http://www.amazon.com/exec/obidos/tg/detail/-/0764543857/">Expert One-On-One J2EE Design and Development</a>
|
||||
* by Rod Johnson (Wrox, 2002).
|
||||
|
||||
@@ -25,7 +25,7 @@ import org.springframework.util.ClassUtils;
|
||||
|
||||
/**
|
||||
* {@link FactoryBean} for RMI proxies from JNDI.
|
||||
*
|
||||
*
|
||||
* <p>Typically used for RMI-IIOP (CORBA), but can also be used for EJB home objects
|
||||
* (for example, a Stateful Session Bean home). In contrast to a plain JNDI lookup,
|
||||
* this accessor also performs narrowing through {@link javax.rmi.PortableRemoteObject}.
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.core.JdkVersion;
|
||||
|
||||
/**
|
||||
* General utilities for handling remote invocations.
|
||||
*
|
||||
*
|
||||
* <p>Mainly intended for use within the remoting framework.
|
||||
*
|
||||
* @author Juergen Hoeller
|
||||
|
||||
@@ -32,7 +32,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Parser for the 'annotation-driven' element of the 'task' namespace.
|
||||
*
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Juergen Hoeller
|
||||
* @author Ramnivas Laddad
|
||||
|
||||
@@ -30,7 +30,7 @@ import org.w3c.dom.NodeList;
|
||||
|
||||
/**
|
||||
* Parser for the 'scheduled-tasks' element of the scheduling namespace.
|
||||
*
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @author Chris Beams
|
||||
* @since 3.0
|
||||
|
||||
@@ -24,7 +24,7 @@ import org.springframework.util.StringUtils;
|
||||
|
||||
/**
|
||||
* Parser for the 'scheduler' element of the 'task' namespace.
|
||||
*
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @since 3.0
|
||||
*/
|
||||
|
||||
@@ -19,8 +19,8 @@ package org.springframework.scheduling.config;
|
||||
import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
|
||||
/**
|
||||
* <code>NamespaceHandler</code> for the 'task' namespace.
|
||||
*
|
||||
* <code>NamespaceHandler</code> for the 'task' namespace.
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @since 3.0
|
||||
*/
|
||||
|
||||
@@ -104,7 +104,7 @@ public class CronSequenceGenerator {
|
||||
4 If hour matches move on, otherwise find the next match
|
||||
4.1 If next match is in the next day then roll forwards,
|
||||
4.2 Reset the minutes and seconds and go to 2
|
||||
|
||||
|
||||
...
|
||||
*/
|
||||
|
||||
|
||||
@@ -86,7 +86,7 @@ public class CronTrigger implements Trigger {
|
||||
public int hashCode() {
|
||||
return this.sequenceGenerator.hashCode();
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return sequenceGenerator.toString();
|
||||
|
||||
@@ -39,7 +39,7 @@ import org.springframework.util.Assert;
|
||||
* within components that rely on the Trigger abstraction. For example, it may
|
||||
* be convenient to allow periodic triggers, cron-based triggers, and even
|
||||
* custom Trigger implementations to be used interchangeably.
|
||||
*
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @since 3.0
|
||||
*/
|
||||
@@ -76,7 +76,7 @@ public class PeriodicTrigger implements Trigger {
|
||||
/**
|
||||
* Specify the delay for the initial execution. It will be evaluated in
|
||||
* terms of this trigger's {@link TimeUnit}. If no time unit was explicitly
|
||||
* provided upon instantiation, the default is milliseconds.
|
||||
* provided upon instantiation, the default is milliseconds.
|
||||
*/
|
||||
public void setInitialDelay(long initialDelay) {
|
||||
this.initialDelay = this.timeUnit.toMillis(initialDelay);
|
||||
@@ -122,7 +122,7 @@ public class PeriodicTrigger implements Trigger {
|
||||
public int hashCode() {
|
||||
return (this.fixedRate ? 17 : 29) +
|
||||
(int) (37 * this.period) +
|
||||
(int) (41 * this.initialDelay);
|
||||
(int) (41 * this.initialDelay);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@ import org.springframework.util.ReflectionUtils;
|
||||
* implementations. It is only public so that it may be accessed from
|
||||
* implementations within other packages. It is <i>not</i> intended for general
|
||||
* use and may change in the future.
|
||||
*
|
||||
*
|
||||
* @author Mark Fisher
|
||||
* @since 3.0
|
||||
*/
|
||||
|
||||
@@ -23,7 +23,7 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
* objects backed by dynamic languages such as Groovy, JRuby and
|
||||
* BeanShell. The following is an example (from the reference
|
||||
* documentation) that details the wiring of a Groovy backed bean:
|
||||
*
|
||||
*
|
||||
* <pre class="code">
|
||||
* <lang:groovy id="messenger"
|
||||
* refresh-check-delay="5000"
|
||||
@@ -31,7 +31,7 @@ import org.springframework.beans.factory.xml.NamespaceHandlerSupport;
|
||||
* <lang:property name="message" value="I Can Do The Frug"/>
|
||||
* </lang:groovy>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* @author Rob Harrop
|
||||
* @author Juergen Hoeller
|
||||
* @author Mark Fisher
|
||||
|
||||
@@ -114,7 +114,7 @@ class ScriptBeanDefinitionParser extends AbstractBeanDefinitionParser {
|
||||
bd.setBeanClassName(this.scriptFactoryClassName);
|
||||
bd.setSource(parserContext.extractSource(element));
|
||||
bd.setAttribute(ScriptFactoryPostProcessor.LANGUAGE_ATTRIBUTE, element.getLocalName());
|
||||
|
||||
|
||||
// Determine bean scope.
|
||||
String scope = element.getAttribute(SCOPE_ATTRIBUTE);
|
||||
if (StringUtils.hasLength(scope)) {
|
||||
|
||||
@@ -36,7 +36,7 @@ public class ScriptingDefaultsParser implements BeanDefinitionParser {
|
||||
|
||||
|
||||
public BeanDefinition parse(Element element, ParserContext parserContext) {
|
||||
BeanDefinition bd =
|
||||
BeanDefinition bd =
|
||||
LangNamespaceUtils.registerScriptFactoryPostProcessorIfNecessary(parserContext.getRegistry());
|
||||
String refreshCheckDelay = element.getAttribute(REFRESH_CHECK_DELAY_ATTRIBUTE);
|
||||
if (StringUtils.hasText(refreshCheckDelay)) {
|
||||
|
||||
@@ -53,7 +53,7 @@ import org.springframework.util.ClassUtils;
|
||||
public class GroovyScriptFactory implements ScriptFactory, BeanFactoryAware, BeanClassLoaderAware {
|
||||
|
||||
private final String scriptSourceLocator;
|
||||
|
||||
|
||||
private final GroovyObjectCustomizer groovyObjectCustomizer;
|
||||
|
||||
private GroovyClassLoader groovyClassLoader;
|
||||
|
||||
@@ -115,7 +115,7 @@ public class ResourceScriptSource implements ScriptSource {
|
||||
/**
|
||||
* Sets the encoding used for reading the script resource. The default value is "UTF-8".
|
||||
* A null value, implies the platform default.
|
||||
*
|
||||
*
|
||||
* @param encoding charset encoding used for reading the script.
|
||||
*/
|
||||
public void setEncoding(String encoding) {
|
||||
|
||||
@@ -193,7 +193,7 @@ public class ScriptFactoryPostProcessor extends InstantiationAwareBeanPostProces
|
||||
}
|
||||
|
||||
/**
|
||||
* Flag to signal that refreshable proxies should be created to proxy the target class not its interfaces.
|
||||
* Flag to signal that refreshable proxies should be created to proxy the target class not its interfaces.
|
||||
* @param defaultProxyTargetClass the flag value to set
|
||||
*/
|
||||
public void setDefaultProxyTargetClass(boolean defaultProxyTargetClass) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Annotations denoting the roles of types or methods in the overall architecture
|
||||
* (at a conceptual, rather than implementation, level).
|
||||
*
|
||||
*
|
||||
* <p>Intended for use by tools and aspects (making an ideal target for pointcuts).
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
/*
|
||||
* Copyright 2002-2005 the original author or authors.
|
||||
*
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
*
|
||||
* Contains classes defining the application context subinterface
|
||||
* for UI applications. The theme feature is added here.
|
||||
*
|
||||
*
|
||||
* <ul>
|
||||
* <li>If no <code>UiApplicationContextUtils.THEME_SOURCE_BEAN_NAME</code>
|
||||
* bean is available in the context or parent context, a default <code>ResourceBundleThemeSource</code>
|
||||
@@ -24,7 +24,7 @@
|
||||
* <li>If messages in the resource bundles are in fact paths to resources(css, images, ...), make sure these resources
|
||||
* are directly available for the user and not, for example, under the WEB-INF directory.</li>
|
||||
* </ul>
|
||||
*
|
||||
*
|
||||
* <br>Web packages add the resolution and the setting of the user current theme.
|
||||
*
|
||||
*/
|
||||
|
||||
@@ -27,7 +27,7 @@ import org.springframework.util.Assert;
|
||||
* Default implementation of the {@link Errors} and {@link BindingResult}
|
||||
* interfaces, for the registration and evaluation of binding errors on
|
||||
* JavaBean objects.
|
||||
*
|
||||
*
|
||||
* <p>Performs standard JavaBean property access, also supporting nested
|
||||
* properties. Normally, application code will work with the
|
||||
* <code>Errors</code> interface or the <code>BindingResult</code> interface.
|
||||
|
||||
@@ -199,14 +199,14 @@ public interface Errors {
|
||||
/**
|
||||
* Are there any global errors?
|
||||
* @return <code>true</code> if there are any global errors
|
||||
* @see #hasFieldErrors()
|
||||
* @see #hasFieldErrors()
|
||||
*/
|
||||
boolean hasGlobalErrors();
|
||||
|
||||
/**
|
||||
* Return the number of global errors.
|
||||
* @return the number of global errors
|
||||
* @see #getFieldErrorCount()
|
||||
* @see #getFieldErrorCount()
|
||||
*/
|
||||
int getGlobalErrorCount();
|
||||
|
||||
@@ -225,14 +225,14 @@ public interface Errors {
|
||||
/**
|
||||
* Are there any field errors?
|
||||
* @return <code>true</code> if there are any errors associated with a field
|
||||
* @see #hasGlobalErrors()
|
||||
* @see #hasGlobalErrors()
|
||||
*/
|
||||
boolean hasFieldErrors();
|
||||
|
||||
/**
|
||||
* Return the number of errors associated with a field.
|
||||
* @return the number of errors associated with a field
|
||||
* @see #getGlobalErrorCount()
|
||||
* @see #getGlobalErrorCount()
|
||||
*/
|
||||
int getFieldErrorCount();
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import org.springframework.util.Assert;
|
||||
/**
|
||||
* Encapsulates an object error, that is, a global reason for rejecting
|
||||
* an object.
|
||||
*
|
||||
*
|
||||
* <p>See the {@link DefaultMessageCodesResolver} javadoc for details on
|
||||
* how a message code list is built for an <code>ObjectError</code>.
|
||||
*
|
||||
|
||||
@@ -26,7 +26,7 @@ import org.springframework.util.StringUtils;
|
||||
/**
|
||||
* Utility class offering convenient methods for invoking a {@link Validator}
|
||||
* and for rejecting empty fields.
|
||||
*
|
||||
*
|
||||
* <p>Checks for an empty field in <code>Validator</code> implementations can become
|
||||
* one-liners when using {@link #rejectIfEmpty} or {@link #rejectIfEmptyOrWhitespace}.
|
||||
*
|
||||
@@ -96,7 +96,7 @@ public abstract class ValidationUtils {
|
||||
/**
|
||||
* Reject the given field with the given error code if the value is empty.
|
||||
* <p>An 'empty' value in this context means either <code>null</code> or
|
||||
* the empty string "".
|
||||
* the empty string "".
|
||||
* <p>The object whose field is being validated does not need to be passed
|
||||
* in because the {@link Errors} instance can resolve field values by itself
|
||||
* (it will usually hold an internal reference to the target object).
|
||||
@@ -112,7 +112,7 @@ public abstract class ValidationUtils {
|
||||
* Reject the given field with the given error code and default message
|
||||
* if the value is empty.
|
||||
* <p>An 'empty' value in this context means either <code>null</code> or
|
||||
* the empty string "".
|
||||
* the empty string "".
|
||||
* <p>The object whose field is being validated does not need to be passed
|
||||
* in because the {@link Errors} instance can resolve field values by itself
|
||||
* (it will usually hold an internal reference to the target object).
|
||||
@@ -147,7 +147,7 @@ public abstract class ValidationUtils {
|
||||
* Reject the given field with the given error code, error arguments
|
||||
* and default message if the value is empty.
|
||||
* <p>An 'empty' value in this context means either <code>null</code> or
|
||||
* the empty string "".
|
||||
* the empty string "".
|
||||
* <p>The object whose field is being validated does not need to be passed
|
||||
* in because the {@link Errors} instance can resolve field values by itself
|
||||
* (it will usually hold an internal reference to the target object).
|
||||
|
||||
@@ -34,13 +34,13 @@ package org.springframework.validation;
|
||||
* at least <code>'MINIMUM_PASSWORD_LENGTH'</code> characters in length.
|
||||
*
|
||||
* <pre class="code"> public class UserLoginValidator implements Validator {
|
||||
*
|
||||
*
|
||||
* private static final int MINIMUM_PASSWORD_LENGTH = 6;
|
||||
*
|
||||
*
|
||||
* public boolean supports(Class clazz) {
|
||||
* return UserLogin.class.isAssignableFrom(clazz);
|
||||
* }
|
||||
*
|
||||
*
|
||||
* public void validate(Object target, Errors errors) {
|
||||
* ValidationUtils.rejectIfEmptyOrWhitespace(errors, "userName", "field.required");
|
||||
* ValidationUtils.rejectIfEmptyOrWhitespace(errors, "password", "field.required");
|
||||
@@ -56,7 +56,7 @@ package org.springframework.validation;
|
||||
*
|
||||
* <p>See also the Spring reference manual for a fuller discussion of
|
||||
* the <code>Validator</code> interface and it's role in an enterprise
|
||||
* application.
|
||||
* application.
|
||||
*
|
||||
* @author Rod Johnson
|
||||
* @see Errors
|
||||
@@ -75,7 +75,7 @@ public interface Validator {
|
||||
* being asked if it can {@link #validate(Object, Errors) validate}
|
||||
* @return <code>true</code> if this {@link Validator} can indeed
|
||||
* {@link #validate(Object, Errors) validate} instances of the
|
||||
* supplied <code>clazz</code>
|
||||
* supplied <code>clazz</code>
|
||||
*/
|
||||
boolean supports(Class<?> clazz);
|
||||
|
||||
@@ -85,8 +85,8 @@ public interface Validator {
|
||||
* typically has (or would) return <code>true</code>.
|
||||
* <p>The supplied {@link Errors errors} instance can be used to report
|
||||
* any resulting validation errors.
|
||||
* @param target the object that is to be validated (can be <code>null</code>)
|
||||
* @param errors contextual state about the validation process (never <code>null</code>)
|
||||
* @param target the object that is to be validated (can be <code>null</code>)
|
||||
* @param errors contextual state about the validation process (never <code>null</code>)
|
||||
* @see ValidationUtils
|
||||
*/
|
||||
void validate(Object target, Errors errors);
|
||||
|
||||
Reference in New Issue
Block a user