Polish Javadoc

Update Javadoc to add missing @return and @param elements.
This commit is contained in:
Phillip Webb 2015-02-03 11:34:27 -08:00
parent e489ab9b29
commit 8e398dc6a7
40 changed files with 131 additions and 27 deletions

View File

@ -34,6 +34,7 @@ import static org.junit.Assert.assertThat;
/** /**
* Abstract base class for endpoint tests. * Abstract base class for endpoint tests.
* *
* @param <T> the endpoint type
* @author Phillip Webb * @author Phillip Webb
*/ */
public abstract class AbstractEndpointTests<T extends Endpoint<?>> { public abstract class AbstractEndpointTests<T extends Endpoint<?>> {

View File

@ -133,6 +133,8 @@ public class RedisServer implements TestRule {
* Try to obtain and validate a resource. Implementors should either set the * Try to obtain and validate a resource. Implementors should either set the
* {@link #resource} field with a valid resource and return normally, or throw an * {@link #resource} field with a valid resource and return normally, or throw an
* exception. * exception.
* @return the jedis connection factory
* @throws Exception if the factory cannot be obtained
*/ */
protected JedisConnectionFactory obtainResource() throws Exception { protected JedisConnectionFactory obtainResource() throws Exception {
JedisConnectionFactory resource = new JedisConnectionFactory(); JedisConnectionFactory resource = new JedisConnectionFactory();

View File

@ -31,11 +31,13 @@ import static org.junit.Assert.assertEquals;
* Abstract base class for {@link DataSourcePoolMetadata} tests. * Abstract base class for {@link DataSourcePoolMetadata} tests.
* *
* @author Stephane Nicoll * @author Stephane Nicoll
* @param <D> the data source pool metadata type
*/ */
public abstract class AbstractDataSourcePoolMetadataTests<D extends AbstractDataSourcePoolMetadata<?>> { public abstract class AbstractDataSourcePoolMetadataTests<D extends AbstractDataSourcePoolMetadata<?>> {
/** /**
* Return a data source metadata instance with a min size of 0 and max size of 2. * Return a data source metadata instance with a min size of 0 and max size of 2.
* @return the data source metadata
*/ */
protected abstract D getDataSourceMetadata(); protected abstract D getDataSourceMetadata();

View File

@ -13,6 +13,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
package org.springframework.boot.configurationprocessor; package org.springframework.boot.configurationprocessor;
import java.io.File; import java.io.File;
@ -79,21 +80,21 @@ public class TestProject {
} }
private void copySources(Set<Class<?>> contents) throws IOException { private void copySources(Set<Class<?>> contents) throws IOException {
for (Class<?> klass : contents) { for (Class<?> type : contents) {
copySources(klass); copySources(type);
} }
} }
private void copySources(Class<?> klass) throws IOException { private void copySources(Class<?> type) throws IOException {
File original = getOriginalSourceFile(klass); File original = getOriginalSourceFile(type);
File target = getSourceFile(klass); File target = getSourceFile(type);
target.getParentFile().mkdirs(); target.getParentFile().mkdirs();
FileCopyUtils.copy(original, target); FileCopyUtils.copy(original, target);
this.sourceFiles.add(target); this.sourceFiles.add(target);
} }
public File getSourceFile(Class<?> klass) { public File getSourceFile(Class<?> type) {
return new File(this.sourceFolder, sourcePathFor(klass)); return new File(this.sourceFolder, sourcePathFor(type));
} }
public ConfigurationMetadata fullBuild() { public ConfigurationMetadata fullBuild() {
@ -120,6 +121,8 @@ public class TestProject {
/** /**
* Retrieve File relative to project's output folder. * Retrieve File relative to project's output folder.
* @param relativePath the relative path
* @return the output file
*/ */
public File getOutputFile(String relativePath) { public File getOutputFile(String relativePath) {
Assert.assertFalse(new File(relativePath).isAbsolute()); Assert.assertFalse(new File(relativePath).isAbsolute());
@ -128,6 +131,9 @@ public class TestProject {
/** /**
* Add source code at the end of file, just before last '}' * Add source code at the end of file, just before last '}'
* @param target the target
* @param snippetStream the snippet stream
* @throws Exception if the source cannot be added
*/ */
public void addSourceCode(Class<?> target, InputStream snippetStream) public void addSourceCode(Class<?> target, InputStream snippetStream)
throws Exception { throws Exception {
@ -143,31 +149,36 @@ public class TestProject {
/** /**
* Delete source file for given class from project. * Delete source file for given class from project.
* @param type the class to delete
*/ */
public void delete(Class<?> klass) { public void delete(Class<?> type) {
File target = getSourceFile(klass); File target = getSourceFile(type);
target.delete(); target.delete();
this.sourceFiles.remove(target); this.sourceFiles.remove(target);
} }
/** /**
* Restore source code of given class to its original contents. * Restore source code of given class to its original contents.
* @param type the class to revert
* @throws IOException
*/ */
public void revert(Class<?> klass) throws IOException { public void revert(Class<?> type) throws IOException {
Assert.assertTrue(getSourceFile(klass).exists()); Assert.assertTrue(getSourceFile(type).exists());
copySources(klass); copySources(type);
} }
/** /**
* Add source code of given class to this project. * Add source code of given class to this project.
* @param type the class to add
* @throws IOException
*/ */
public void add(Class<?> klass) throws IOException { public void add(Class<?> type) throws IOException {
Assert.assertFalse(getSourceFile(klass).exists()); Assert.assertFalse(getSourceFile(type).exists());
copySources(klass); copySources(type);
} }
public void replaceText(Class<?> klass, String find, String replace) throws Exception { public void replaceText(Class<?> type, String find, String replace) throws Exception {
File target = getSourceFile(klass); File target = getSourceFile(type);
String contents = getContents(target); String contents = getContents(target);
contents = contents.replace(find, replace); contents = contents.replace(find, replace);
putContents(target, contents); putContents(target, contents);
@ -178,8 +189,8 @@ public class TestProject {
* have no need to know about these. They should work only with the copied source * have no need to know about these. They should work only with the copied source
* code. * code.
*/ */
private File getOriginalSourceFile(Class<?> klass) { private File getOriginalSourceFile(Class<?> type) {
return new File(ORIGINAL_SOURCE_FOLDER, sourcePathFor(klass)); return new File(ORIGINAL_SOURCE_FOLDER, sourcePathFor(type));
} }
private static void putContents(File targetFile, String contents) private static void putContents(File targetFile, String contents)

View File

@ -66,6 +66,7 @@ public final class Dependency {
/** /**
* Return the dependency group id. * Return the dependency group id.
* @return the group ID
*/ */
public String getGroupId() { public String getGroupId() {
return this.groupId; return this.groupId;
@ -73,6 +74,7 @@ public final class Dependency {
/** /**
* Return the dependency artifact id. * Return the dependency artifact id.
* @return the artifact ID
*/ */
public String getArtifactId() { public String getArtifactId() {
return this.artifactId; return this.artifactId;
@ -80,6 +82,7 @@ public final class Dependency {
/** /**
* Return the dependency version. * Return the dependency version.
* @return the version
*/ */
public String getVersion() { public String getVersion() {
return this.version; return this.version;
@ -87,6 +90,7 @@ public final class Dependency {
/** /**
* Return the dependency exclusions. * Return the dependency exclusions.
* @return the exclusions
*/ */
public List<Exclusion> getExclusions() { public List<Exclusion> getExclusions() {
return this.exclusions; return this.exclusions;
@ -145,14 +149,16 @@ public final class Dependency {
} }
/** /**
* Return the exclusion artifact id. * Return the exclusion artifact ID.
* @return the exclusion artifact ID
*/ */
public String getArtifactId() { public String getArtifactId() {
return this.artifactId; return this.artifactId;
} }
/** /**
* Return the exclusion group id. * Return the exclusion group ID.
* @return the exclusion group ID
*/ */
public String getGroupId() { public String getGroupId() {
return this.groupId; return this.groupId;

View File

@ -41,6 +41,7 @@ public abstract class ManagedDependencies implements Dependencies {
/** /**
* Return the 'spring-boot-dependencies' POM version. * Return the 'spring-boot-dependencies' POM version.
* @return the version
* @deprecated since 1.1.0 in favor of {@link #getSpringBootVersion()} * @deprecated since 1.1.0 in favor of {@link #getSpringBootVersion()}
*/ */
@Deprecated @Deprecated
@ -50,6 +51,7 @@ public abstract class ManagedDependencies implements Dependencies {
/** /**
* Return the 'spring-boot-dependencies' POM version. * Return the 'spring-boot-dependencies' POM version.
* @return the spring boot version
*/ */
public String getSpringBootVersion() { public String getSpringBootVersion() {
Dependency dependency = find("org.springframework.boot", "spring-boot"); Dependency dependency = find("org.springframework.boot", "spring-boot");

View File

@ -41,11 +41,13 @@ public interface Layout {
/** /**
* Returns the location of classes within the archive. * Returns the location of classes within the archive.
* @return the classes location
*/ */
String getClassesLocation(); String getClassesLocation();
/** /**
* Returns if loader classes should be included to make the archive executable. * Returns if loader classes should be included to make the archive executable.
* @return if the layout is executable
*/ */
boolean isExecutable(); boolean isExecutable();

View File

@ -192,6 +192,7 @@ public abstract class MainClassFinder {
* Perform the given callback operation on all main classes from the given jar. * Perform the given callback operation on all main classes from the given jar.
* @param jarFile the jar file to search * @param jarFile the jar file to search
* @param classesLocation the location within the jar containing classes * @param classesLocation the location within the jar containing classes
* @param callback the callback
* @return the first callback result or {@code null} * @return the first callback result or {@code null}
* @throws IOException * @throws IOException
*/ */
@ -310,6 +311,7 @@ public abstract class MainClassFinder {
/** /**
* Callback interface used to receive class names. * Callback interface used to receive class names.
* @param <T> the result type
*/ */
public static interface ClassNameCallback<T> { public static interface ClassNameCallback<T> {

View File

@ -30,6 +30,7 @@ public interface JavaAgentDetector {
* Returns {@code true} if {@code url} points to a Java agent jar file, otherwise * Returns {@code true} if {@code url} points to a Java agent jar file, otherwise
* {@code false} is returned. * {@code false} is returned.
* @param url The url to examine * @param url The url to examine
* @return if the URL points to a Java agent
*/ */
public boolean isJavaAgentJar(URL url); public boolean isJavaAgentJar(URL url);

View File

@ -115,6 +115,7 @@ class CentralDirectoryEndRecord {
/** /**
* Return the number of ZIP entries in the file. * Return the number of ZIP entries in the file.
* @return the number of records in the zip
*/ */
public int getNumberOfRecords() { public int getNumberOfRecords() {
return (int) Bytes.littleEndianValue(this.block, this.offset + 10, 2); return (int) Bytes.littleEndianValue(this.block, this.offset + 10, 2);

View File

@ -44,6 +44,7 @@ public class JarEntry extends java.util.jar.JarEntry {
/** /**
* Return the source {@link JarEntryData} that was used to create this entry. * Return the source {@link JarEntryData} that was used to create this entry.
* @return the source of the entry
*/ */
public JarEntryData getSource() { public JarEntryData getSource() {
return this.source; return this.source;
@ -51,6 +52,8 @@ public class JarEntry extends java.util.jar.JarEntry {
/** /**
* Return a {@link URL} for this {@link JarEntry}. * Return a {@link URL} for this {@link JarEntry}.
* @return the URL for the entry
* @throws MalformedURLException if the URL is not valid
*/ */
public URL getUrl() throws MalformedURLException { public URL getUrl() throws MalformedURLException {
return new URL(this.source.getSource().getUrl(), getName()); return new URL(this.source.getSource().getUrl(), getName());

View File

@ -170,6 +170,7 @@ public abstract class SystemPropertyUtils {
* provided key. Environment variables in <code>UPPER_CASE</code> style are allowed * provided key. Environment variables in <code>UPPER_CASE</code> style are allowed
* where System properties would normally be <code>lower.case</code>. * where System properties would normally be <code>lower.case</code>.
* @param key the key to resolve * @param key the key to resolve
* @param defaultValue the default value
* @param text optional extra context for an error message if the key resolution fails * @param text optional extra context for an error message if the key resolution fails
* (e.g. if System properties are not accessible) * (e.g. if System properties are not accessible)
* @return a static property value or null of not found * @return a static property value or null of not found

View File

@ -74,6 +74,7 @@ public class ApplicationPid {
/** /**
* Write the PID to the specified file. * Write the PID to the specified file.
* @param file the PID file
* @throws IllegalStateException if no PID is available. * @throws IllegalStateException if no PID is available.
* @throws IOException if the file cannot be written * @throws IOException if the file cannot be written
*/ */

View File

@ -467,6 +467,7 @@ public class SpringApplication {
* content from the Environment (banner.location and banner.charset). The defaults are * content from the Environment (banner.location and banner.charset). The defaults are
* banner.location=classpath:banner.txt, banner.charset=UTF-8. If the banner file does * banner.location=classpath:banner.txt, banner.charset=UTF-8. If the banner file does
* not exist or cannot be printed, a simple default is created. * not exist or cannot be printed, a simple default is created.
* @param environment the environment
* @see #setShowBanner(boolean) * @see #setShowBanner(boolean)
* @see #printBanner() * @see #printBanner()
*/ */
@ -741,6 +742,7 @@ public class SpringApplication {
* Sets if the created {@link ApplicationContext} should have a shutdown hook * Sets if the created {@link ApplicationContext} should have a shutdown hook
* registered. Defaults to {@code true} to ensure that JVM shutdowns are handled * registered. Defaults to {@code true} to ensure that JVM shutdowns are handled
* gracefully. * gracefully.
* @param registerShutdownHook if the shutdown hook should be registered
*/ */
public void setRegisterShutdownHook(boolean registerShutdownHook) { public void setRegisterShutdownHook(boolean registerShutdownHook) {
this.registerShutdownHook = registerShutdownHook; this.registerShutdownHook = registerShutdownHook;
@ -966,6 +968,7 @@ public class SpringApplication {
* Most developers will want to define their own main method can call the * Most developers will want to define their own main method can call the
* {@link #run(Object, String...) run} method instead. * {@link #run(Object, String...) run} method instead.
* @param args command line arguments * @param args command line arguments
* @throws Exception if the application cannot be started
* @see SpringApplication#run(Object[], String[]) * @see SpringApplication#run(Object[], String[])
* @see SpringApplication#run(Object, String...) * @see SpringApplication#run(Object, String...)
*/ */

View File

@ -45,6 +45,7 @@ import org.springframework.validation.Validator;
* them to an object of a specified type and then optionally running a {@link Validator} * them to an object of a specified type and then optionally running a {@link Validator}
* over it. * over it.
* *
* @param <T> The target type
* @author Dave Syer * @author Dave Syer
*/ */
public class PropertiesConfigurationFactory<T> implements FactoryBean<T>, public class PropertiesConfigurationFactory<T> implements FactoryBean<T>,
@ -87,6 +88,7 @@ public class PropertiesConfigurationFactory<T> implements FactoryBean<T>,
/** /**
* Create a new factory for an object of the given type. * Create a new factory for an object of the given type.
* @param type the target type
* @see #PropertiesConfigurationFactory(Class) * @see #PropertiesConfigurationFactory(Class)
*/ */
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")

View File

@ -44,6 +44,7 @@ import org.yaml.snakeyaml.error.YAMLException;
* Validate some YAML by binding it to an object of a specified type and then optionally * Validate some YAML by binding it to an object of a specified type and then optionally
* running a {@link Validator} over it. * running a {@link Validator} over it.
* *
* @param <T> the configuration type
* @author Luke Taylor * @author Luke Taylor
* @author Dave Syer * @author Dave Syer
*/ */

View File

@ -72,6 +72,8 @@ public class ParentContextCloserApplicationListener implements
/** /**
* Subclasses may override to create their own subclass of ContextCloserListener. This * Subclasses may override to create their own subclass of ContextCloserListener. This
* still enforces the use of a weak reference. * still enforces the use of a weak reference.
* @param child the child context
* @return the {@link ContextCloserListener} to use
*/ */
protected ContextCloserListener createContextCloserListener( protected ContextCloserListener createContextCloserListener(
ConfigurableApplicationContext child) { ConfigurableApplicationContext child) {

View File

@ -299,6 +299,7 @@ public class SpringApplicationBuilder {
* Sets the {@link Banner} instance which will be used to print the banner when no * Sets the {@link Banner} instance which will be used to print the banner when no
* static banner file is provided. * static banner file is provided.
* @param banner The banner to use * @param banner The banner to use
* @return the current builder
*/ */
public SpringApplicationBuilder banner(Banner banner) { public SpringApplicationBuilder banner(Banner banner) {
this.application.setBanner(banner); this.application.setBanner(banner);
@ -329,6 +330,8 @@ public class SpringApplicationBuilder {
/** /**
* Sets if the created {@link ApplicationContext} should have a shutdown hook * Sets if the created {@link ApplicationContext} should have a shutdown hook
* registered. * registered.
* @param registerShutdownHook if the shutdown hook should be registered
* @return the current builder
*/ */
public SpringApplicationBuilder registerShutdownHook(boolean registerShutdownHook) { public SpringApplicationBuilder registerShutdownHook(boolean registerShutdownHook) {
this.registerShutdownHookApplied = true; this.registerShutdownHookApplied = true;

View File

@ -164,6 +164,7 @@ public class ConfigFileApplicationListener implements
/** /**
* Add config file property sources to the specified environment. * Add config file property sources to the specified environment.
* @param environment the environment to add source to * @param environment the environment to add source to
* @param resourceLoader the resource loader
* @see #addPostProcessors(ConfigurableApplicationContext) * @see #addPostProcessors(ConfigurableApplicationContext)
*/ */
protected void addPropertySources(ConfigurableEnvironment environment, protected void addPropertySources(ConfigurableEnvironment environment,
@ -222,6 +223,7 @@ public class ConfigFileApplicationListener implements
* profiles (if any) plus file extensions supported by the properties loaders. * profiles (if any) plus file extensions supported by the properties loaders.
* Locations are considered in the order specified, with later items taking precedence * Locations are considered in the order specified, with later items taking precedence
* (like a map merge). * (like a map merge).
* @param locations the search locations
*/ */
public void setSearchLocations(String locations) { public void setSearchLocations(String locations) {
Assert.hasLength(locations, "Locations must not be empty"); Assert.hasLength(locations, "Locations must not be empty");
@ -231,6 +233,7 @@ public class ConfigFileApplicationListener implements
/** /**
* Sets the names of the files that should be loaded (excluding file extension) as a * Sets the names of the files that should be loaded (excluding file extension) as a
* comma-separated list. * comma-separated list.
* @param names the names to load
*/ */
public void setSearchNames(String names) { public void setSearchNames(String names) {
Assert.hasLength(names, "Names must not be empty"); Assert.hasLength(names, "Names must not be empty");

View File

@ -114,6 +114,7 @@ public abstract class AbstractConfigurableEmbeddedServletContainer implements
/** /**
* Returns the context path for the embedded servlet container. The path will start * Returns the context path for the embedded servlet container. The path will start
* with "/" and not end with "/". The root context is represented by an empty string. * with "/" and not end with "/". The root context is represented by an empty string.
* @return the context path
*/ */
public String getContextPath() { public String getContextPath() {
return this.contextPath; return this.contextPath;
@ -182,6 +183,7 @@ public abstract class AbstractConfigurableEmbeddedServletContainer implements
/** /**
* Returns the document root which will be used by the web context to serve static * Returns the document root which will be used by the web context to serve static
* files. * files.
* @return the document root
*/ */
public File getDocumentRoot() { public File getDocumentRoot() {
return this.documentRoot; return this.documentRoot;
@ -200,8 +202,9 @@ public abstract class AbstractConfigurableEmbeddedServletContainer implements
} }
/** /**
* Returns a mutable set of {@link ErrorPage}s that will be used when handling * Returns a mutable set of {@link ErrorPage ErrorPages} that will be used when
* exceptions. * handling exceptions.
* @return the error pages
*/ */
public Set<ErrorPage> getErrorPages() { public Set<ErrorPage> getErrorPages() {
return this.errorPages; return this.errorPages;

View File

@ -57,6 +57,7 @@ public abstract class AbstractEmbeddedServletContainerFactory extends
/** /**
* Returns the absolute document root when it points to a valid folder, logging a * Returns the absolute document root when it points to a valid folder, logging a
* warning and returning {@code null} otherwise. * warning and returning {@code null} otherwise.
* @return the valid document root
*/ */
protected final File getValidDocumentRoot() { protected final File getValidDocumentRoot() {
File file = getDocumentRoot(); File file = getDocumentRoot();

View File

@ -115,6 +115,7 @@ public class AnnotationConfigEmbeddedWebApplicationContext extends
* <p> * <p>
* Any call to this method must occur prior to calls to {@link #register(Class...)} * Any call to this method must occur prior to calls to {@link #register(Class...)}
* and/or {@link #scan(String...)}. * and/or {@link #scan(String...)}.
* @param beanNameGenerator the bean name generator
* @see AnnotatedBeanDefinitionReader#setBeanNameGenerator * @see AnnotatedBeanDefinitionReader#setBeanNameGenerator
* @see ClassPathBeanDefinitionScanner#setBeanNameGenerator * @see ClassPathBeanDefinitionScanner#setBeanNameGenerator
*/ */
@ -133,6 +134,7 @@ public class AnnotationConfigEmbeddedWebApplicationContext extends
* <p> * <p>
* Any call to this method must occur prior to calls to {@link #register(Class...)} * Any call to this method must occur prior to calls to {@link #register(Class...)}
* and/or {@link #scan(String...)}. * and/or {@link #scan(String...)}.
* @param scopeMetadataResolver the scope metadata resolver
*/ */
public void setScopeMetadataResolver(ScopeMetadataResolver scopeMetadataResolver) { public void setScopeMetadataResolver(ScopeMetadataResolver scopeMetadataResolver) {
this.reader.setScopeMetadataResolver(scopeMetadataResolver); this.reader.setScopeMetadataResolver(scopeMetadataResolver);

View File

@ -228,6 +228,7 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
* Servlet context. By default this method will first attempt to find * Servlet context. By default this method will first attempt to find
* {@link ServletContextInitializer}, {@link Servlet}, {@link Filter} and certain * {@link ServletContextInitializer}, {@link Servlet}, {@link Filter} and certain
* {@link EventListener} beans. * {@link EventListener} beans.
* @return the servlet initializer beans
*/ */
protected Collection<ServletContextInitializer> getServletContextInitializerBeans() { protected Collection<ServletContextInitializer> getServletContextInitializerBeans() {
return new ServletContextInitializerBeans(getBeanFactory()); return new ServletContextInitializerBeans(getBeanFactory());
@ -331,6 +332,7 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
/** /**
* Returns the {@link EmbeddedServletContainer} that was created by the context or * Returns the {@link EmbeddedServletContainer} that was created by the context or
* {@code null} if the container has not yet been created. * {@code null} if the container has not yet been created.
* @return the embedded servlet container
*/ */
public EmbeddedServletContainer getEmbeddedServletContainer() { public EmbeddedServletContainer getEmbeddedServletContainer() {
return this.embeddedServletContainer; return this.embeddedServletContainer;

View File

@ -97,6 +97,7 @@ public class FilterRegistrationBean extends RegistrationBean {
/** /**
* Returns the filter being registered. * Returns the filter being registered.
* @return the filter
*/ */
protected Filter getFilter() { protected Filter getFilter() {
return this.filter; return this.filter;
@ -104,6 +105,7 @@ public class FilterRegistrationBean extends RegistrationBean {
/** /**
* Set the filter to be registered. * Set the filter to be registered.
* @param filter the filter
*/ */
public void setFilter(Filter filter) { public void setFilter(Filter filter) {
Assert.notNull(filter, "Filter must not be null"); Assert.notNull(filter, "Filter must not be null");
@ -208,6 +210,8 @@ public class FilterRegistrationBean extends RegistrationBean {
/** /**
* Convenience method to {@link #setDispatcherTypes(EnumSet) set dispatcher types} * Convenience method to {@link #setDispatcherTypes(EnumSet) set dispatcher types}
* using the specified elements. * using the specified elements.
* @param first the first dispatcher type
* @param rest additional dispatcher types
*/ */
public void setDispatcherTypes(DispatcherType first, DispatcherType... rest) { public void setDispatcherTypes(DispatcherType first, DispatcherType... rest) {
this.dispatcherTypes = EnumSet.of(first, rest); this.dispatcherTypes = EnumSet.of(first, rest);
@ -217,6 +221,7 @@ public class FilterRegistrationBean extends RegistrationBean {
* Sets the dispatcher types that should be used with the registration. If not * Sets the dispatcher types that should be used with the registration. If not
* specified the types will be deduced based on the value of * specified the types will be deduced based on the value of
* {@link #isAsyncSupported()}. * {@link #isAsyncSupported()}.
* @param dispatcherTypes the dispatcher types
*/ */
public void setDispatcherTypes(EnumSet<DispatcherType> dispatcherTypes) { public void setDispatcherTypes(EnumSet<DispatcherType> dispatcherTypes) {
this.dispatcherTypes = dispatcherTypes; this.dispatcherTypes = dispatcherTypes;
@ -226,6 +231,7 @@ public class FilterRegistrationBean extends RegistrationBean {
* Set if the filter mappings should be matched after any declared filter mappings of * Set if the filter mappings should be matched after any declared filter mappings of
* the ServletContext. Defaults to {@code false} indicating the filters are supposed * the ServletContext. Defaults to {@code false} indicating the filters are supposed
* to be matched before any declared filter mappings of the ServletContext. * to be matched before any declared filter mappings of the ServletContext.
* @param matchAfter if filter mappings are matched after
*/ */
public void setMatchAfter(boolean matchAfter) { public void setMatchAfter(boolean matchAfter) {
this.matchAfter = matchAfter; this.matchAfter = matchAfter;
@ -234,6 +240,7 @@ public class FilterRegistrationBean extends RegistrationBean {
/** /**
* Return if filter mappings should be matched after any declared Filter mappings of * Return if filter mappings should be matched after any declared Filter mappings of
* the ServletContext. * the ServletContext.
* @return if filter mappings are matched after
*/ */
public boolean isMatchAfter() { public boolean isMatchAfter() {
return this.matchAfter; return this.matchAfter;
@ -259,6 +266,7 @@ public class FilterRegistrationBean extends RegistrationBean {
/** /**
* Configure registration settings. Subclasses can override this method to perform * Configure registration settings. Subclasses can override this method to perform
* additional configuration if required. * additional configuration if required.
* @param registration the registration
*/ */
protected void configure(FilterRegistration.Dynamic registration) { protected void configure(FilterRegistration.Dynamic registration) {
super.configure(registration); super.configure(registration);

View File

@ -44,6 +44,7 @@ public class MultipartConfigFactory {
/** /**
* Sets the directory location where files will be stored. * Sets the directory location where files will be stored.
* @param location the location
*/ */
public void setLocation(String location) { public void setLocation(String location) {
this.location = location; this.location = location;
@ -51,6 +52,7 @@ public class MultipartConfigFactory {
/** /**
* Sets the maximum size allowed for uploaded files. * Sets the maximum size allowed for uploaded files.
* @param maxFileSize the maximum file size
* @see #setMaxFileSize(String) * @see #setMaxFileSize(String)
*/ */
public void setMaxFileSize(long maxFileSize) { public void setMaxFileSize(long maxFileSize) {
@ -60,6 +62,7 @@ public class MultipartConfigFactory {
/** /**
* Sets the maximum size allowed for uploaded files. Values can use the suffixed "MB" * Sets the maximum size allowed for uploaded files. Values can use the suffixed "MB"
* or "KB" to indicate a Megabyte or Kilobyte size. * or "KB" to indicate a Megabyte or Kilobyte size.
* @param maxFileSize the maximum file size
* @see #setMaxFileSize(long) * @see #setMaxFileSize(long)
*/ */
public void setMaxFileSize(String maxFileSize) { public void setMaxFileSize(String maxFileSize) {
@ -68,6 +71,7 @@ public class MultipartConfigFactory {
/** /**
* Sets the maximum size allowed for multipart/form-data requests. * Sets the maximum size allowed for multipart/form-data requests.
* @param maxRequestSize the maximum request size
* @see #setMaxRequestSize(String) * @see #setMaxRequestSize(String)
*/ */
public void setMaxRequestSize(long maxRequestSize) { public void setMaxRequestSize(long maxRequestSize) {
@ -77,6 +81,7 @@ public class MultipartConfigFactory {
/** /**
* Sets the maximum size allowed for multipart/form-data requests. Values can use the * Sets the maximum size allowed for multipart/form-data requests. Values can use the
* suffixed "MB" or "KB" to indicate a Megabyte or Kilobyte size. * suffixed "MB" or "KB" to indicate a Megabyte or Kilobyte size.
* @param maxRequestSize the maximum request size
* @see #setMaxRequestSize(long) * @see #setMaxRequestSize(long)
*/ */
public void setMaxRequestSize(String maxRequestSize) { public void setMaxRequestSize(String maxRequestSize) {
@ -85,6 +90,7 @@ public class MultipartConfigFactory {
/** /**
* Sets the size threshold after which files will be written to disk. * Sets the size threshold after which files will be written to disk.
* @param fileSizeThreshold the file size threshold
* @see #setFileSizeThreshold(String) * @see #setFileSizeThreshold(String)
*/ */
public void setFileSizeThreshold(int fileSizeThreshold) { public void setFileSizeThreshold(int fileSizeThreshold) {
@ -94,6 +100,7 @@ public class MultipartConfigFactory {
/** /**
* Sets the size threshold after which files will be written to disk. Values can use * Sets the size threshold after which files will be written to disk. Values can use
* the suffixed "MB" or "KB" to indicate a Megabyte or Kilobyte size. * the suffixed "MB" or "KB" to indicate a Megabyte or Kilobyte size.
* @param fileSizeThreshold the file size threshold
* @see #setFileSizeThreshold(int) * @see #setFileSizeThreshold(int)
*/ */
public void setFileSizeThreshold(String fileSizeThreshold) { public void setFileSizeThreshold(String fileSizeThreshold) {
@ -114,6 +121,7 @@ public class MultipartConfigFactory {
/** /**
* Create a new {@link MultipartConfigElement} instance. * Create a new {@link MultipartConfigElement} instance.
* @return the multipart config element
*/ */
public MultipartConfigElement createMultipartConfig() { public MultipartConfigElement createMultipartConfig() {
return new MultipartConfigElement(this.location, this.maxFileSize, return new MultipartConfigElement(this.location, this.maxFileSize,

View File

@ -47,6 +47,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
/** /**
* Set the name of this registration. If not specified the bean name will be used. * Set the name of this registration. If not specified the bean name will be used.
* @param name the name of the registration
*/ */
public void setName(String name) { public void setName(String name) {
Assert.hasLength(name, "Name must not be empty"); Assert.hasLength(name, "Name must not be empty");
@ -56,6 +57,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
/** /**
* Sets if asynchronous operations are support for this registration. If not specified * Sets if asynchronous operations are support for this registration. If not specified
* defaults to {@code true}. * defaults to {@code true}.
* @param asyncSupported if async is supported
*/ */
public void setAsyncSupported(boolean asyncSupported) { public void setAsyncSupported(boolean asyncSupported) {
this.asyncSupported = asyncSupported; this.asyncSupported = asyncSupported;
@ -63,6 +65,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
/** /**
* Returns if asynchronous operations are support for this registration. * Returns if asynchronous operations are support for this registration.
* @return if async is supported
*/ */
public boolean isAsyncSupported() { public boolean isAsyncSupported() {
return this.asyncSupported; return this.asyncSupported;
@ -86,6 +89,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
/** /**
* Set init-parameters for this registration. Calling this method will replace any * Set init-parameters for this registration. Calling this method will replace any
* existing init-parameters. * existing init-parameters.
* @param initParameters the init parameters
* @see #getInitParameters * @see #getInitParameters
* @see #addInitParameter * @see #addInitParameter
*/ */
@ -96,6 +100,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
/** /**
* Returns a mutable Map of the registration init-parameters. * Returns a mutable Map of the registration init-parameters.
* @return the init parameters
*/ */
public Map<String, String> getInitParameters() { public Map<String, String> getInitParameters() {
return this.initParameters; return this.initParameters;
@ -115,6 +120,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
* Deduces the name for this registration. Will return user specified name or fallback * Deduces the name for this registration. Will return user specified name or fallback
* to convention based naming. * to convention based naming.
* @param value the object used for convention based names * @param value the object used for convention based names
* @return the deduced name
*/ */
protected final String getOrDeduceName(Object value) { protected final String getOrDeduceName(Object value) {
return (this.name != null ? this.name : Conventions.getVariableName(value)); return (this.name != null ? this.name : Conventions.getVariableName(value));
@ -122,6 +128,7 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
/** /**
* Configure registration base settings. * Configure registration base settings.
* @param registration the registration
*/ */
protected void configure(Registration.Dynamic registration) { protected void configure(Registration.Dynamic registration) {
Assert.state(registration != null, Assert.state(registration != null,

View File

@ -81,6 +81,7 @@ public class ServletRegistrationBean extends RegistrationBean {
/** /**
* Returns the servlet being registered. * Returns the servlet being registered.
* @return the sevlet
*/ */
protected Servlet getServlet() { protected Servlet getServlet() {
return this.servlet; return this.servlet;
@ -88,6 +89,7 @@ public class ServletRegistrationBean extends RegistrationBean {
/** /**
* Sets the servlet to be registered. * Sets the servlet to be registered.
* @param servlet the servlet
*/ */
public void setServlet(Servlet servlet) { public void setServlet(Servlet servlet) {
Assert.notNull(servlet, "Servlet must not be null"); Assert.notNull(servlet, "Servlet must not be null");
@ -124,8 +126,9 @@ public class ServletRegistrationBean extends RegistrationBean {
} }
/** /**
* Sets the <code>loadOnStartup</code> priority. See * Sets the {@code loadOnStartup} priority. See
* {@link ServletRegistration.Dynamic#setLoadOnStartup} for details. * {@link ServletRegistration.Dynamic#setLoadOnStartup} for details.
* @param loadOnStartup if load on startup is enabled
*/ */
public void setLoadOnStartup(int loadOnStartup) { public void setLoadOnStartup(int loadOnStartup) {
this.loadOnStartup = loadOnStartup; this.loadOnStartup = loadOnStartup;
@ -142,6 +145,7 @@ public class ServletRegistrationBean extends RegistrationBean {
/** /**
* Returns the {@link MultipartConfigElement multi-part configuration} to be applied * Returns the {@link MultipartConfigElement multi-part configuration} to be applied
* or {@code null}. * or {@code null}.
* @return the multipart config
*/ */
public MultipartConfigElement getMultipartConfig() { public MultipartConfigElement getMultipartConfig() {
return this.multipartConfig; return this.multipartConfig;
@ -149,6 +153,7 @@ public class ServletRegistrationBean extends RegistrationBean {
/** /**
* Returns the servlet name that will be registered. * Returns the servlet name that will be registered.
* @return the servlet name
*/ */
public String getServletName() { public String getServletName() {
return getOrDeduceName(this.servlet); return getOrDeduceName(this.servlet);
@ -175,6 +180,7 @@ public class ServletRegistrationBean extends RegistrationBean {
/** /**
* Configure registration settings. Subclasses can override this method to perform * Configure registration settings. Subclasses can override this method to perform
* additional configuration if required. * additional configuration if required.
* @param registration the registration
*/ */
protected void configure(ServletRegistration.Dynamic registration) { protected void configure(ServletRegistration.Dynamic registration) {
super.configure(registration); super.configure(registration);

View File

@ -83,6 +83,7 @@ public class XmlEmbeddedWebApplicationContext extends EmbeddedWebApplicationCont
/** /**
* Set whether to use XML validation. Default is {@code true}. * Set whether to use XML validation. Default is {@code true}.
* @param validating if validating the XML
*/ */
public void setValidating(boolean validating) { public void setValidating(boolean validating) {
this.reader.setValidating(validating); this.reader.setValidating(validating);

View File

@ -63,6 +63,7 @@ public class JettyEmbeddedServletContainer implements EmbeddedServletContainer {
/** /**
* Create a new {@link JettyEmbeddedServletContainer} instance. * Create a new {@link JettyEmbeddedServletContainer} instance.
* @param server the underlying Jetty server * @param server the underlying Jetty server
* @param autoStart if auto-starting the container
*/ */
public JettyEmbeddedServletContainer(Server server, boolean autoStart) { public JettyEmbeddedServletContainer(Server server, boolean autoStart) {
this.autoStart = autoStart; this.autoStart = autoStart;
@ -196,6 +197,7 @@ public class JettyEmbeddedServletContainer implements EmbeddedServletContainer {
/** /**
* Returns access to the underlying Jetty Server. * Returns access to the underlying Jetty Server.
* @return the Jetty server
*/ */
public Server getServer() { public Server getServer() {
return this.server; return this.server;

View File

@ -262,6 +262,7 @@ public class TomcatEmbeddedServletContainer implements EmbeddedServletContainer
/** /**
* Returns access to the underlying Tomcat server. * Returns access to the underlying Tomcat server.
* @return the Tomcat server
*/ */
public Tomcat getTomcat() { public Tomcat getTomcat() {
return this.tomcat; return this.tomcat;

View File

@ -417,6 +417,7 @@ public class TomcatEmbeddedServletContainerFactory extends
/** /**
* The Tomcat protocol to use when create the {@link Connector}. * The Tomcat protocol to use when create the {@link Connector}.
* @param protocol the protocol
* @see Connector#Connector(String) * @see Connector#Connector(String)
*/ */
public void setProtocol(String protocol) { public void setProtocol(String protocol) {
@ -581,6 +582,7 @@ public class TomcatEmbeddedServletContainerFactory extends
/** /**
* Returns the character encoding to use for URL decoding. * Returns the character encoding to use for URL decoding.
* @return the URI encoding
*/ */
public String getUriEncoding() { public String getUriEncoding() {
return this.uriEncoding; return this.uriEncoding;

View File

@ -132,11 +132,12 @@ public abstract class SpringBootServletInitializer implements WebApplicationInit
* config classes) because other settings have sensible defaults. You might choose * config classes) because other settings have sensible defaults. You might choose
* (for instance) to add default command line arguments, or set an active Spring * (for instance) to add default command line arguments, or set an active Spring
* profile. * profile.
* @param application a builder for the application context * @param builder a builder for the application context
* @return the application builder
* @see SpringApplicationBuilder * @see SpringApplicationBuilder
*/ */
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { protected SpringApplicationBuilder configure(SpringApplicationBuilder builder) {
return application; return builder;
} }
} }

View File

@ -33,6 +33,7 @@ public interface PropertySourceLoader {
/** /**
* Returns the file extensions that the loader supports (excluding the '.'). * Returns the file extensions that the loader supports (excluding the '.').
* @return the file extensions
*/ */
String[] getFileExtensions(); String[] getFileExtensions();

View File

@ -190,6 +190,7 @@ public class PropertySourcesLoader {
/** /**
* Return the {@link MutablePropertySources} being loaded. * Return the {@link MutablePropertySources} being loaded.
* @return the property sources
*/ */
public MutablePropertySources getPropertySources() { public MutablePropertySources getPropertySources() {
return this.propertySources; return this.propertySources;
@ -197,6 +198,7 @@ public class PropertySourcesLoader {
/** /**
* Returns all file extensions that could be loaded. * Returns all file extensions that could be loaded.
* @return the file extensions
*/ */
public Set<String> getAllFileExtensions() { public Set<String> getAllFileExtensions() {
Set<String> fileExtensions = new HashSet<String>(); Set<String> fileExtensions = new HashSet<String>();

View File

@ -34,6 +34,7 @@ public interface XAConnectionFactoryWrapper {
* {@link TransactionManager}. * {@link TransactionManager}.
* @param connectionFactory the connection factory to wrap * @param connectionFactory the connection factory to wrap
* @return the wrapped connection factory * @return the wrapped connection factory
* @throws Exception if the connection factory cannot be wrapped
*/ */
ConnectionFactory wrapConnectionFactory(XAConnectionFactory connectionFactory) ConnectionFactory wrapConnectionFactory(XAConnectionFactory connectionFactory)
throws Exception; throws Exception;

View File

@ -34,6 +34,7 @@ public interface XADataSourceWrapper {
* {@link TransactionManager}. * {@link TransactionManager}.
* @param dataSource the data source to wrap * @param dataSource the data source to wrap
* @return the wrapped data source * @return the wrapped data source
* @throws Exception if the data source cannot be wrapped
*/ */
DataSource wrapDataSource(XADataSource dataSource) throws Exception; DataSource wrapDataSource(XADataSource dataSource) throws Exception;

View File

@ -66,6 +66,7 @@ public abstract class AbstractLoggingSystem extends LoggingSystem {
* Return any self initialization config that has been applied. By default this method * Return any self initialization config that has been applied. By default this method
* checks {@link #getStandardConfigLocations()} and assumes that any file that exists * checks {@link #getStandardConfigLocations()} and assumes that any file that exists
* will have been applied. * will have been applied.
* @return the self initialization config
*/ */
protected String getSelfInitializationConfig() { protected String getSelfInitializationConfig() {
for (String location : getStandardConfigLocations()) { for (String location : getStandardConfigLocations()) {
@ -79,6 +80,7 @@ public abstract class AbstractLoggingSystem extends LoggingSystem {
/** /**
* Return the standard config locations for this system. * Return the standard config locations for this system.
* @return the standard config locations
* @see #getSelfInitializationConfig() * @see #getSelfInitializationConfig()
*/ */
protected abstract String[] getStandardConfigLocations(); protected abstract String[] getStandardConfigLocations();

View File

@ -80,6 +80,7 @@ public class LogFile {
/** /**
* Apply log file details to {@code LOG_PATH} and {@code LOG_FILE} map entries. * Apply log file details to {@code LOG_PATH} and {@code LOG_FILE} map entries.
* @param properties the properties to apply to
*/ */
public void applyTo(Properties properties) { public void applyTo(Properties properties) {
put(properties, "LOG_PATH", this.path); put(properties, "LOG_PATH", this.path);

View File

@ -170,6 +170,8 @@ public class LoggingApplicationListener implements SmartApplicationListener {
/** /**
* Initialize the logging system according to preferences expressed through the * Initialize the logging system according to preferences expressed through the
* {@link Environment} and the classpath. * {@link Environment} and the classpath.
* @param environment the environment
* @param classLoader the classloader
*/ */
protected void initialize(ConfigurableEnvironment environment, ClassLoader classLoader) { protected void initialize(ConfigurableEnvironment environment, ClassLoader classLoader) {
if (System.getProperty(PID_KEY) == null) { if (System.getProperty(PID_KEY) == null) {

View File

@ -84,6 +84,7 @@ public abstract class LoggingSystem {
/** /**
* Detect and return the logging system in use. Supports Logback, Log4J, Log4J2 and * Detect and return the logging system in use. Supports Logback, Log4J, Log4J2 and
* Java Logging. * Java Logging.
* @param classLoader the classloader
* @return The logging system * @return The logging system
*/ */
public static LoggingSystem get(ClassLoader classLoader) { public static LoggingSystem get(ClassLoader classLoader) {