Commit e674d751 authored by Phillip Webb's avatar Phillip Webb

Polish Javadoc

parent e07df7e4
......@@ -61,7 +61,7 @@ public class AuditEvent implements Serializable {
/**
* Create a new audit event for the current time from data provided as name-value
* pairs
* pairs.
* @param principal The user principal responsible
* @param type the event type
* @param data The event data in the form 'key=value' or simply 'key'
......
......@@ -46,7 +46,8 @@ public class InMemoryAuditEventRepository implements AuditEventRepository {
}
/**
* @param capacity the capacity to set
* Set the capacity of this event repository.
* @param capacity the capacity
*/
public synchronized void setCapacity(int capacity) {
this.events = new AuditEvent[capacity];
......
......@@ -82,6 +82,7 @@ public class AuditApplicationEvent extends ApplicationEvent {
}
/**
* Get the audit event.
* @return the audit event
*/
public AuditEvent getAuditEvent() {
......
......@@ -21,7 +21,7 @@ import java.util.List;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Configuration properties for some health properties
* Configuration properties for some health properties.
*
* @author Christian Dupuis
* @since 1.2.0
......
......@@ -52,7 +52,7 @@ public class ManagementContextResolver {
}
/**
* Return the management {@link ApplicationContext}
* Return the management {@link ApplicationContext}.
* @return the management {@link ApplicationContext}
*/
public ApplicationContext getApplicationContext() {
......
......@@ -185,7 +185,7 @@ public class ManagementWebSecurityAutoConfiguration {
}
/**
* WebSecurityEnabler condition
* WebSecurityEnabler condition.
*/
static class WebSecurityEnablerCondition extends SpringBootCondition {
......
......@@ -221,7 +221,7 @@ public class ShellProperties {
}
/**
* SSH properties
* SSH properties.
*/
public static class Ssh extends CrshShellProperties {
......@@ -279,7 +279,7 @@ public class ShellProperties {
}
/**
* Telnet properties
* Telnet properties.
*/
public static class Telnet extends CrshShellProperties {
......@@ -322,7 +322,7 @@ public class ShellProperties {
}
/**
* Auth specific properties for JAAS authentication
* Auth specific properties for JAAS authentication.
*/
@ConfigurationProperties(prefix = "shell.auth.jaas", ignoreUnknownFields = false)
public static class JaasAuthenticationProperties extends
......@@ -351,7 +351,7 @@ public class ShellProperties {
}
/**
* Auth specific properties for key authentication
* Auth specific properties for key authentication.
*/
@ConfigurationProperties(prefix = "shell.auth.key", ignoreUnknownFields = false)
public static class KeyAuthenticationProperties extends
......@@ -382,7 +382,7 @@ public class ShellProperties {
}
/**
* Auth specific properties for simple authentication
* Auth specific properties for simple authentication.
*/
@ConfigurationProperties(prefix = "shell.auth.simple", ignoreUnknownFields = false)
public static class SimpleAuthenticationProperties extends
......@@ -457,7 +457,7 @@ public class ShellProperties {
}
/**
* Auth specific properties for Spring authentication
* Auth specific properties for Spring authentication.
*/
@ConfigurationProperties(prefix = "shell.auth.spring", ignoreUnknownFields = false)
public static class SpringAuthenticationProperties extends
......
......@@ -37,9 +37,9 @@ import org.springframework.cache.CacheManager;
* Base {@link CacheStatisticsProvider} implementation that uses JMX to retrieve the cache
* statistics.
*
* @param <C> The cache type
* @author Stephane Nicoll
* @since 1.3.0
* @param <C> The cache type
*/
public abstract class AbstractJmxCacheStatisticsProvider<C extends Cache> implements
CacheStatisticsProvider<C> {
......
......@@ -144,6 +144,10 @@ public class ConfigurationPropertiesReportEndpoint extends
/**
* Cautiously serialize the bean to a map (returning a map with an error message
* instead of throwing an exception if there is a problem).
* @param mapper the object mapper
* @param bean the source bean
* @param prefix the prefix
* @return the serialized instance
*/
private Map<String, Object> safeSerialize(ObjectMapper mapper, Object bean,
String prefix) {
......@@ -173,6 +177,7 @@ public class ConfigurationPropertiesReportEndpoint extends
/**
* Ensure only bindable and non-cyclic bean properties are reported.
* @param mapper the object mapper
*/
private void applySerializationModifier(ObjectMapper mapper) {
SerializerFactory factory = BeanSerializerFactory.instance
......@@ -183,6 +188,7 @@ public class ConfigurationPropertiesReportEndpoint extends
/**
* Configure PropertyFilter to make sure Jackson doesn't process CGLIB generated bean
* properties.
* @param mapper the object mapper
*/
private void applyCglibFilters(ObjectMapper mapper) {
mapper.setAnnotationIntrospector(new CglibAnnotationIntrospector());
......@@ -192,7 +198,11 @@ public class ConfigurationPropertiesReportEndpoint extends
/**
* Extract configuration prefix from {@link ConfigurationProperties} annotation.
* @param beanFactoryMetaData
* @param context the application context
* @param beanFactoryMetaData the bean factory meta-data
* @param beanName the bean name
* @param bean the bean
* @return the prefix
*/
private String extractPrefix(ApplicationContext context,
ConfigurationBeanFactoryMetaData beanFactoryMetaData, String beanName,
......@@ -216,6 +226,8 @@ public class ConfigurationPropertiesReportEndpoint extends
/**
* Sanitize all unwanted configuration properties to avoid leaking of sensitive
* information.
* @param map the source map
* @return the sanitized map
*/
@SuppressWarnings("unchecked")
private Map<String, Object> sanitize(Map<String, Object> map) {
......
......@@ -113,6 +113,7 @@ public class DataSourcePublicMetrics implements PublicMetrics {
* Attempt to locate the primary {@link DataSource} (i.e. either the only data source
* available or the one amongst the candidates marked as {@link Primary}. Return
* {@code null} if there no primary data source could be found.
* @return the primary datasource
*/
private DataSource getPrimaryDataSource() {
try {
......
......@@ -55,6 +55,9 @@ public class FlywayEndpoint extends AbstractEndpoint<List<FlywayMigration>> {
return migrations;
}
/**
* Migration properties.
*/
public static class FlywayMigration {
private MigrationType type;
......
......@@ -83,6 +83,8 @@ public class HealthEndpoint extends AbstractEndpoint<Health> {
/**
* Turns the bean name into a key that can be used in the map of health information.
* @param name the bean name
* @return the key
*/
private String getKey(String name) {
int index = name.toLowerCase().indexOf("healthindicator");
......
......@@ -29,7 +29,8 @@ import org.springframework.boot.actuate.metrics.Metric;
public interface PublicMetrics {
/**
* @return an indication of current state through metrics
* Return an indication of current state through metrics.
* @return the public metrics
*/
Collection<Metric<?>> metrics();
......
......@@ -58,14 +58,16 @@ public class RequestMappingEndpoint extends AbstractEndpoint<Map<String, Object>
}
/**
* @param handlerMappings the mappings to set
* Set the handler mappings.
* @param handlerMappings the handler mappings
*/
public void setHandlerMappings(List<AbstractUrlHandlerMapping> handlerMappings) {
this.handlerMappings = handlerMappings;
}
/**
* @param methodMappings the method mappings to set
* Set the method mappings.
* @param methodMappings the method mappings
*/
public void setMethodMappings(List<AbstractHandlerMethodMapping<?>> methodMappings) {
this.methodMappings = methodMappings;
......
......@@ -76,6 +76,7 @@ public class SystemPublicMetrics implements PublicMetrics, Ordered {
/**
* Add metrics from ManagementFactory if possible. Note that ManagementFactory is not
* available on Google App Engine.
* @param result the result
*/
private void addManagementMetrics(Collection<Metric<?>> result) {
try {
......@@ -153,6 +154,8 @@ public class SystemPublicMetrics implements PublicMetrics, Ordered {
/**
* Turn GC names like 'PS Scavenge' or 'PS MarkSweep' into something that is more
* metrics friendly.
* @param name the source name
* @return a metric friendly name
*/
private String beautifyGcName(String name) {
return StringUtils.replace(name, " ", "_").toLowerCase();
......
......@@ -61,6 +61,9 @@ import com.fasterxml.jackson.databind.ObjectMapper;
public class EndpointMBeanExporter extends MBeanExporter implements SmartLifecycle,
ApplicationContextAware {
/**
* The default JMX domain.
*/
public static final String DEFAULT_DOMAIN = "org.springframework.boot";
private static Log logger = LogFactory.getLog(EndpointMBeanExporter.class);
......
......@@ -32,6 +32,14 @@ import org.springframework.web.servlet.resource.ResourceTransformer;
import org.springframework.web.servlet.resource.ResourceTransformerChain;
import org.springframework.web.servlet.resource.TransformedResource;
/**
* {@link MvcEndpoint} to expose a HAL browser.
*
* @author Dave Syer
* @author Phillip Webb
* @author Andy Wilkinson
* @since 1.3.0
*/
public class ActuatorHalBrowserEndpoint extends ActuatorHalJsonEndpoint implements
ResourceLoaderAware {
......@@ -93,6 +101,9 @@ public class ActuatorHalBrowserEndpoint extends ActuatorHalJsonEndpoint implemen
return null;
}
/**
* HAL Browser properties.
*/
public static class HalBrowserLocation {
private final String resourceLocation;
......
......@@ -29,12 +29,12 @@ import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
/**
* {@link MvcEndpoint} for the actuator. Uses content negotiation to provide access to the
* HAL browser (when on the classpath), and to HAL-formatted JSON.
* {@link MvcEndpoint} to expose HAL-formatted JSON.
*
* @author Dave Syer
* @author Phil Webb
* @author Phillip Webb
* @author Andy Wilkinson
* @since 1.3.0
*/
@ConfigurationProperties("endpoints.actuator")
public class ActuatorHalJsonEndpoint extends WebMvcConfigurerAdapter implements
......
......@@ -97,7 +97,7 @@ public class EndpointHandlerMapping extends RequestMappingHandlerMapping {
/**
* Since all handler beans are passed into the constructor there is no need to detect
* anything here
* anything here.
*/
@Override
protected boolean isHandler(Class<?> beanType) {
......@@ -149,7 +149,8 @@ public class EndpointHandlerMapping extends RequestMappingHandlerMapping {
}
/**
* @param prefix the prefix to set
* Set the prefix used in mappings.
* @param prefix the prefix
*/
public void setPrefix(String prefix) {
Assert.isTrue("".equals(prefix) || StringUtils.startsWithIgnoreCase(prefix, "/"),
......@@ -158,13 +159,15 @@ public class EndpointHandlerMapping extends RequestMappingHandlerMapping {
}
/**
* @return the prefix used in mappings
* Get the prefix used in mappings.
* @return the prefix
*/
public String getPrefix() {
return this.prefix;
}
/**
* Get the path of the endpoint.
* @param endpoint the endpoint
* @return the path used in mappings
*/
......@@ -189,7 +192,7 @@ public class EndpointHandlerMapping extends RequestMappingHandlerMapping {
}
/**
* Return the endpoints
* Return the endpoints.
* @return the endpoints
*/
public Set<? extends MvcEndpoint> getEndpoints() {
......
......@@ -25,7 +25,7 @@ package org.springframework.boot.actuate.endpoint.mvc;
public interface EndpointHandlerMappingCustomizer {
/**
* Customize the specified {@link EndpointHandlerMapping}
* Customize the specified {@link EndpointHandlerMapping}.
* @param mapping the {@link EndpointHandlerMapping} to customize
*/
void customize(EndpointHandlerMapping mapping);
......
......@@ -74,10 +74,9 @@ public class EndpointMvcAdapter implements MvcEndpoint {
/**
* Returns the response that should be returned when the endpoint is disabled.
*
* @see Endpoint#isEnabled()
* @since 1.2.4
* @return The response to be returned when the endpoint is disabled
* @since 1.2.4
* @see Endpoint#isEnabled()
*/
protected ResponseEntity<?> getDisabledResponse() {
return MvcEndpoint.DISABLED_RESPONSE;
......
......@@ -34,6 +34,9 @@ import org.springframework.http.ResponseEntity;
*/
public interface MvcEndpoint {
/**
* A {@link ResponseEntity} returned for disabled endpoints.
*/
ResponseEntity<Map<String, String>> DISABLED_RESPONSE = new ResponseEntity<Map<String, String>>(
Collections.singletonMap("message", "This endpoint is disabled"),
HttpStatus.NOT_FOUND);
......
......@@ -26,9 +26,9 @@ import java.util.regex.Pattern;
* must provide implementations of {@link #getValue(Object, String)} and
* {@link #getNames(Object, NameCallback)}.
*
* @param <T> The source data type
* @author Phillip Webb
* @author Sergei Egorov
* @param <T> The source data type
* @since 1.3.0
*/
abstract class NamePatternFilter<T> {
......@@ -66,12 +66,18 @@ abstract class NamePatternFilter<T> {
protected abstract Object getValue(T source, String name);
/**
* Callback used to add a name.
*/
protected interface NameCallback {
void addName(String name);
}
/**
* {@link NameCallback} implementation to collect results.
*/
private class ResultCollectingNameCallback implements NameCallback {
private final Pattern pattern;
......
......@@ -185,6 +185,9 @@ public class DataSourceHealthIndicator extends AbstractHealthIndicator implement
}
/**
* Known database products.
*/
protected enum Product {
HSQLDB("HSQL Database Engine",
......
......@@ -37,7 +37,7 @@ public class DiskSpaceHealthIndicator extends AbstractHealthIndicator {
private final DiskSpaceHealthIndicatorProperties properties;
/**
* Create a new {@code DiskSpaceHealthIndicator}
* Create a new {@code DiskSpaceHealthIndicator}.
* @param properties the disk space properties
*/
@Autowired
......
......@@ -22,7 +22,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.util.Assert;
/**
* External configuration properties for {@link DiskSpaceHealthIndicator}
* External configuration properties for {@link DiskSpaceHealthIndicator}.
*
* @author Andy Wilkinson
* @since 1.2.0
......
......@@ -22,7 +22,7 @@ import java.util.List;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* External configuration properties for {@link ElasticsearchHealthIndicator}
* External configuration properties for {@link ElasticsearchHealthIndicator}.
*
* @author Binwei Yang
* @author Andy Wilkinson
......
......@@ -68,7 +68,8 @@ public final class Health {
}
/**
* @return the status of the health (never {@code null})
* Return the status of the health.
* @return the status (never {@code null})
*/
@JsonUnwrapped
public Status getStatus() {
......@@ -76,7 +77,8 @@ public final class Health {
}
/**
* @return the details of the health or an empty map.
* Return the details of the health.
* @return the details (or an empty map)
*/
@JsonAnyGetter
public Map<String, Object> getDetails() {
......@@ -280,7 +282,7 @@ public final class Health {
}
/**
* Set status to given {@link Status} instance
* Set status to given {@link Status} instance.
* @param status the status
* @return this {@link Builder} instance
*/
......
......@@ -25,7 +25,8 @@ package org.springframework.boot.actuate.health;
public interface HealthIndicator {
/**
* @return an indication of health
* Return an indication of health.
* @return the health for
*/
Health health();
......
......@@ -38,22 +38,22 @@ import com.fasterxml.jackson.annotation.JsonProperty;
public final class Status {
/**
* Convenient constant value representing unknown state
* Convenient constant value representing unknown state.
*/
public static final Status UNKNOWN = new Status("UNKNOWN");
/**
* Convenient constant value representing up state
* Convenient constant value representing up state.
*/
public static final Status UP = new Status("UP");
/**
* Convenient constant value representing down state
* Convenient constant value representing down state.
*/
public static final Status DOWN = new Status("DOWN");
/**
* Convenient constant value representing out-of-service state
* Convenient constant value representing out-of-service state.
*/
public static final Status OUT_OF_SERVICE = new Status("OUT_OF_SERVICE");
......@@ -82,7 +82,8 @@ public final class Status {
}
/**
* @return the code for this status
* Return the code for this status.
* @return the code
*/
@JsonProperty("status")
public String getCode() {
......@@ -90,7 +91,8 @@ public final class Status {
}
/**
* @return the description of this status
* Return the description of this status.
* @return the description
*/
@JsonInclude(Include.NON_EMPTY)
public String getDescription() {
......
......@@ -30,7 +30,7 @@ package org.springframework.boot.actuate.metrics;
public interface GaugeService {
/**
* Set the specified gauge value
* Set the specified gauge value.
* @param metricName the name of the gauge to set
* @param value the value of the gauge
*/
......
......@@ -19,9 +19,9 @@ package org.springframework.boot.actuate.metrics.buffer;
/**
* Base class for a mutable buffer containing a timestamp and a value.
*
* @param <T> The value type
* @author Dave Syer
* @author Phillip Webb
* @param <T> The value type
*/
abstract class Buffer<T extends Number> {
......
......@@ -32,8 +32,7 @@ import com.codahale.metrics.Timer;
/**
* A {@link GaugeService} and {@link CounterService} that sends data to a Dropwizard
* {@link MetricRegistry} based on a naming convention:
*
* {@link MetricRegistry} based on a naming convention.
* <ul>
* <li>Updates to {@link #increment(String)} with names in "meter.*" are treated as
* {@link Meter} events</li>
......
......@@ -109,6 +109,9 @@ public class MetricExportProperties extends TriggerProperties {
return this;
}
/**
* Aggregate properties.
*/
public static class Aggregate {
/**
......@@ -147,6 +150,9 @@ public class MetricExportProperties extends TriggerProperties {
}
/**
* Redis properties.
*/
public static class Redis {
/**
......
......@@ -127,6 +127,9 @@ public class JmxMetricWriter implements MetricWriter {
return this.namingStrategy.getObjectName(value, key);
}
/**
* A single metric value.
*/
@ManagedResource
public static class MetricValue {
......
......@@ -38,8 +38,14 @@ import org.springframework.util.ObjectUtils;
*/
public class DefaultOpenTsdbNamingStrategy implements OpenTsdbNamingStrategy {
/**
* The domain key.
*/
public static final String DOMAIN_KEY = "domain";
/**
* The process key.
*/
public static final String PROCESS_KEY = "process";
/**
......
......@@ -25,7 +25,7 @@ package org.springframework.boot.actuate.metrics.opentsdb;
public interface OpenTsdbNamingStrategy {
/**
* Convert the metric name into a {@link OpenTsdbName}
* Convert the metric name into a {@link OpenTsdbName}.
* @param metricName the name of the metric
* @return an Open TSDB name
*/
......
......@@ -28,13 +28,14 @@ import org.springframework.boot.actuate.metrics.writer.PrefixMetricWriter;
public interface MultiMetricRepository extends PrefixMetricReader, PrefixMetricWriter {
/**
* The names of all the groups known to this repository
* The names of all the groups known to this repository.
* @return all available group names
*/
Iterable<String> groups();
/**
* @return the number of groups available
* The number of groups available in this repository.
* @return the number of groups
*/
long countGroups();
......
......@@ -31,16 +31,34 @@ import org.springframework.util.Assert;
*/
public final class RichGauge {
/**
* The suffix for count gauges.
*/
public static final String COUNT = ".count";
/**
* The suffix for max gauges.
*/
public static final String MAX = ".max";
/**
* The suffix for min gauges.
*/
public static final String MIN = ".min";
/**
* The suffix for average value gauges.
*/
public static final String AVG = ".avg";
/**
* The suffix for alpha gauges.
*/
public static final String ALPHA = ".alpha";
/**
* The suffix for value gauges.
*/
public static final String VAL = ".val";
private final String name;
......@@ -90,23 +108,24 @@ public final class RichGauge {
}
/**
* @return the name of the gauge
* Return the name of the gauge.
* @return the name
*/
public String getName() {
return this.name;
}
/**
* @return the current value
* Return the current value of the gauge.
* @return the value
*/
public double getValue() {
return this.value;
}
/**
* Either an exponential weighted moving average or a simple mean, respectively,
* depending on whether the weight 'alpha' has been set for this gauge.
*
* Return either an exponential weighted moving average or a simple mean,
* respectively, depending on whether the weight 'alpha' has been set for this gauge.
* @return The average over all the accumulated values
*/
public double getAverage() {
......@@ -114,6 +133,7 @@ public final class RichGauge {
}
/**
* Return the maximum value of the gauge.
* @return the maximum value
*/
public double getMax() {
......@@ -121,6 +141,7 @@ public final class RichGauge {
}
/**
* Return the minimum value of the gauge.
* @return the minimum value
*/
public double getMin() {
......@@ -128,14 +149,16 @@ public final class RichGauge {
}
/**
* @return Number of times the value has been set.
* Return the number of times the value has been set.
* @return the value set count
*/
public long getCount() {
return this.count;
}
/**
* @return the smoothing constant value.
* Return the smoothing constant value.
* @return the alpha smoothing value
*/
public double getAlpha() {
return this.alpha;
......
......@@ -37,7 +37,8 @@ public interface RichGaugeReader {
Iterable<RichGauge> findAll();
/**
* @return the number of gauge values available
* Return the number of gauge values available.
* @return the number of values
*/
long count();
......
......@@ -97,8 +97,19 @@ public class SimpleInMemoryRepository<T> {
return this.values;
}
/**
* Callback used to update a value.
* @param <T> the value type
*/
public interface Callback<T> {
/**
* Modify an existing value.
* @param current the value to modify
* @return the updated value
*/
T modify(T current);
}
}
......@@ -32,7 +32,7 @@ import com.codahale.metrics.Timer;
/**
* A {@link MetricWriter} that send data to a Dropwizard {@link MetricRegistry} based on a
* naming convention:
* naming convention.
*
* <ul>
* <li>Updates to {@link #increment(Delta)} with names in "meter.*" are treated as
......
......@@ -15,7 +15,7 @@
*/
/**
* Support for writing metrics
* Support for writing metrics.
*/
package org.springframework.boot.actuate.metrics.writer;
......@@ -48,7 +48,8 @@ public class InMemoryTraceRepository implements TraceRepository {
}
/**
* @param capacity the capacity to set
* Set the capacity of the in-memory repository.
* @param capacity the capacity
*/
public void setCapacity(int capacity) {
synchronized (this.traces) {
......
......@@ -33,7 +33,7 @@ import org.springframework.util.StringUtils;
/**
* Abstract base class for a {@link BeanFactoryPostProcessor} that can be used to
* dynamically declare that all beans of a specific type should depend on one or more
* specific beans
* specific beans.
*
* @author Marcel Overdijk
* @author Dave Syer
......
......@@ -62,7 +62,7 @@ public abstract class AutoConfigurationPackages {
}
/**
* Return the auto-configuration base packages for the given bean factory
* Return the auto-configuration base packages for the given bean factory.
* @param beanFactory the source bean factory
* @return a list of auto-configuration packages
* @throws IllegalStateException if auto-configuration is not enabled
......
......@@ -30,6 +30,7 @@ public class JobExecutionEvent extends ApplicationEvent {
private final JobExecution execution;
/**
* Create a new {@link JobExecutionEvent} instance.
* @param execution the job execution
*/
public JobExecutionEvent(JobExecution execution) {
......@@ -38,6 +39,7 @@ public class JobExecutionEvent extends ApplicationEvent {
}
/**
* Return the job execution.
* @return the job execution
*/
public JobExecution getJobExecution() {
......
......@@ -42,7 +42,7 @@ public enum CacheType {
EHCACHE,
/**
* Hazelcast backed caching
* Hazelcast backed caching.
*/
HAZELCAST,
......
......@@ -38,6 +38,8 @@ import org.springframework.util.MultiValueMap;
import org.springframework.util.StringUtils;
/**
* Abstract base class for nested conditions.
*
* @author Phillip Webb
*/
abstract class AbstractNestedCondition extends SpringBootCondition implements
......
......@@ -88,7 +88,7 @@ public final class ConditionEvaluationReport {
}
/**
* Records the name of the classes that have been excluded from condition evaluation
* Records the name of the classes that have been excluded from condition evaluation.
* @param exclusions the names of the excluded classes
*/
public void recordExclusions(Collection<String> exclusions) {
......@@ -97,7 +97,7 @@ public final class ConditionEvaluationReport {
}
/**
* Records the names of the classes that are candidates for condition evaluation
* Records the names of the classes that are candidates for condition evaluation.
* @param evaluationCandidates the names of the classes whose conditions will be
* evaluated
*/
......
......@@ -27,7 +27,7 @@ import org.springframework.core.annotation.Order;
import org.springframework.core.type.AnnotatedTypeMetadata;
/**
* {@link Condition} that checks for a required version of Java
* {@link Condition} that checks for a required version of Java.
*
* @author Oliver Gierke
* @author Phillip Webb
......
......@@ -35,8 +35,8 @@ import org.springframework.util.StringUtils;
* @author Maciej Walkowiak
* @author Phillip Webb
* @author Stephane Nicoll
* @see ConditionalOnProperty
* @since 1.1.0
* @see ConditionalOnProperty
*/
class OnPropertyCondition extends SpringBootCondition {
......
......@@ -24,17 +24,17 @@ package org.springframework.boot.autoconfigure.condition;
public enum SearchStrategy {
/**
* Search only the current context
* Search only the current context.
*/
CURRENT,
/**
* Search all parents and ancestors, but not the current context
* Search all parents and ancestors, but not the current context.
*/
PARENTS,
/**
* Search the entire hierarchy
* Search the entire hierarchy.
*/
ALL
......
......@@ -25,7 +25,7 @@ import org.springframework.dao.annotation.PersistenceExceptionTranslationPostPro
/**
* {@link EnableAutoConfiguration Auto-configuration} for Spring's persistence exception
* translation
* translation.
*
* @author Andy Wilkinson
* @since 1.2.0
......
......@@ -23,7 +23,7 @@ import org.springframework.boot.autoconfigure.template.AbstractTemplateViewResol
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* {@link ConfigurationProperties} for configuring FreeMarker
* {@link ConfigurationProperties} for configuring FreeMarker.
*
* @author Dave Syer
* @author Andy Wilkinson
......
......@@ -23,7 +23,7 @@ import org.springframework.util.ClassUtils;
/**
* {@link TemplateAvailabilityProvider} that provides availability information for
* FreeMarker view templates
* FreeMarker view templates.
*
* @author Andy Wilkinson
* @since 1.1.0
......
......@@ -23,7 +23,7 @@ import org.springframework.util.ClassUtils;
/**
* {@link TemplateAvailabilityProvider} that provides availability information for Groovy
* view templates
* view templates.
*
* @author Dave Syer
* @since 1.1.0
......
......@@ -37,7 +37,7 @@ import org.springframework.security.config.annotation.web.builders.HttpSecurity;
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter;
/**
* {@link EnableAutoConfiguration Auto-configuration} for H2's web console
* {@link EnableAutoConfiguration Auto-configuration} for H2's web console.
*
* @author Andy Wilkinson
* @since 1.3.0
......
......@@ -22,7 +22,7 @@ import javax.validation.constraints.Pattern;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Configuration properties for H2's console
* Configuration properties for H2's console.
*
* @author Andy Wilkinson
* @since 1.3.0
......
......@@ -31,7 +31,7 @@ import com.fasterxml.jackson.databind.MapperFeature;
import com.fasterxml.jackson.databind.SerializationFeature;
/**
* Configuration properties to configure Jackson
* Configuration properties to configure Jackson.
*
* @author Andy Wilkinson
* @author Marcel Overdijk
......
......@@ -188,6 +188,8 @@ public class DataSourceAutoConfiguration {
/**
* Returns the class loader for the {@link DataSource} class. Used to ensure that
* the driver class can actually be loaded by the data source.
* @param context the condition context
* @return the class loader
*/
private ClassLoader getDataSourceClassLoader(ConditionContext context) {
Class<?> dataSourceClass = new DataSourceBuilder(context.getClassLoader())
......@@ -222,7 +224,7 @@ public class DataSourceAutoConfiguration {
/**
* {@link Condition} to detect when a {@link DataSource} is available (either because
* the user provided one or because one will be auto-configured)
* the user provided one or because one will be auto-configured).
*/
@Order(Ordered.LOWEST_PRECEDENCE - 10)
static class DataSourceAvailableCondition extends SpringBootCondition {
......
......@@ -69,22 +69,22 @@ enum DatabaseDriver {
GOOGLE("com.google.appengine.api.rdbms.AppEngineDriver"),
/**
* Oracle
* Oracle.
*/
ORACLE("oracle.jdbc.OracleDriver", "oracle.jdbc.xa.client.OracleXADataSource"),
/**
* Postres
* Postres.
*/
POSTGRESQL("org.postgresql.Driver", "org.postgresql.xa.PGXADataSource"),
/**
* JTDS
* JTDS.
*/
JTDS("net.sourceforge.jtds.jdbc.Driver"),
/**
* SQL Server
* SQL Server.
*/
SQLSERVER("com.microsoft.sqlserver.jdbc.SQLServerDriver",
"com.microsoft.sqlserver.jdbc.SQLServerXADataSource");
......@@ -103,14 +103,16 @@ enum DatabaseDriver {
}
/**
* @return the driverClassName or {@code null}
* Return the driver class name.
* @return the class name or {@code null}
*/
public String getDriverClassName() {
return this.driverClassName;
}
/**
* @return the xaDataSourceClassName or {@code null}
* Return the XA driver source class name.
* @return the class name or {@code null}
*/
public String getXaDataSourceClassName() {
return this.xaDataSourceClassName;
......
......@@ -53,7 +53,7 @@ class DriverClassNameProvider {
}
/**
* Find a JDBC driver class name based on given JDBC URL
* Find a JDBC driver class name based on given JDBC URL.
* @param jdbcUrl JDBC URL
* @return driver class name or null if not found
*/
......
......@@ -82,7 +82,7 @@ public class JndiConnectionFactoryAutoConfiguration {
}
/**
* Condition for JNDI name or a specific property
* Condition for JNDI name or a specific property.
*/
static class JndiOrPropertyCondition extends AnyNestedCondition {
......
......@@ -19,7 +19,7 @@ package org.springframework.boot.autoconfigure.jms.activemq;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Configuration properties for ActiveMQ
* Configuration properties for ActiveMQ.
*
* @author Greg Turnquist
* @author Stephane Nicoll
......
......@@ -92,6 +92,7 @@ class ArtemisConnectionFactoryFactory {
/**
* Deduce the {@link ArtemisMode} to use if none has been set.
* @return the mode
*/
private ArtemisMode deduceMode() {
if (this.properties.getEmbedded().isEnabled()
......
......@@ -25,7 +25,7 @@ import org.apache.activemq.artemis.core.remoting.impl.invm.TransportConstants;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Configuration properties for Artemis
* Configuration properties for Artemis.
*
* @author Eddú Meléndez
* @author Stephane Nicoll
......
......@@ -92,6 +92,7 @@ class HornetQConnectionFactoryFactory {
/**
* Deduce the {@link HornetQMode} to use if none has been set.
* @return the mode
*/
private HornetQMode deduceMode() {
if (this.properties.getEmbedded().isEnabled()
......
......@@ -25,7 +25,7 @@ import org.hornetq.core.remoting.impl.invm.TransportConstants;
import org.springframework.boot.context.properties.ConfigurationProperties;
/**
* Configuration properties for HornetQ
* Configuration properties for HornetQ.
*
* @author Stephane Nicoll
* @since 1.1.0
......
......@@ -48,7 +48,8 @@ public class ParentAwareNamingStrategy extends MetadataNamingStrategy implements
}
/**
* @param ensureUniqueRuntimeObjectNames the ensureUniqueRuntimeObjectNames to set
* Set if unique runtime object names should be ensured.
* @param ensureUniqueRuntimeObjectNames {@code true} if unique names should ensured.
*/
public void setEnsureUniqueRuntimeObjectNames(boolean ensureUniqueRuntimeObjectNames) {
this.ensureUniqueRuntimeObjectNames = ensureUniqueRuntimeObjectNames;
......
......@@ -183,7 +183,7 @@ public class MongoProperties {
}
/**
* Creates a {@link MongoClient} using the given {@code options}
* Creates a {@link MongoClient} using the given {@code options}.
*
* @param options the options
* @return the Mongo client
......
......@@ -25,7 +25,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import de.flapdoodle.embed.mongo.distribution.Feature;
/**
* Configuration properties for Embedded Mongo
* Configuration properties for Embedded Mongo.
*
* @author Andy Wilkinson
* @since 1.3.0
......
......@@ -59,14 +59,16 @@ public class MustacheResourceTemplateLoader implements TemplateLoader,
}
/**
* @param charSet the charSet to set
* Set the charset.
* @param charSet the charset
*/
public void setCharset(String charSet) {
this.charSet = charSet;
}
/**
* @param resourceLoader the resourceLoader to set
* Set the resource loader.
* @param resourceLoader the resource loader
*/
@Override
public void setResourceLoader(ResourceLoader resourceLoader) {
......
......@@ -23,7 +23,7 @@ import org.springframework.util.ClassUtils;
/**
* {@link TemplateAvailabilityProvider} that provides availability information for
* Mustache view templates
* Mustache view templates.
*
* @author Dave Syer
* @since 1.2.2
......
......@@ -39,8 +39,8 @@ public class MustacheView extends AbstractTemplateView {
/**
* Create a new {@link MustacheView} instance.
* @see #setTemplate(Template)
* @since 1.2.5
* @see #setTemplate(Template)
*/
public MustacheView() {
}
......
......@@ -55,14 +55,16 @@ public class MustacheViewResolver extends UrlBasedViewResolver {
}
/**
* @param compiler the compiler to set
* Set the compiler.
* @param compiler the compiler
*/
public void setCompiler(Compiler compiler) {
this.compiler = compiler;
}
/**
* @param charset the charset to set
* Set the charset.
* @param charset the charset
*/
public void setCharset(String charset) {
this.charset = charset;
......
......@@ -141,7 +141,8 @@ public abstract class JpaBaseConfiguration implements BeanFactoryAware {
}
/**
* @return the jtaTransactionManager or {@code null}
* Return the JTA transaction manager.
* @return the transaction manager or {@code null}
*/
protected JtaTransactionManager getJtaTransactionManager() {
return this.jtaTransactionManager;
......
......@@ -30,7 +30,7 @@ import org.springframework.context.annotation.Configuration;
import com.sendgrid.SendGrid;
/**
* {@link EnableAutoConfiguration Auto-configuration} for SendGrid
* {@link EnableAutoConfiguration Auto-configuration} for SendGrid.
*
* @author Maciej Walkowiak
* @since 1.3.0
......
......@@ -31,7 +31,7 @@ import org.springframework.context.annotation.Configuration;
import org.springframework.util.StringUtils;
/**
* {@link EnableAutoConfiguration Auto-configuration} for Solr
* {@link EnableAutoConfiguration Auto-configuration} for Solr.
*
* @author Christoph Strobl
* @since 1.1.0
......
......@@ -21,7 +21,7 @@ import org.springframework.core.io.ResourceLoader;
/**
* Indicates the availability of view templates for a particular templating engine such as
* FreeMarker or Thymeleaf
* FreeMarker or Thymeleaf.
*
* @author Andy Wilkinson
* @since 1.1.0
......
......@@ -23,7 +23,7 @@ import org.springframework.util.ClassUtils;
/**
* {@link TemplateAvailabilityProvider} that provides availability information for
* Thymeleaf view templates
* Thymeleaf view templates.
*
* @author Andy Wilkinson
* @since 1.1.0
......
......@@ -24,7 +24,7 @@ import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.web.servlet.view.velocity.VelocityViewResolver;
/**
* {@link ConfigurationProperties} for configuring Velocity
* {@link ConfigurationProperties} for configuring Velocity.
*
* @author Andy Wilkinson
* @since 1.1.0
......
......@@ -23,7 +23,7 @@ import org.springframework.util.ClassUtils;
/**
* {@link TemplateAvailabilityProvider} that provides availability information for
* Velocity view templates
* Velocity view templates.
*
* @author Andy Wilkinson
* @since 1.1.0
......
......@@ -30,7 +30,7 @@ import org.springframework.http.converter.json.MappingJackson2HttpMessageConvert
import com.google.gson.Gson;
/**
* Configuration for HTTP Message converters that use Gson
* Configuration for HTTP Message converters that use Gson.
*
* @author Andy Wilkinson
* @since 1.2.2
......
......@@ -30,7 +30,7 @@ import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.dataformat.xml.XmlMapper;
/**
* Configuration for HTTP message converters that use Jackson
* Configuration for HTTP message converters that use Jackson.
*
* @author Andy Wilkinson
* @since 1.2.2
......
......@@ -23,7 +23,7 @@ import org.springframework.util.ClassUtils;
/**
* {@link TemplateAvailabilityProvider} that provides availability information for JSP
* view templates
* view templates.
*
* @author Andy Wilkinson
* @author Stephane Nicoll
......
......@@ -119,7 +119,7 @@ public class MultipartProperties {
}
/**
* Create a new {@link MultipartConfigElement} using the
* Create a new {@link MultipartConfigElement} using the properties.
* @return a new {@link MultipartConfigElement} configured using there properties
*/
public MultipartConfigElement createMultipartConfig() {
......
......@@ -206,7 +206,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
/**
* Get the session timeout
* Get the session timeout.
* @return the session timeout
* @deprecated since 1.3.0 in favor of {@code session.timeout}.
*/
......@@ -217,7 +217,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
/**
* Set the session timeout
* Set the session timeout.
* @param sessionTimeout the session timeout
* @deprecated since 1.3.0 in favor of {@code session.timeout}.
*/
......@@ -582,7 +582,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
/**
* Set the format pattern for access logs
* Set the format pattern for access logs.
* @param accessLogPattern the pattern for access logs
* @deprecated since 1.3.0 in favor of {@code server.tomcat.accesslog.pattern}
*/
......@@ -903,7 +903,7 @@ public class ServerProperties implements EmbeddedServletContainerCustomizer, Ord
}
/**
* Set the format pattern for access logs
* Set the format pattern for access logs.
* @param accessLogPattern the pattern for access logs
* @deprecated since 1.3.0 in favor of {@code server.undertow.accesslog.pattern}
*/
......
......@@ -30,8 +30,8 @@ import static org.junit.Assert.assertEquals;
/**
* Abstract base class for {@link DataSourcePoolMetadata} tests.
*
* @author Stephane Nicoll
* @param <D> the data source pool metadata type
* @author Stephane Nicoll
*/
public abstract class AbstractDataSourcePoolMetadataTests<D extends AbstractDataSourcePoolMetadata<?>> {
......
......@@ -292,7 +292,7 @@ public class OAuth2AutoConfigurationTests {
/**
* Connect to the oauth service, get a token, and then attempt some operations using
* it.
* @param config
* @param config the client details.
*/
private void verifyAuthentication(ClientDetails config) {
verifyAuthentication(config, HttpStatus.FORBIDDEN);
......
......@@ -73,8 +73,8 @@ public interface Command {
/**
* Run the command.
* @param args command arguments (this will not include the command itself)
* @throws Exception if the command fails
* @return the outcome of the command
* @throws Exception if the command fails
*/
ExitStatus run(String... args) throws Exception;
......
......@@ -32,9 +32,9 @@ import org.springframework.util.StringUtils;
/**
* Main class used to run {@link Command}s.
*
* @author Phillip Webb
* @see #addCommand(Command)
* @see CommandRunner#runAndHandleErrors(String[])
* @author Phillip Webb
*/
public class CommandRunner implements Iterable<Command> {
......@@ -201,8 +201,8 @@ public class CommandRunner implements Iterable<Command> {
/**
* Parse the arguments and run a suitable command.
* @param args the arguments
* @throws Exception if the command fails
* @return the outcome of the command
* @throws Exception if the command fails
*/
protected ExitStatus run(String... args) throws Exception {
if (args.length == 0) {
......
......@@ -29,6 +29,7 @@ public class HelpExample {
private final String example;
/**
* Create a new {@link HelpExample} instance.
* @param description The description (in the form "to ....")
* @param example the example
*/
......
......@@ -32,7 +32,7 @@ import org.springframework.boot.cli.compiler.grape.RepositoryConfiguration;
import joptsimple.OptionSet;
/**
* {@link Command} to grab the dependencies of one or more Groovy scripts
* {@link Command} to grab the dependencies of one or more Groovy scripts.
*
* @author Andy Wilkinson
*/
......
......@@ -69,6 +69,9 @@ public class InitCommand extends OptionParsingCommand {
return examples;
}
/**
* {@link OptionHandler} for {@link InitCommand}.
*/
static class InitOptionHandler extends OptionHandler {
private final ServiceCapabilitiesReportGenerator serviceCapabilitiesReport;
......
......@@ -81,7 +81,7 @@ class InitializrService {
}
/**
* Generate a project based on the specified {@link ProjectGenerationRequest}
* Generate a project based on the specified {@link ProjectGenerationRequest}.
* @param request the generation request
* @return an entity defining the project
* @throws IOException if generation fails
......@@ -166,14 +166,18 @@ class InitializrService {
}
/**
* Request the creation of the project using the specified URL
* Request the creation of the project using the specified URL.
* @param url the URL
* @return the response
*/
private CloseableHttpResponse executeProjectGenerationRequest(URI url) {
return execute(new HttpGet(url), url, "generate project");
}
/**
* Retrieves the meta-data of the service at the specified URL
* Retrieves the meta-data of the service at the specified URL.
* @param url the URL
* @return the response
*/
private CloseableHttpResponse executeInitializrMetadataRetrieval(String url) {
HttpGet request = new HttpGet(url);
......
......@@ -76,8 +76,8 @@ class ProjectGenerationRequest {
/**
* The URL of the service to use.
* @see #DEFAULT_SERVICE_URL
* @return the service URL
* @see #DEFAULT_SERVICE_URL
*/
public String getServiceUrl() {
return this.serviceUrl;
......@@ -299,7 +299,7 @@ class ProjectGenerationRequest {
}
/**
* Generates the URI to use to generate a project represented by this request
* Generates the URI to use to generate a project represented by this request.
* @param metadata the metadata that describes the service
* @return the project generation URI
*/
......
......@@ -19,7 +19,7 @@ package org.springframework.boot.cli.command.init;
import org.apache.http.entity.ContentType;
/**
* Represent the response of a {@link ProjectGenerationRequest}
* Represent the response of a {@link ProjectGenerationRequest}.
*
* @author Stephane Nicoll
* @since 1.2.0
......@@ -37,7 +37,7 @@ class ProjectGenerationResponse {
}
/**
* Return the {@link ContentType} of this instance
* Return the {@link ContentType} of this instance.
* @return the content type
*/
public ContentType getContentType() {
......
......@@ -70,6 +70,9 @@ class ProjectGenerator {
/**
* Detect if the project should be extracted.
* @param request the generation request
* @param response the generation response
* @return if the project should be extracted
*/
private boolean shouldExtract(ProjectGenerationRequest request,
ProjectGenerationResponse response) {
......
......@@ -31,7 +31,7 @@ import org.springframework.boot.cli.compiler.GroovyCompiler;
import org.springframework.boot.cli.compiler.GroovyCompilerConfiguration;
/**
* A {@code DependencyResolver} implemented using Groovy's {@code @Grab}
* A {@code DependencyResolver} implemented using Groovy's {@code @Grab}.
*
* @author Dave Syer
* @author Andy Wilkinson
......
......@@ -28,7 +28,7 @@ import joptsimple.OptionSet;
import joptsimple.OptionSpec;
/**
* {@link Command} to uninstall dependencies from the CLI's lib directory
* {@link Command} to uninstall dependencies from the CLI's lib directory.
*
* @author Dave Syer
* @author Andy Wilkinson
......
......@@ -65,7 +65,7 @@ import joptsimple.OptionSet;
import joptsimple.OptionSpec;
/**
* {@link Command} to create a self-contained executable jar file from a CLI application
* {@link Command} to create a self-contained executable jar file from a CLI application.
*
* @author Andy Wilkinson
* @author Phillip Webb
......
......@@ -36,7 +36,7 @@ import org.springframework.util.AntPathMatcher;
import org.springframework.util.StringUtils;
/**
* Used to match resources for inclusion in a CLI application's jar file
* Used to match resources for inclusion in a CLI application's jar file.
*
* @author Andy Wilkinson
*/
......
......@@ -22,7 +22,7 @@ import joptsimple.OptionSpec;
/**
* An {@link OptionHandler} for commands that result in the compilation of one or more
* Groovy scripts
* Groovy scripts.
*
* @author Andy Wilkinson
* @author Dave Syer
......
......@@ -95,7 +95,7 @@ public class OptionHandler {
* Run the command using the specified parsed {@link OptionSet}.
* @param options the parsed option set
* @return an ExitStatus
* @throws Exception
* @throws Exception in case of errors
*/
protected ExitStatus run(OptionSet options) throws Exception {
if (this.closure != null) {
......
......@@ -28,7 +28,7 @@ import joptsimple.OptionSpec;
/**
* Simple adapter class to present an {@link OptionSet} as a
* {@link GroovyCompilerConfiguration}
* {@link GroovyCompilerConfiguration}.
*
* @author Andy Wilkinson
*/
......
......@@ -42,7 +42,7 @@ class AnsiString {
}
/**
* Append text with the given ANSI codes
* Append text with the given ANSI codes.
* @param text the text to append
* @param codes the ANSI codes
* @return this string
......
......@@ -65,7 +65,7 @@ public class Shell {
/**
* Create a new {@link Shell} instance.
* @throws IOException
* @throws IOException in case of I/O errors
*/
Shell() throws IOException {
attachSignalHandler();
......@@ -174,7 +174,7 @@ public class Shell {
}
/**
* Final handle an interrup signal (CTRL-C)
* Final handle an interrup signal (CTRL-C).
*/
protected void handleSigInt() {
if (this.commandRunner.handleSigInt()) {
......
......@@ -27,12 +27,12 @@ package org.springframework.boot.cli.command.status;
public final class ExitStatus {
/**
* Generic "OK" exit status with zero exit code and {@literal hangup=false}
* Generic "OK" exit status with zero exit code and {@literal hangup=false}.
*/
public static ExitStatus OK = new ExitStatus(0, "OK");
/**
* Generic "not OK" exit status with non-zero exit code and {@literal hangup=true}
* Generic "not OK" exit status with non-zero exit code and {@literal hangup=true}.
*/
public static ExitStatus ERROR = new ExitStatus(-1, "ERROR", true);
......@@ -43,7 +43,7 @@ public final class ExitStatus {
private final boolean hangup;
/**
* Create a new ExitStatus with an exit code and name as specified.
* Create a new {@link ExitStatus} instance.
* @param code the exit code
* @param name the name
*/
......@@ -52,6 +52,7 @@ public final class ExitStatus {
}
/**
* Create a new {@link ExitStatus} instance.
* @param code the exit code
* @param name the name
* @param hangup true if it is OK for the caller to hangup
......@@ -63,7 +64,7 @@ public final class ExitStatus {
}
/**
* An exit code appropriate for use in System.exit()
* An exit code appropriate for use in {@code System.exit()}.
* @return an exit code
*/
public int getCode() {
......@@ -71,7 +72,7 @@ public final class ExitStatus {
}
/**
* A name describing the outcome
* A name describing the outcome.
* @return a name
*/
public String getName() {
......
......@@ -43,9 +43,9 @@ public class TestRunner {
/**
* Create a new {@link TestRunner} instance.
* @param configuration
* @param sources
* @param args
* @param configuration the configuration
* @param sources the sources
* @param args the args
*/
TestRunner(TestRunnerConfiguration configuration, String[] sources, String[] args) {
this.sources = sources.clone();
......
......@@ -38,6 +38,9 @@ import groovy.lang.GroovyClassLoader;
@Order(DependencyAutoConfigurationTransformation.ORDER)
public class DependencyAutoConfigurationTransformation implements ASTTransformation {
/**
* The order of the transformation.
*/
public static final int ORDER = DependencyManagementBomTransformation.ORDER + 100;
private final GroovyClassLoader loader;
......
......@@ -60,7 +60,7 @@ public class DependencyCustomizer {
/**
* Create a new nested {@link DependencyCustomizer}.
* @param parent
* @param parent the parent customizer
*/
protected DependencyCustomizer(DependencyCustomizer parent) {
this.loader = parent.loader;
......
......@@ -55,7 +55,7 @@ import org.springframework.core.annotation.Order;
import groovy.grape.Grape;
/**
* {@link ASTTransformation} for processing {@link DependencyManagementBom} annotations
* {@link ASTTransformation} for processing {@link DependencyManagementBom} annotations.
*
* @author Andy Wilkinson
* @since 1.3.0
......@@ -63,6 +63,9 @@ import groovy.grape.Grape;
@Order(DependencyManagementBomTransformation.ORDER)
public class DependencyManagementBomTransformation extends AnnotatedNodeASTTransformation {
/**
* The order of the transformation.
*/
public static final int ORDER = Ordered.HIGHEST_PRECEDENCE;
private static final Set<String> DEPENDENCY_MANAGEMENT_BOM_ANNOTATION_NAMES = Collections
......
......@@ -42,6 +42,9 @@ import org.springframework.core.annotation.Order;
@Order(GroovyBeansTransformation.ORDER)
public class GroovyBeansTransformation implements ASTTransformation {
/**
* The order of the transformation.
*/
public static final int ORDER = DependencyManagementBomTransformation.ORDER + 200;
@Override
......
......@@ -171,8 +171,9 @@ public class GroovyCompiler {
* returned from this method.
* @param sources the sources to compile
* @return compiled classes
* @throws CompilationFailedException
* @throws IOException
* @throws CompilationFailedException in case of compilation failures
* @throws IOException in case of I/O errors
* @throws CompilationFailedException in case of compilation errors
*/
public Class<?>[] compile(String... sources) throws CompilationFailedException,
IOException {
......
......@@ -59,7 +59,7 @@ public interface GroovyCompilerConfiguration {
boolean isAutoconfigure();
/**
* Returns the classpath for local resources
* Returns the classpath for local resources.
* @return a path for local resources
*/
String[] getClasspath();
......
......@@ -47,6 +47,7 @@ public final class RepositoryConfigurationFactory {
}
/**
* Create a new default repository configuration.
* @return the newly-created default repository configuration
*/
public static List<RepositoryConfiguration> createDefaultRepositoryConfiguration() {
......
......@@ -41,6 +41,9 @@ import groovy.lang.Grab;
public class ResolveDependencyCoordinatesTransformation extends
AnnotatedNodeASTTransformation {
/**
* The order of the transformation.
*/
public static final int ORDER = DependencyManagementBomTransformation.ORDER + 300;
private static final Set<String> GRAB_ANNOTATION_NAMES = Collections
......
......@@ -20,7 +20,7 @@ import org.codehaus.groovy.transform.ASTTransformation;
/**
* Marker interface for AST transformations that should be installed automatically from
* META-INF/services
* {@code META-INF/services}.
*
* @author Dave Syer
*/
......
......@@ -24,7 +24,7 @@ import org.springframework.boot.cli.compiler.CompilerAutoConfiguration;
import org.springframework.boot.cli.compiler.DependencyCustomizer;
/**
* {@link CompilerAutoConfiguration} for JUnit
* {@link CompilerAutoConfiguration} for JUnit.
*
* @author Greg Turnquist
*/
......
......@@ -24,7 +24,7 @@ import org.springframework.boot.cli.compiler.CompilerAutoConfiguration;
import org.springframework.boot.cli.compiler.DependencyCustomizer;
/**
* {@link CompilerAutoConfiguration} for Spock test framework
* {@link CompilerAutoConfiguration} for Spock test framework.
*
* @author Greg Turnquist
*/
......
......@@ -32,7 +32,7 @@ import org.springframework.boot.cli.compiler.GroovyCompilerConfiguration;
import groovy.lang.GroovyClassLoader;
/**
* {@link CompilerAutoConfiguration} for Spring Test
* {@link CompilerAutoConfiguration} for Spring Test.
*
* @author Dave Syer
* @since 1.1.0
......
......@@ -22,7 +22,7 @@ import java.util.List;
/**
* {@link DependencyManagement} that delegates to one or more {@link DependencyManagement}
* instances
* instances.
*
* @author Andy Wilkinson
* @since 1.3.0
......
......@@ -19,7 +19,7 @@ package org.springframework.boot.cli.compiler.dependencies;
import java.util.List;
/**
* An encapsulation of dependency management information
* An encapsulation of dependency management information.
*
* @author Andy Wilkinson
* @since 1.3.0
......
......@@ -25,7 +25,7 @@ import org.apache.maven.model.Model;
import org.springframework.boot.cli.compiler.dependencies.Dependency.Exclusion;
/**
* {@link DependencyManagement} derived from a Maven {@link Model}
* {@link DependencyManagement} derived from a Maven {@link Model}.
*
* @author Andy Wilkinson
* @since 1.3.0
......
......@@ -24,7 +24,8 @@ import org.apache.maven.model.io.DefaultModelReader;
import org.apache.maven.model.locator.DefaultModelLocator;
/**
* {@link DependencyManagement} derived from the effective pom of spring-boot-dependencies
* {@link DependencyManagement} derived from the effective pom of
* {@code spring-boot-dependencies}.
*
* @author Andy Wilkinson
* @since 1.3.0
......
......@@ -17,14 +17,14 @@
package org.springframework.boot.cli.compiler.grape;
/**
* Reports progress on a dependency resolution operation
* Reports progress on a dependency resolution operation.
*
* @author Andy Wilkinson
*/
interface ProgressReporter {
/**
* Notification that the operation has completed
* Notification that the operation has completed.
*/
void finished();
......
......@@ -21,7 +21,7 @@ import java.net.URI;
import org.springframework.util.ObjectUtils;
/**
* The configuration of a repository
* The configuration of a repository.
*
* @author Andy Wilkinson
*/
......@@ -47,7 +47,8 @@ public final class RepositoryConfiguration {
}
/**
* @return the name of the repository
* Return the name of the repository.
* @return the repository name
*/
public String getName() {
return this.name;
......@@ -60,15 +61,16 @@ public final class RepositoryConfiguration {
}
/**
* @return the uri of the repository
* Return the URI of the repository.
* @return the repository URI
*/
public URI getUri() {
return this.uri;
}
/**
* @return {@code true} if the repository should enable access to snapshots,
* {@code false} otherwise
* Return if the repository should enable access to snapshots.
* @return {@code true} if snapshot access is enabled
*/
public boolean getSnapshotsEnabled() {
return this.snapshotsEnabled;
......
......@@ -28,7 +28,7 @@ import org.eclipse.aether.RepositorySystem;
public interface RepositorySystemSessionAutoConfiguration {
/**
* Apply the configuration
* Apply the configuration.
* @param session the repository system session
* @param repositorySystem the repository system
*/
......
......@@ -24,7 +24,7 @@ import org.springframework.boot.cli.compiler.MavenSettingsReader;
/**
* Auto-configuration for a RepositorySystemSession that uses Maven's settings.xml to
* determine the configuration settings
* determine the configuration settings.
*
* @author Andy Wilkinson
*/
......
......@@ -32,8 +32,14 @@ import org.springframework.boot.cli.app.SpringApplicationLauncher;
*/
public final class PackagedSpringApplicationLauncher {
/**
* The entry containing the source class.
*/
public static final String SOURCE_ENTRY = "Spring-Application-Source-Classes";
/**
* The entry containing the start class.
*/
public static final String START_CLASS_ENTRY = "Start-Class";
private PackagedSpringApplicationLauncher() {
......
......@@ -43,17 +43,17 @@ import org.springframework.util.StringUtils;
public abstract class ResourceUtils {
/**
* Pseudo URL prefix for loading from the class path: "classpath:"
* Pseudo URL prefix for loading from the class path: "classpath:".
*/
public static final String CLASSPATH_URL_PREFIX = "classpath:";
/**
* Pseudo URL prefix for loading all resources from the class path: "classpath*:"
* Pseudo URL prefix for loading all resources from the class path: "classpath*:".
*/
public static final String ALL_CLASSPATH_URL_PREFIX = "classpath*:";
/**
* URL prefix for loading from the file system: "file:"
* URL prefix for loading from the file system: "file:".
*/
public static final String FILE_URL_PREFIX = "file:";
......
......@@ -26,6 +26,8 @@ import org.springframework.boot.cli.compiler.autoconfigure.SpringMobileCompilerA
/**
* Pseudo annotation used to trigger {@link SpringMobileCompilerAutoConfiguration}.
*
* @author Phillip Webb
*/
@Target(ElementType.TYPE)
@Documented
......
......@@ -54,7 +54,7 @@ public class DevToolsProperties {
}
/**
* Restart properties
* Restart properties.
*/
public static class Restart {
......@@ -173,7 +173,7 @@ public class DevToolsProperties {
}
/**
* LiveReload properties
* LiveReload properties.
*/
public static class Livereload {
......
......@@ -45,7 +45,7 @@ public class OptionalLiveReloadServer {
/**
* {@link PostConstruct} method to start the server if possible.
* @throws Exception
* @throws Exception in case of errors
*/
@PostConstruct
public void startServer() throws Exception {
......
......@@ -15,7 +15,7 @@
*/
/**
* Support for classpath monitoring
* Support for classpath monitoring.
*/
package org.springframework.boot.devtools.classpath;
......@@ -35,8 +35,8 @@ import org.springframework.util.Assert;
*
* @author Andy Clement
* @author Phillip Webb
* @see FileChangeListener
* @since 1.3.0
* @see FileChangeListener
*/
public class FileSystemWatcher {
......
......@@ -31,6 +31,8 @@ import org.apache.commons.logging.LogFactory;
/**
* A {@link LiveReloadServer} connection.
*
* @author Phillip Webb
*/
class Connection {
......@@ -58,7 +60,7 @@ class Connection {
* @param socket the source socket
* @param inputStream the socket input stream
* @param outputStream the socket output stream
* @throws IOException
* @throws IOException in case of I/O errors
*/
Connection(Socket socket, InputStream inputStream, OutputStream outputStream)
throws IOException {
......@@ -71,7 +73,7 @@ class Connection {
/**
* Run the connection.
* @throws Exception
* @throws Exception in case of errors
*/
public void run() throws Exception {
if (this.header.contains("Upgrade: websocket")
......@@ -126,7 +128,7 @@ class Connection {
/**
* Trigger livereload for the client using this connection.
* @throws IOException
* @throws IOException in case of I/O errors
*/
public void triggerReload() throws IOException {
if (this.webSocket) {
......@@ -152,7 +154,7 @@ class Connection {
/**
* Close the connection.
* @throws IOException
* @throws IOException in case of I/O errors
*/
public void close() throws IOException {
this.running = false;
......
......@@ -40,7 +40,7 @@ class ConnectionInputStream extends FilterInputStream {
* any HTTP content after the header since the initial request is usually just a
* WebSocket upgrade.
* @return the HTTP header
* @throws IOException
* @throws IOException in case of I/O errors
*/
public String readHeader() throws IOException {
byte[] buffer = new byte[BUFFER_SIZE];
......@@ -58,7 +58,7 @@ class ConnectionInputStream extends FilterInputStream {
* @param buffer the destination buffer
* @param offset the buffer offset
* @param length the amount of data to read
* @throws IOException
* @throws IOException in case of I/O errors
*/
public void readFully(byte[] buffer, int offset, int length) throws IOException {
while (length > 0) {
......@@ -72,7 +72,7 @@ class ConnectionInputStream extends FilterInputStream {
* Read a single byte from the stream (checking that the end of the stream hasn't been
* reached.
* @return the content
* @throws IOException
* @throws IOException in case of I/O errors
*/
public int checkedRead() throws IOException {
int b = read();
......@@ -84,12 +84,12 @@ class ConnectionInputStream extends FilterInputStream {
/**
* Read a number of bytes from the stream (checking that the end of the stream hasn't
* been reached)
* been reached).
* @param buffer the destination buffer
* @param offset the buffer offset
* @param length the length to read
* @return the amount of data read
* @throws IOException
* @throws IOException in case of I/O errors
*/
public int checkedRead(byte[] buffer, int offset, int length) throws IOException {
int amountRead = read(buffer, offset, length);
......
......@@ -107,6 +107,9 @@ class Frame {
return new Frame(Type.forCode(firstByte & 0x0F), payload);
}
/**
* Frame types.
*/
public enum Type {
/**
......
......@@ -38,8 +38,8 @@ import org.springframework.util.Assert;
* A <a href="http://livereload.com">livereload</a> server.
*
* @author Phillip Webb
* @see <a href="http://livereload.com">livereload.com</a>
* @since 1.3.0
* @see <a href="http://livereload.com">livereload.com</a>
*/
public class LiveReloadServer {
......@@ -109,7 +109,7 @@ public class LiveReloadServer {
/**
* Start the livereload server and accept incoming connections.
* @throws IOException
* @throws IOException in case of I/O errors
*/
public synchronized void start() throws IOException {
Assert.state(!isStarted(), "Server already started");
......@@ -137,7 +137,7 @@ public class LiveReloadServer {
}
/**
* Return the port that the server is listening on
* Return the port that the server is listening on.
* @return the server port
*/
public int getPort() {
......@@ -165,7 +165,7 @@ public class LiveReloadServer {
/**
* Gracefully stop the livereload server.
* @throws IOException
* @throws IOException in case of I/O errors
*/
public synchronized void stop() throws IOException {
if (this.listenThread != null) {
......@@ -231,7 +231,7 @@ public class LiveReloadServer {
* @param inputStream the socket input stream
* @param outputStream the socket output stream
* @return a connection
* @throws IOException
* @throws IOException in case of I/O errors
*/
protected Connection createConnection(Socket socket, InputStream inputStream,
OutputStream outputStream) throws IOException {
......@@ -303,7 +303,7 @@ public class LiveReloadServer {
}
/**
* {@link ThreadFactory} to create the worker threads,
* {@link ThreadFactory} to create the worker threads.
*/
private static class WorkerThreadFactory implements ThreadFactory {
......
......@@ -27,6 +27,8 @@ import org.springframework.core.type.AnnotatedTypeMetadata;
/**
* Condition used to check that the actual local port is available.
*
* @author Phillip Webb
*/
class LocalDebugPortAvailableCondition extends SpringBootCondition {
......
......@@ -55,7 +55,7 @@ public class Dispatcher {
* @param request the request
* @param response the response
* @return {@code true} if the request was dispatched
* @throws IOException
* @throws IOException in case of I/O errors
*/
public boolean handle(ServerHttpRequest request, ServerHttpResponse response)
throws IOException {
......
......@@ -33,7 +33,7 @@ public interface Handler {
* Handle the request.
* @param request the request
* @param response the response
* @throws IOException
* @throws IOException in case of I/O errors
*/
void handle(ServerHttpRequest request, ServerHttpResponse response)
throws IOException;
......
......@@ -20,7 +20,7 @@ import org.springframework.http.server.ServerHttpRequest;
import org.springframework.util.Assert;
/**
* {@link HandlerMapper} implementation that maps incoming URLs
* {@link HandlerMapper} implementation that maps incoming URLs.
*
* @author Rob Winch
* @author Phillip Webb
......
......@@ -256,7 +256,7 @@ public class Restarter {
/**
* Start the application.
* @param failureHandler a failure handler for application that won't start
* @throws Exception
* @throws Exception in case of errors
*/
protected void start(FailureHandler failureHandler) throws Exception {
do {
......@@ -292,7 +292,7 @@ public class Restarter {
* Relaunch the application using the specified classloader.
* @param classLoader the classloader to use
* @return any exception that caused the launch to fail or {@code null}
* @throws Exception
* @throws Exception in case of errors
*/
protected Throwable relaunch(ClassLoader classLoader) throws Exception {
RestartLauncher launcher = new RestartLauncher(classLoader, this.mainClassName,
......@@ -304,7 +304,7 @@ public class Restarter {
/**
* Stop the application.
* @throws Exception
* @throws Exception in case of errors
*/
protected void stop() throws Exception {
this.logger.debug("Stopping application");
......
......@@ -25,8 +25,8 @@ import org.springframework.util.Assert;
* files that have been added, modified or deleted since the original JAR was created.
*
* @author Phillip Webb
* @see ClassLoaderFileRepository
* @since 1.3.0
* @see ClassLoaderFileRepository
*/
public class ClassLoaderFile implements Serializable {
......
......@@ -15,7 +15,7 @@
*/
/**
* Classloaders used for reload support
* Classloaders used for reload support.
*/
package org.springframework.boot.devtools.restart.classloader;
......@@ -15,7 +15,7 @@
*/
/**
* Application restart support
* Application restart support.
*/
package org.springframework.boot.devtools.restart;
......@@ -64,7 +64,7 @@ public class HttpRestartServer {
* Handle a server request.
* @param request the request
* @param response the response
* @throws IOException
* @throws IOException in case of I/O errors
*/
public void handle(ServerHttpRequest request, ServerHttpResponse response)
throws IOException {
......
......@@ -15,7 +15,7 @@
*/
/**
* Remote restart server
* Remote restart server.
*/
package org.springframework.boot.devtools.restart.server;
......@@ -72,7 +72,7 @@ public class TunnelClient implements SmartInitializingSingleton {
/**
* Start the client and accept incoming connections on the port.
* @throws IOException
* @throws IOException in case of I/O errors
*/
public synchronized void start() throws IOException {
Assert.state(this.serverThread == null, "Server already started");
......@@ -85,7 +85,7 @@ public class TunnelClient implements SmartInitializingSingleton {
/**
* Stop the client, disconnecting any servers.
* @throws IOException
* @throws IOException in case of I/O errors
*/
public synchronized void stop() throws IOException {
if (this.serverThread != null) {
......
......@@ -34,7 +34,7 @@ public interface TunnelConnection {
* @param closeable a closeable to call when the channel is closed
* @return A {@link WritableByteChannel} that should be used to send any outgoing data
* destined for the remote server
* @throws Exception
* @throws Exception in case of errors
*/
WritableByteChannel open(WritableByteChannel incomingChannel, Closeable closeable)
throws Exception;
......
......@@ -75,7 +75,7 @@ public class HttpTunnelPayload {
/**
* Assign this payload to the given {@link HttpOutputMessage}.
* @param message the message to assign this payload to
* @throws IOException
* @throws IOException in case of I/O errors
*/
public void assignTo(HttpOutputMessage message) throws IOException {
Assert.notNull(message, "Message must not be null");
......@@ -93,7 +93,7 @@ public class HttpTunnelPayload {
/**
* Write the content of this payload to the given target channel.
* @param channel the channel to write to
* @throws IOException
* @throws IOException in case of I/O errors
*/
public void writeTo(WritableByteChannel channel) throws IOException {
Assert.notNull(channel, "Channel must not be null");
......@@ -107,7 +107,7 @@ public class HttpTunnelPayload {
* is no payload.
* @param message the HTTP message
* @return the payload or {@code null}
* @throws IOException
* @throws IOException in case of I/O errors
*/
public static HttpTunnelPayload get(HttpInputMessage message) throws IOException {
long length = message.getHeaders().getContentLength();
......@@ -131,7 +131,7 @@ public class HttpTunnelPayload {
* the channel timed out whilst reading.
* @param channel the source channel
* @return payload data or {@code null}
* @throws IOException
* @throws IOException in case of I/O errors
*/
public static ByteBuffer getPayloadData(ReadableByteChannel channel)
throws IOException {
......
......@@ -132,7 +132,7 @@ public class HttpTunnelServer {
* Handle an incoming HTTP connection.
* @param request the HTTP request
* @param response the HTTP response
* @throws IOException
* @throws IOException in case of I/O errors
*/
public void handle(ServerHttpRequest request, ServerHttpResponse response)
throws IOException {
......@@ -142,7 +142,7 @@ public class HttpTunnelServer {
/**
* Handle an incoming HTTP connection.
* @param httpConnection the HTTP connection
* @throws IOException
* @throws IOException in case of I/O errors
*/
protected void handle(HttpConnection httpConnection) throws IOException {
try {
......@@ -157,7 +157,7 @@ public class HttpTunnelServer {
/**
* Returns the active server thread, creating and starting it if necessary.
* @return the {@code ServerThread} (never {@code null})
* @throws IOException
* @throws IOException in case of I/O errors
*/
protected ServerThread getServerThread() throws IOException {
synchronized (this) {
......@@ -316,7 +316,7 @@ public class HttpTunnelServer {
/**
* Handle an incoming {@link HttpConnection}.
* @param httpConnection the connection to handle.
* @throws IOException
* @throws IOException in case of I/O errors
*/
public void handleIncomingHttp(HttpConnection httpConnection) throws IOException {
if (this.closed) {
......@@ -446,7 +446,7 @@ public class HttpTunnelServer {
/**
* Send a HTTP status response.
* @param status the status to send
* @throws IOException
* @throws IOException in case of I/O errors
*/
public void respond(HttpStatus status) throws IOException {
Assert.notNull(status, "Status must not be null");
......@@ -457,7 +457,7 @@ public class HttpTunnelServer {
/**
* Send a payload response.
* @param payload the payload to send
* @throws IOException
* @throws IOException in case of I/O errors
*/
public void respond(HttpTunnelPayload payload) throws IOException {
Assert.notNull(payload, "Payload must not be null");
......
......@@ -26,7 +26,7 @@ package org.springframework.boot.devtools.tunnel.server;
public interface PortProvider {
/**
* Return the port number
* Return the port number.
* @return the port number
*/
int getPort();
......
......@@ -31,7 +31,7 @@ public interface TargetServerConnection {
* Open a connection to the target server with the specified timeout.
* @param timeout the read timeout
* @return a {@link ByteChannel} providing read/write access to the server
* @throws IOException
* @throws IOException in case of I/O errors
*/
ByteChannel open(int timeout) throws IOException;
......
......@@ -154,7 +154,7 @@ public class LiveReloadServerTests {
/**
* Useful main method for manual testing against a real browser.
* @param args main args
* @throws IOException
* @throws IOException in case of I/O errors
*/
public static void main(String[] args) throws IOException {
LiveReloadServer server = new LiveReloadServer();
......
......@@ -90,7 +90,7 @@ public class FindMainClass extends Task {
/**
* Set the main class, which will cause the search to be bypassed.
* @param mainClass
* @param mainClass the main class name
*/
public void setMainClass(String mainClass) {
this.mainClass = mainClass;
......@@ -98,15 +98,15 @@ public class FindMainClass extends Task {
/**
* Set the root location of classes to be searched.
* @param classesRoot
* @param classesRoot the root location
*/
public void setClassesRoot(File classesRoot) {
this.classesRoot = classesRoot;
}
/**
* Set the property to set (if unset, result will be printed to the log).
* @param property
* Set the ANT property to set (if left unset, result will be printed to the log).
* @param property the ANT property to set
*/
public void setProperty(String property) {
this.property = property;
......
......@@ -34,6 +34,9 @@ import org.json.JSONException;
*/
public final class ConfigurationMetadataRepositoryJsonBuilder {
/**
* UTF-8 Charset.
*/
public static final Charset UTF_8 = Charset.forName("UTF-8");
private Charset defaultCharset = UTF_8;
......@@ -54,7 +57,7 @@ public final class ConfigurationMetadataRepositoryJsonBuilder {
* Leaves the stream open when done.
* @param inputStream the source input stream
* @return this builder
* @throws IOException
* @throws IOException in case of I/O errors
*/
public ConfigurationMetadataRepositoryJsonBuilder withJsonResource(
InputStream inputStream) throws IOException {
......@@ -71,7 +74,7 @@ public final class ConfigurationMetadataRepositoryJsonBuilder {
* @param inputstream the source input stream
* @param charset the charset of the input
* @return this builder
* @throws IOException
* @throws IOException in case of I/O errors
*/
public ConfigurationMetadataRepositoryJsonBuilder withJsonResource(
InputStream inputstream, Charset charset) throws IOException {
......
......@@ -45,7 +45,7 @@ public class ConfigurationMetadataSource implements Serializable {
private final Map<String, ConfigurationMetadataProperty> properties = new HashMap<String, ConfigurationMetadataProperty>();
/**
* The identifier of the group to which this source is associated
* The identifier of the group to which this source is associated.
* @return the group id
*/
public String getGroupId() {
......
......@@ -28,7 +28,7 @@ import org.json.JSONArray;
import org.json.JSONObject;
/**
* Read standard json metadata format as {@link ConfigurationMetadataRepository}
* Read standard json metadata format as {@link ConfigurationMetadataRepository}.
*
* @author Stephane Nicoll
* @since 1.3.0
......
......@@ -66,6 +66,7 @@ class RawConfigurationMetadata {
/**
* Resolve the name of an item against this instance.
* @param item the item to resolve
* @see ConfigurationMetadataProperty#setName(String)
*/
private void resolveName(ConfigurationMetadataItem item) {
......
......@@ -33,7 +33,7 @@ import org.springframework.boot.configurationprocessor.metadata.InvalidConfigura
import org.springframework.boot.configurationprocessor.metadata.JsonMarshaller;
/**
* A {@code MetadataStore} is responsible for the storage of metadata on the filesystem
* A {@code MetadataStore} is responsible for the storage of metadata on the filesystem.
*
* @author Andy Wilkinson
* @since 1.2.2
......
......@@ -54,6 +54,9 @@ public class JavaCompilerFieldValuesParser implements FieldValuesParser {
return Collections.emptyMap();
}
/**
* {@link TreeVisitor} to collect fields.
*/
private static class FieldCollector implements TreeVisitor {
private static final Map<String, Class<?>> WRAPPER_TYPES;
......
......@@ -84,14 +84,16 @@ public class ConfigurationMetadata {
}
/**
* @return the meta-data properties.
* Return item meta-data.
* @return the items
*/
public List<ItemMetadata> getItems() {
return flattenValues(this.items);
}
/**
* @return the meta-data hints.
* Return hint meta-data.
* @return the hints
*/
public List<ItemHint> getHints() {
return flattenValues(this.hints);
......
......@@ -88,6 +88,9 @@ public class ItemHint implements Comparable<ItemHint> {
+ ", providers=" + this.providers + '}';
}
/**
* A hint for a value.
*/
public static class ValueHint {
private final Object value;
......@@ -115,6 +118,9 @@ public class ItemHint implements Comparable<ItemHint> {
}
/**
* A value provider.
*/
public static class ValueProvider {
private final String name;
......
......@@ -172,7 +172,17 @@ public class ItemMetadata implements Comparable<ItemMetadata> {
* The item type.
*/
public enum ItemType {
GROUP, PROPERTY
/**
* Group item type.
*/
GROUP,
/**
* Property item type.
*/
PROPERTY
}
}
......@@ -160,7 +160,7 @@ public class TestProject {
/**
* Restore source code of given class to its original contents.
* @param type the class to revert
* @throws IOException
* @throws IOException in case of I/O errors
*/
public void revert(Class<?> type) throws IOException {
Assert.assertTrue(getSourceFile(type).exists());
......@@ -170,7 +170,7 @@ public class TestProject {
/**
* Add source code of given class to this project.
* @param type the class to add
* @throws IOException
* @throws IOException in case of I/O errors
*/
public void add(Class<?> type) throws IOException {
Assert.assertFalse(getSourceFile(type).exists());
......
......@@ -45,6 +45,9 @@ import org.springframework.util.StringUtils;
*/
public class RepackagePluginFeatures implements PluginFeatures {
/**
* The name of the repackage task.
*/
public static final String REPACKAGE_TASK_NAME = "bootRepackage";
@Override
......@@ -97,6 +100,7 @@ public class RepackagePluginFeatures implements PluginFeatures {
/**
* Register BootRepackage so that we can use task {@code foo(type: BootRepackage)}.
* @param project the source project
*/
private void registerRepackageTaskProperty(Project project) {
project.getExtensions().getExtraProperties()
......@@ -104,7 +108,7 @@ public class RepackagePluginFeatures implements PluginFeatures {
}
/**
* Register task input/outputs when classifiers are used
* Register task input/outputs when classifiers are used.
*/
private static class RegisterInputsOutputsAction implements Action<Jar> {
......
......@@ -222,7 +222,7 @@ public class JarWriter {
* delegate to this one.
* @param entry the entry to write
* @param entryWriter the entry writer or {@code null} if there is no content
* @throws IOException
* @throws IOException in case of I/O errors
*/
private void writeEntry(JarEntry entry, EntryWriter entryWriter) throws IOException {
String parent = entry.getName();
......@@ -251,9 +251,9 @@ public class JarWriter {
private interface EntryWriter {
/**
* Write entry data to the specified output stream
* Write entry data to the specified output stream.
* @param outputStream the destination for the data
* @throws IOException
* @throws IOException in case of I/O errors
*/
void write(OutputStream outputStream) throws IOException;
......@@ -338,7 +338,7 @@ public class JarWriter {
}
/**
* Data holder for CRC and Size
* Data holder for CRC and Size.
*/
private static class CrcAndSize {
......
......@@ -29,7 +29,7 @@ import java.net.URLClassLoader;
abstract class JvmUtils {
/**
* Various search locations for tools, including the odd Java 6 OSX jar
* Various search locations for tools, including the odd Java 6 OSX jar.
*/
private static final String[] TOOLS_LOCATIONS = { "lib/tools.jar",
"../lib/tools.jar", "../Classes/classes.jar" };
......
......@@ -151,7 +151,7 @@ public final class Layouts {
}
/**
* Module layout (designed to be used as a "plug-in")
* Module layout (designed to be used as a "plug-in").
*/
public static class Module implements Layout {
......
......@@ -70,29 +70,33 @@ public class Library {
}
/**
* @return the name of file as it should be written
* Return the name of file as it should be written.
* @return then name.
*/
public String getName() {
return this.name;
}
/**
* @return the library file
* Return the library file.
* @return the file
*/
public File getFile() {
return this.file;
}
/**
* @return the scope of the library
* Return the scope of the library.
* @return the scope
*/
public LibraryScope getScope() {
return this.scope;
}
/**
* @return if the file cannot be used directly as a nested jar and needs to be
* Return if the file cannot be used directly as a nested jar and needs to be
* unpacked.
* @return if unpack is required
*/
public boolean isUnpackRequired() {
return this.unpackRequired;
......
......@@ -102,10 +102,11 @@ public abstract class MainClassFinder {
/**
* Perform the given callback operation on all main classes from the given root
* folder.
* @param <T> the result type
* @param rootFolder the root folder
* @param callback the callback
* @return the first callback result or {@code null}
* @throws IOException
* @throws IOException in case of I/O errors
*/
static <T> T doWithMainClasses(File rootFolder, ClassNameCallback<T> callback)
throws IOException {
......@@ -190,11 +191,12 @@ public abstract class MainClassFinder {
/**
* Perform the given callback operation on all main classes from the given jar.
* @param <T> the result type
* @param jarFile the jar file to search
* @param classesLocation the location within the jar containing classes
* @param callback the callback
* @return the first callback result or {@code null}
* @throws IOException
* @throws IOException in case of I/O errors
*/
static <T> T doWithMainClasses(JarFile jarFile, String classesLocation,
ClassNameCallback<T> callback) throws IOException {
......@@ -316,7 +318,7 @@ public abstract class MainClassFinder {
public interface ClassNameCallback<T> {
/**
* Handle the specified class name
* Handle the specified class name.
* @param className the class name
* @return a non-null value if processing should end or {@code null} to continue
*/
......
......@@ -90,7 +90,7 @@ public class Repackager {
}
/**
* Repackage the source file so that it can be run using '{@literal java -jar}'
* Repackage the source file so that it can be run using '{@literal java -jar}'.
* @param libraries the libraries required to run the archive
* @throws IOException if the file cannot be repackaged
*/
......@@ -100,7 +100,7 @@ public class Repackager {
/**
* Repackage to the given destination so that it can be launched using '
* {@literal java -jar}'
* {@literal java -jar}'.
* @param destination the destination file (may be the same as the source)
* @param libraries the libraries required to run the archive
* @throws IOException if the file cannot be repackaged
......@@ -111,7 +111,7 @@ public class Repackager {
/**
* Repackage to the given destination so that it can be launched using '
* {@literal java -jar}'
* {@literal java -jar}'.
* @param destination the destination file (may be the same as the source)
* @param libraries the libraries required to run the archive
* @param launchScript an optional launch script prepended to the front of the jar
......
......@@ -155,23 +155,23 @@ public class RunProcess {
}
/**
* @return the running process or {@code null}
* Return the running process.
* @return the process or {@code null}
*/
public Process getRunningProcess() {
return this.process;
}
/**
* @return {@code true} if the process was stopped.
* Return if the process was stopped.
* @return {@code true} if stopped
*/
public boolean handleSigInt() {
// if the process has just ended, probably due to this SIGINT, consider handled.
if (hasJustEnded()) {
return true;
}
return doKill();
}
/**
......
......@@ -34,7 +34,7 @@ public final class SignalUtils {
}
/**
* Handle {@literal INT} signals by calling the specified {@link Runnable}
* Handle {@literal INT} signals by calling the specified {@link Runnable}.
* @param runnable the runnable to call on SIGINT.
*/
public static void attachSignalHandler(final Runnable runnable) {
......
......@@ -19,7 +19,7 @@ package org.springframework.boot.loader;
import java.net.URL;
/**
* A strategy for detecting Java agents
* A strategy for detecting Java agents.
*
* @author Andy Wilkinson
* @since 1.1.0
......
......@@ -81,7 +81,7 @@ public abstract class Launcher {
}
/**
* Create a classloader for the specified URLs
* Create a classloader for the specified URLs.
* @param urls the URLs
* @return the classloader
* @throws Exception if the classloader cannot be created
......
......@@ -112,7 +112,7 @@ public class PropertiesLauncher extends Launcher {
/**
* Properties key for config file location (including optional classpath:, file: or
* URL prefix)
* URL prefix).
*/
public static final String CONFIG_LOCATION = "loader.config.location";
......
......@@ -113,7 +113,7 @@ public abstract class Archive {
boolean isDirectory();
/**
* Returns the name of the entry
* Returns the name of the entry.
* @return the name of the entry
*/
AsciiBytes getName();
......
......@@ -74,6 +74,7 @@ public class RandomAccessDataFile implements RandomAccessData {
/**
* Private constructor used to create a {@link #getSubsection(long, long) subsection}.
* @param file the underlying file
* @param pool the underlying pool
* @param offset the offset of the section
* @param length the length of the section
......@@ -158,7 +159,7 @@ public class RandomAccessDataFile implements RandomAccessData {
* @param len the length of data to read
* @return the number of bytes read into {@code b} or the actual read byte if
* {@code b} is {@code null}. Returns -1 when the end of the stream is reached
* @throws IOException
* @throws IOException in case of I/O errors
*/
public int doRead(byte[] b, int off, int len) throws IOException {
if (len == 0) {
......@@ -213,7 +214,7 @@ public class RandomAccessDataFile implements RandomAccessData {
}
/**
* Move the stream position forwards the specified amount
* Move the stream position forwards the specified amount.
* @param amount the amount to move
* @return the amount moved
*/
......
......@@ -51,7 +51,7 @@ class CentralDirectoryEndRecord {
* {@link RandomAccessData}, searching backwards from the end until a valid block is
* located.
* @param data the source data
* @throws IOException
* @throws IOException in case of I/O errors
*/
CentralDirectoryEndRecord(RandomAccessData data) throws IOException {
this.block = createBlockFromEndOfData(data, READ_BLOCK_SIZE);
......
......@@ -97,9 +97,10 @@ public final class JarEntryData {
}
/**
* @return the underlying {@link RandomAccessData} for this entry. Generally this
* Return the underlying {@link RandomAccessData} for this entry. Generally this
* method should not be called directly and instead data should be accessed via
* {@link JarFile#getInputStream(ZipEntry)}.
* @return the data
* @throws IOException if the data cannot be read
*/
public RandomAccessData getData() throws IOException {
......@@ -200,7 +201,7 @@ public final class JarEntryData {
* @param source the source {@link JarFile}
* @param inputStream the input stream to load data from
* @return a {@link JarEntryData} or {@code null}
* @throws IOException
* @throws IOException in case of I/O errors
*/
static JarEntryData fromInputStream(JarFile source, InputStream inputStream)
throws IOException {
......
......@@ -38,17 +38,17 @@ import java.util.Set;
public abstract class SystemPropertyUtils {
/**
* Prefix for system property placeholders: "${"
* Prefix for system property placeholders: "${".
*/
public static final String PLACEHOLDER_PREFIX = "${";
/**
* Suffix for system property placeholders: "}"
* Suffix for system property placeholders: "}".
*/
public static final String PLACEHOLDER_SUFFIX = "}";
/**
* Value separator for system property placeholders: ":"
* Value separator for system property placeholders: ":".
*/
public static final String VALUE_SEPARATOR = ":";
......@@ -59,9 +59,9 @@ public abstract class SystemPropertyUtils {
* system property values.
* @param text the String to resolve
* @return the resolved String
* @throws IllegalArgumentException if there is an unresolvable placeholder
* @see #PLACEHOLDER_PREFIX
* @see #PLACEHOLDER_SUFFIX
* @throws IllegalArgumentException if there is an unresolvable placeholder
*/
public static String resolvePlaceholders(String text) {
if (text == null) {
......@@ -76,9 +76,9 @@ public abstract class SystemPropertyUtils {
* @param properties a properties instance to use in addition to System
* @param text the String to resolve
* @return the resolved String
* @throws IllegalArgumentException if there is an unresolvable placeholder
* @see #PLACEHOLDER_PREFIX
* @see #PLACEHOLDER_SUFFIX
* @throws IllegalArgumentException if there is an unresolvable placeholder
*/
public static String resolvePlaceholders(Properties properties, String text) {
if (text == null) {
......
......@@ -217,8 +217,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
/**
* Run with a forked VM, using the specified command line arguments.
* @param args the arguments (JVM arguments and application arguments)
* @throws MojoExecutionException
* @throws MojoFailureException
* @throws MojoExecutionException in case of MOJO execution errors
* @throws MojoFailureException in case of MOJO failures
*/
protected abstract void runWithForkedJvm(List<String> args)
throws MojoExecutionException, MojoFailureException;
......@@ -227,8 +227,8 @@ public abstract class AbstractRunMojo extends AbstractDependencyFilterMojo {
* Run with the current VM, using the specified arguments.
* @param startClassName the class to run
* @param arguments the class arguments
* @throws MojoExecutionException
* @throws MojoFailureException
* @throws MojoExecutionException in case of MOJO execution errors
* @throws MojoFailureException in case of MOJO failures
*/
protected abstract void runWithMavenJvm(String startClassName, String... arguments)
throws MojoExecutionException, MojoFailureException;
......
......@@ -33,7 +33,7 @@ import org.springframework.boot.loader.tools.LibraryCallback;
import org.springframework.boot.loader.tools.LibraryScope;
/**
* {@link Libraries} backed by Maven {@link Artifact}s
* {@link Libraries} backed by Maven {@link Artifact}s.
*
* @author Phillip Webb
* @author Andy Wilkinson
......
......@@ -40,7 +40,7 @@ abstract class FilterableDependency {
private String artifactId;
/**
* The classifier of the artifact to exclude
* The classifier of the artifact to exclude.
*/
@Parameter
private String classifier;
......
......@@ -41,7 +41,8 @@ public class PropertiesMergingResourceTransformer implements ResourceTransformer
private final Properties data = new Properties();
/**
* @return the data the properties being merged
* Return the data the properties being merged.
* @return the data
*/
public Properties getData() {
return this.data;
......
......@@ -235,35 +235,38 @@ public class RepackageMojo extends AbstractDependencyFilterMojo {
return null;
}
/**
* Archive layout types.
*/
public enum LayoutType {
/**
* Jar Layout
* Jar Layout.
*/
JAR(new Layouts.Jar()),
/**
* War Layout
* War Layout.
*/
WAR(new Layouts.War()),
/**
* Zip Layout
* Zip Layout.
*/
ZIP(new Layouts.Expanded()),
/**
* Dir Layout
* Dir Layout.
*/
DIR(new Layouts.Expanded()),
/**
* Module Layout
* Module Layout.
*/
MODULE(new Layouts.Module()),
/**
* No Layout
* No Layout.
*/
NONE(new Layouts.None());
......
......@@ -250,12 +250,13 @@ public class StartMojo extends AbstractRunMojo {
/**
* Execute a task, retrying it on failure.
* @param <T> the result type
* @param wait the wait time
* @param maxAttempts the maximum number of attempts
* @param callback the task to execute (possibly multiple times). The callback should
* return {@code null} to indicate that another attempt should be made
* @return the result
* @throws Exception
* @throws Exception in case of execution errors
*/
public <T> T execute(long wait, int maxAttempts, Callable<T> callback)
throws Exception {
......
......@@ -26,8 +26,8 @@ import org.springframework.core.annotation.Order;
* interface or {@link Order @Order} annotation.
*
* @author Phillip Webb
* @see CommandLineRunner
* @since 1.3.0
* @see CommandLineRunner
*/
public interface ApplicationRunner {
......
......@@ -107,7 +107,7 @@ class BeanDefinitionLoader {
/**
* Set the environment to be used by the underlying readers and scanner.
* @param environment
* @param environment the environment
*/
public void setEnvironment(ConfigurableEnvironment environment) {
this.annotatedReader.setEnvironment(environment);
......@@ -302,6 +302,9 @@ class BeanDefinitionLoader {
}
/**
* Source for Bean definitions defined in Groovy.
*/
protected interface GroovyBeanDefinitionSource {
Closure<?> getBeans();
......
......@@ -144,9 +144,17 @@ import org.springframework.web.context.support.StandardServletEnvironment;
*/
public class SpringApplication {
private static final String DEFAULT_CONTEXT_CLASS = "org.springframework.context."
/**
* The class name of application context that will be used by default for non-web
* environments.
*/
public static final String DEFAULT_CONTEXT_CLASS = "org.springframework.context."
+ "annotation.AnnotationConfigApplicationContext";
/**
* The class name of application context that will be used by default for web
* environments.
*/
public static final String DEFAULT_WEB_CONTEXT_CLASS = "org.springframework."
+ "boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext";
......@@ -293,11 +301,6 @@ public class SpringApplication {
}
}
/**
* @param listeners
* @param args
* @return
*/
private ConfigurableApplicationContext doRun(SpringApplicationRunListeners listeners,
String... args) {
ConfigurableApplicationContext context;
......@@ -633,6 +636,7 @@ public class SpringApplication {
}
/**
* Get the bean definition registry.
* @param context the application context
* @return the BeanDefinitionRegistry if it can be determined
*/
......
......@@ -164,12 +164,12 @@ public abstract class AnsiOutput {
DETECT,
/**
* Enable ANSI-colored output
* Enable ANSI-colored output.
*/
ALWAYS,
/**
* Disable ANSI-colored output
* Disable ANSI-colored output.
*/
NEVER
......
......@@ -84,6 +84,7 @@ public class PropertiesConfigurationFactory<T> implements FactoryBean<T>,
private ConversionService conversionService;
/**
* Create a new {@link PropertiesConfigurationFactory} instance.
* @param target the target object to bind too
* @see #PropertiesConfigurationFactory(Class)
*/
......@@ -93,7 +94,7 @@ public class PropertiesConfigurationFactory<T> implements FactoryBean<T>,
}
/**
* Create a new factory for an object of the given type.
* Create a new {@link PropertiesConfigurationFactory} instance.
* @param type the target type
* @see #PropertiesConfigurationFactory(Class)
*/
......@@ -139,14 +140,16 @@ public class PropertiesConfigurationFactory<T> implements FactoryBean<T>,
}
/**
* @param targetName the target name to set
* Set the target name.
* @param targetName the target name
*/
public void setTargetName(String targetName) {
this.targetName = targetName;
}
/**
* @param messageSource the messageSource to set
* Set the message source.
* @param messageSource the message source
*/
@Override
public void setMessageSource(MessageSource messageSource) {
......@@ -154,37 +157,40 @@ public class PropertiesConfigurationFactory<T> implements FactoryBean<T>,
}
/**
* @param properties the properties to set
* Set the properties.
* @param properties the properties
*/
public void setProperties(Properties properties) {
this.properties = properties;
}
/**
* @param propertySources the propertySources to set
* Set the property sources.
* @param propertySources the property sources
*/
public void setPropertySources(PropertySources propertySources) {
this.propertySources = propertySources;
}
/**
* @param conversionService the conversionService to set
* Set the conversion service.
* @param conversionService the conversion service
*/
public void setConversionService(ConversionService conversionService) {
this.conversionService = conversionService;
}
/**
* @param validator the validator to set
* Set the validator.
* @param validator the validator
*/
public void setValidator(Validator validator) {
this.validator = validator;
}
/**
* Flag to indicate that an exception should be raised if a Validator is available and
* validation fails.
*
* Set a flag to indicate that an exception should be raised if a Validator is
* available and validation fails.
* @param exceptionIfInvalid the flag to set
*/
public void setExceptionIfInvalid(boolean exceptionIfInvalid) {
......@@ -342,6 +348,7 @@ public class PropertiesConfigurationFactory<T> implements FactoryBean<T>,
}
/**
* Customize the databinder.
* @param dataBinder the data binder that will be used to bind and validate
*/
protected void customizeBinder(DataBinder dataBinder) {
......
......@@ -50,7 +50,7 @@ public class PropertySourcesPropertyValues implements PropertyValues {
private final PropertyNamePatternsMatcher includes;
/**
* Create a new PropertyValues from the given PropertySources
* Create a new PropertyValues from the given PropertySources.
* @param propertySources a PropertySources instance
*/
public PropertySourcesPropertyValues(PropertySources propertySources) {
......@@ -58,7 +58,7 @@ public class PropertySourcesPropertyValues implements PropertyValues {
}
/**
* Create a new PropertyValues from the given PropertySources
* Create a new PropertyValues from the given PropertySources.
* @param propertySources a PropertySources instance
* @param includePatterns property name patterns to include from system properties and
* environment variables
......@@ -72,7 +72,7 @@ public class PropertySourcesPropertyValues implements PropertyValues {
}
/**
* Create a new PropertyValues from the given PropertySources
* Create a new PropertyValues from the given PropertySources.
* @param propertySources a PropertySources instance
* @param propertyNames the property names to use in lieu of an
* {@link EnumerablePropertySource}.
......
......@@ -20,11 +20,11 @@ import org.springframework.beans.NotWritablePropertyException;
/**
* A custom {@link NotWritablePropertyException} that is thrown when a failure occurs
* during relaxed binding
* during relaxed binding.
*
* @see RelaxedDataBinder
* @author Andy Wilkinson
* @since 1.3.0
* @see RelaxedDataBinder
*/
public class RelaxedBindingNotWritablePropertyException extends
NotWritablePropertyException {
......
......@@ -134,6 +134,7 @@ public class RelaxedDataBinder extends DataBinder {
* is also accepted.
* @param propertyValues the property values
* @param target the target object
* @return modified property values
*/
private MutablePropertyValues modifyProperties(MutablePropertyValues propertyValues,
Object target) {
......
......@@ -70,6 +70,9 @@ public final class RelaxedNames implements Iterable<String> {
}
}
/**
* Name variations.
*/
enum Variation {
NONE {
......@@ -97,6 +100,9 @@ public final class RelaxedNames implements Iterable<String> {
}
/**
* Name manipulations.
*/
enum Manipulation {
NONE {
......@@ -189,7 +195,7 @@ public final class RelaxedNames implements Iterable<String> {
}
/**
* Return a {@link RelaxedNames} for the given source camelCase source name
* Return a {@link RelaxedNames} for the given source camelCase source name.
* @param name the source name in camelCase
* @return the relaxed names
*/
......
......@@ -80,7 +80,8 @@ public class YamlConfigurationFactory<T> implements FactoryBean<T>, MessageSourc
}
/**
* @param messageSource the messageSource to set
* Set the message source.
* @param messageSource the message source
*/
@Override
public void setMessageSource(MessageSource messageSource) {
......@@ -88,28 +89,32 @@ public class YamlConfigurationFactory<T> implements FactoryBean<T>, MessageSourc
}
/**
* @param propertyAliases the propertyAliases to set
* Set the property aliases.
* @param propertyAliases the property aliases
*/
public void setPropertyAliases(Map<Class<?>, Map<String, String>> propertyAliases) {
this.propertyAliases = new HashMap<Class<?>, Map<String, String>>(propertyAliases);
}
/**
* @param yaml the yaml to set
* Set the YAML.
* @param yaml the YAML
*/
public void setYaml(String yaml) {
this.yaml = yaml;
}
/**
* @param resource the resource to set
* Set the resource.
* @param resource the resource
*/
public void setResource(Resource resource) {
this.resource = resource;
}
/**
* @param validator the validator to set
* Set the validator.
* @param validator the validator
*/
public void setValidator(Validator validator) {
this.validator = validator;
......
......@@ -79,6 +79,9 @@ public class YamlJavaBeanPropertyConstructor extends Constructor {
}
}
/**
* Custom {@code ConstructMapping} to resolve properties.
*/
class CustomPropertyConstructMapping extends ConstructMapping {
@Override
......
......@@ -81,6 +81,9 @@ public class ParentContextApplicationContextInitializer implements
}
/**
* {@link ApplicationEvent} fired when a parent context is available.
*/
@SuppressWarnings("serial")
public static class ParentContextAvailableEvent extends ApplicationEvent {
......
......@@ -265,7 +265,7 @@ public class SpringApplicationBuilder {
}
/**
* Add more sources (configuration classes and components) to this application
* Add more sources (configuration classes and components) to this application.
* @param sources the sources to add
* @return the current builder
*/
......
......@@ -50,12 +50,12 @@ public class ContextIdApplicationContextInitializer implements
ApplicationContextInitializer<ConfigurableApplicationContext>, Ordered {
/**
* Placeholder pattern to resolve for application name
* Placeholder pattern to resolve for application name.
*/
private static final String NAME_PATTERN = "${vcap.application.name:${spring.application.name:${spring.config.name:application}}}";
/**
* Placeholder pattern to resolve for application index
* Placeholder pattern to resolve for application index.
*/
private static final String INDEX_PATTERN = "${vcap.application.instance_index:${spring.application.index:${server.port:${PORT:null}}}}";
......
......@@ -99,14 +99,29 @@ public class ConfigFileEnvironmentPostProcessor implements EnvironmentPostProces
private static final String DEFAULT_NAMES = "application";
/**
* The "active profiles" property name.
*/
public static final String ACTIVE_PROFILES_PROPERTY = "spring.profiles.active";
/**
* The "includes profiles" property name.
*/
public static final String INCLUDE_PROFILES_PROPERTY = "spring.profiles.include";
/**
* The "config name" property name.
*/
public static final String CONFIG_NAME_PROPERTY = "spring.config.name";
/**
* The "config location" property name.
*/
public static final String CONFIG_LOCATION_PROPERTY = "spring.config.location";
/**
* The default order for the processor.
*/
public static final int DEFAULT_ORDER = Ordered.HIGHEST_PRECEDENCE + 10;
private final DeferredLog logger = new DeferredLog();
......
......@@ -156,7 +156,8 @@ public abstract class AbstractConfigurableEmbeddedServletContainer implements
}
/**
* @return the address the embedded container binds to
* Return the address that the embedded container binds to.
* @return the address
*/
public InetAddress getAddress() {
return this.address;
......@@ -174,7 +175,8 @@ public abstract class AbstractConfigurableEmbeddedServletContainer implements
}
/**
* @return the session timeout in seconds
* Return the session timeout in seconds.
* @return the timeout in seconds
*/
public int getSessionTimeout() {
return this.sessionTimeout;
......
......@@ -171,7 +171,7 @@ public interface ConfigurableEmbeddedServletContainer {
void setSsl(Ssl ssl);
/**
* Sets the configuration that will be applied to the container's JSP servlet
* Sets the configuration that will be applied to the container's JSP servlet.
* @param jspServlet the JSP servlet configuration
*/
void setJspServlet(JspServlet jspServlet);
......
......@@ -45,7 +45,8 @@ public interface EmbeddedServletContainer {
void stop() throws EmbeddedServletContainerException;
/**
* @return the port this server is listening on (or -1 if none)
* Return the port this server is listening on.
* @return the port (or -1 if none)
*/
int getPort();
......
......@@ -197,6 +197,7 @@ public class EmbeddedWebApplicationContext extends GenericWebApplicationContext
/**
* Returns the {@link ServletContextInitializer} that will be used to complete the
* setup of this {@link WebApplicationContext}.
* @return the self initializer
* @see #prepareEmbeddedWebApplicationContext(ServletContext)
*/
private ServletContextInitializer getSelfInitializer() {
......
......@@ -62,7 +62,7 @@ public class ErrorPage {
}
/**
* Returns the exception type (or {@code null} for a page that matches by status)
* Returns the exception type (or {@code null} for a page that matches by status).
* @return the exception type or {@code null}
*/
public Class<? extends Throwable> getException() {
......@@ -95,8 +95,9 @@ public class ErrorPage {
}
/**
* @return is this error page a global one (matches all unmatched status and exception
* types)
* Return if this error page is a global one (matches all unmatched status and
* exception types).
* @return if this is a global error page
*/
public boolean isGlobal() {
return (this.status == null && this.exception == null);
......
......@@ -80,7 +80,8 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
}
/**
* @return the enabled flag (default true)
* Return if the registration is enabled.
* @return if enabled (default {@code true})
*/
public boolean isEnabled() {
return this.enabled;
......@@ -141,13 +142,15 @@ public abstract class RegistrationBean implements ServletContextInitializer, Ord
}
/**
* @param order the order to set
* Set the order of the registration bean.
* @param order the order
*/
public void setOrder(int order) {
this.order = order;
}
/**
* Get the order of the registration bean.
* @return the order
*/
@Override
......
......@@ -50,9 +50,10 @@ import org.springframework.util.ClassUtils;
* <li>{@link HttpSessionListener}</li>
* <li>{@link ServletContextListener}</li>
* </ul>
*
* @param <T> the type of listener
* @author Dave Syer
* @author Phillip Webb
* @param <T> the type of listener
*/
public class ServletListenerRegistrationBean<T extends EventListener> extends
RegistrationBean {
......@@ -133,7 +134,8 @@ public class ServletListenerRegistrationBean<T extends EventListener> extends
}
/**
* @return the supportedTypes for this registration
* Return the supported types for this registration.
* @return the supported types
*/
public static Set<Class<?>> getSupportedTypes() {
return SUPPORTED_TYPES;
......
......@@ -208,8 +208,21 @@ public class Ssl {
this.protocol = protocol;
}
/**
* Client authentication types.
*/
public enum ClientAuth {
WANT, NEED
/**
* Client authentication is wanted but not mandatory.
*/
WANT,
/**
* Client authentication is needed and mandatory.
*/
NEED
}
}
......@@ -380,7 +380,7 @@ public class JettyEmbeddedServletContainerFactory extends
}
/**
* Create a configuration object that adds error handlers
* Create a configuration object that adds error handlers.
* @return a configuration object for adding error pages
*/
private Configuration getErrorPageConfiguration() {
......@@ -394,7 +394,7 @@ public class JettyEmbeddedServletContainerFactory extends
}
/**
* Create a configuration object that adds mime type mappings
* Create a configuration object that adds mime type mappings.
* @return a configuration object for adding mime type mappings
*/
private Configuration getMimeTypeConfiguration() {
......
......@@ -27,6 +27,7 @@ import org.eclipse.jetty.server.Server;
public interface JettyServerCustomizer {
/**
* Customize the server.
* @param server the server to customize
*/
void customize(Server server);
......
......@@ -109,7 +109,7 @@ class SkipPatternJarScanner extends StandardJarScanner {
}
/**
* Skip patterns used by Spring Boot
* Skip patterns used by Spring Boot.
*/
private static class SkipPattern {
......
......@@ -27,6 +27,7 @@ import org.apache.catalina.connector.Connector;
public interface TomcatConnectorCustomizer {
/**
* Customize the connector.
* @param connector the connector to customize
*/
void customize(Connector connector);
......
......@@ -27,6 +27,7 @@ import org.apache.catalina.Context;
public interface TomcatContextCustomizer {
/**
* Customize the context.
* @param context the context to customize
*/
void customize(Context context);
......
......@@ -96,6 +96,9 @@ public class TomcatEmbeddedServletContainerFactory extends
private static final Set<Class<?>> NO_CLASSES = Collections.emptySet();
/**
* The class name of default protocol used.
*/
public static final String DEFAULT_PROTOCOL = "org.apache.coyote.http11.Http11NioProtocol";
private File baseDirectory;
......@@ -628,7 +631,7 @@ public class TomcatEmbeddedServletContainerFactory extends
/**
* Returns a mutable collection of the {@link Connector}s that will be added to the
* Tomcat
* Tomcat.
* @return the additionalTomcatConnectors
*/
public List<Connector> getAdditionalTomcatConnectors() {
......
......@@ -46,7 +46,7 @@ abstract class TomcatResources {
}
/**
* Add resources from the classpath
* Add resources from the classpath.
*/
public void addClasspathResources() {
ClassLoader loader = getClass().getClassLoader();
......
......@@ -134,6 +134,9 @@ public class FileSessionPersistence implements SessionPersistenceManager {
getSessionFile(deploymentName).delete();
}
/**
* Session data in a serializable form.
*/
static class SerializablePersistentSession implements Serializable {
private static final long serialVersionUID = 0L;
......
......@@ -28,6 +28,7 @@ import io.undertow.Undertow.Builder;
public interface UndertowBuilderCustomizer {
/**
* Customize the builder.
* @param builder the {@code Builder} to customize
*/
void customize(Builder builder);
......
......@@ -28,6 +28,7 @@ import io.undertow.servlet.api.DeploymentInfo;
public interface UndertowDeploymentInfoCustomizer {
/**
* Customize the deployment info.
* @param deploymentInfo the {@code DeploymentInfo} to customize
*/
void customize(DeploymentInfo deploymentInfo);
......
......@@ -32,6 +32,7 @@ public class ApplicationEnvironmentPreparedEvent extends SpringApplicationEvent
private final ConfigurableEnvironment environment;
/**
* Create a new {@link ApplicationEnvironmentPreparedEvent} instance.
* @param application the current application
* @param args the argumemts the application is running with
* @param environment the environment that was just created
......@@ -43,6 +44,7 @@ public class ApplicationEnvironmentPreparedEvent extends SpringApplicationEvent
}
/**
* Return the environment.
* @return the environment
*/
public ConfigurableEnvironment getEnvironment() {
......
......@@ -33,6 +33,7 @@ public class ApplicationFailedEvent extends SpringApplicationEvent {
private final Throwable exception;
/**
* Create a new {@link ApplicationFailedEvent} instance.
* @param application the current application
* @param args the arguments the application was running with
* @param context the context that was being created (maybe null)
......@@ -46,6 +47,7 @@ public class ApplicationFailedEvent extends SpringApplicationEvent {
}
/**
* Return the application context.
* @return the context
*/
public ConfigurableApplicationContext getApplicationContext() {
......@@ -53,6 +55,7 @@ public class ApplicationFailedEvent extends SpringApplicationEvent {
}
/**
* Return the exception that caused the failure.
* @return the exception
*/
public Throwable getException() {
......
......@@ -34,6 +34,7 @@ public class ApplicationPreparedEvent extends SpringApplicationEvent {
private final ConfigurableApplicationContext context;
/**
* Create a new {@link ApplicationPreparedEvent} instance.
* @param application the current application
* @param args the argumemts the application is running with
* @param context the ApplicationContext about to be refreshed
......@@ -45,6 +46,7 @@ public class ApplicationPreparedEvent extends SpringApplicationEvent {
}
/**
* Return the application context.
* @return the context
*/
public ConfigurableApplicationContext getApplicationContext() {
......
......@@ -35,6 +35,7 @@ public class ApplicationReadyEvent extends SpringApplicationEvent {
private final ConfigurableApplicationContext context;
/**
* Create a new {@link ApplicationReadyEvent} instance.
* @param application the current application
* @param args the arguments the application is running with
* @param context the context that was being created (maybe null)
......@@ -46,6 +47,7 @@ public class ApplicationReadyEvent extends SpringApplicationEvent {
}
/**
* Return the application context.
* @return the context
*/
public ConfigurableApplicationContext getApplicationContext() {
......
......@@ -34,6 +34,7 @@ import org.springframework.core.env.Environment;
public class ApplicationStartedEvent extends SpringApplicationEvent {
/**
* Create a new {@link ApplicationStartedEvent} instance.
* @param application the current application
* @param args the arguments the application is running with
*/
......
......@@ -75,6 +75,9 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
BeanFactoryAware, ResourceLoaderAware, EnvironmentAware, ApplicationContextAware,
InitializingBean, DisposableBean, PriorityOrdered {
/**
* The bean name of the configuration properties validator.
*/
public static final String VALIDATOR_BEAN_NAME = "configurationPropertiesValidator";
private static final String[] VALIDATOR_CLASSES = { "javax.validation.Validator",
......@@ -116,13 +119,15 @@ public class ConfigurationPropertiesBindingPostProcessor implements BeanPostProc
}
/**
* @param order the order to set
* Set the order of the bean.
* @param order the order
*/
public void setOrder(int order) {
this.order = order;
}
/**
* Return the order of the bean.
* @return the order
*/
@Override
......
......@@ -31,6 +31,9 @@ import org.springframework.core.type.AnnotationMetadata;
public class ConfigurationPropertiesBindingPostProcessorRegistrar implements
ImportBeanDefinitionRegistrar {
/**
* The bean name of the {@link ConfigurationPropertiesBindingPostProcessor}.
*/
public static final String BINDER_BEAN_NAME = ConfigurationPropertiesBindingPostProcessor.class
.getName();
......
......@@ -58,6 +58,9 @@ class EnableConfigurationPropertiesImportSelector implements ImportSelector {
ConfigurationPropertiesBindingPostProcessorRegistrar.class.getName() };
}
/**
* {@link ImportBeanDefinitionRegistrar} for configuration properties support.
*/
public static class ConfigurationPropertiesBeanRegistrar implements
ImportBeanDefinitionRegistrar {
......
......@@ -70,6 +70,9 @@ public class ErrorPageFilter extends AbstractConfigurableEmbeddedServletContaine
private static final String ERROR_MESSAGE = "javax.servlet.error.message";
/**
* The name of the servlet attribute containing request URI.
*/
public static final String ERROR_REQUEST_URI = "javax.servlet.error.request_uri";
private static final String ERROR_STATUS_CODE = "javax.servlet.error.status_code";
......
......@@ -35,7 +35,7 @@ public class ServletContextApplicationContextInitializer implements
private final ServletContext servletContext;
/**
* Create a new {@link ServletContextApplicationContextInitializer} instance
* Create a new {@link ServletContextApplicationContextInitializer} instance.
* @param servletContext the servlet that should be ultimately set.
*/
public ServletContextApplicationContextInitializer(ServletContext servletContext) {
......
......@@ -29,10 +29,9 @@ import org.springframework.core.env.PropertySource;
* An mutable, enumerable, composite property source. New sources are added last (and
* hence resolved with lowest priority).
*
* @author Dave Syer
* @see PropertySource
* @see EnumerablePropertySource
*
* @author Dave Syer
*/
public class EnumerableCompositePropertySource extends
EnumerablePropertySource<Collection<PropertySource<?>>> {
......
......@@ -40,6 +40,9 @@ import org.springframework.core.io.support.SpringFactoriesLoader;
public class EnvironmentPostProcessingApplicationListener implements
ApplicationListener<ApplicationEnvironmentPreparedEvent>, Ordered {
/**
* The order for the {@link EnvironmentPostProcessingApplicationListener}.
*/
public static final int ORDER = Ordered.HIGHEST_PRECEDENCE + 10;
@Override
......
......@@ -30,7 +30,7 @@ import org.springframework.core.env.Environment;
public interface EnvironmentPostProcessor {
/**
* Post-process the given {@code environment}
* Post-process the given {@code environment}.
* @param environment the environment to post-process
* @param application the application to which the environment belongs
*/
......
......@@ -31,8 +31,8 @@ import org.springframework.util.StringUtils;
* YAML are supported).
*
* @author Dave Syer
* @see JsonParserFactory
* @since 1.2.0
* @see JsonParserFactory
*/
public class BasicJsonParser implements JsonParser {
......
......@@ -20,8 +20,8 @@ package org.springframework.boot.jta.atomikos;
* Logging levels supported by Atomikos.
*
* @author Phillip Webb
* @see AtomikosProperties
* @since 1.2.0
* @see AtomikosProperties
*/
public enum AtomikosLoggingLevel {
......
......@@ -27,8 +27,8 @@ import java.util.TreeMap;
* binding.
*
* @author Phillip Webb
* @see #asProperties()
* @since 1.2.0
* @see #asProperties()
*/
public class AtomikosProperties {
......
......@@ -33,6 +33,9 @@ import liquibase.logging.core.AbstractLogger;
*/
public class CommonsLoggingLiquibaseLogger extends AbstractLogger {
/**
* The priority for the {@link CommonsLoggingLiquibaseLogger}.
*/
public static final int PRIORITY = 10;
private Log logger;
......
......@@ -46,7 +46,7 @@ public class LiquibaseServiceLocatorApplicationListener implements
}
/**
* Inner class to prevent class not found issues
* Inner class to prevent class not found issues.
*/
private static class LiquibasePresent {
......
......@@ -48,6 +48,7 @@ import org.springframework.test.context.ContextConfiguration;
public @interface SpringApplicationConfiguration {
/**
* The context configuration classes.
* @see ContextConfiguration#classes()
* @return the context configuration classes
*/
......@@ -55,6 +56,7 @@ public @interface SpringApplicationConfiguration {
Class<?>[] value() default {};
/**
* The context configuration locations.
* @see ContextConfiguration#locations()
* @return the context configuration locations
*/
......@@ -62,6 +64,7 @@ public @interface SpringApplicationConfiguration {
String[] locations() default {};
/**
* The context configuration classes.
* @see ContextConfiguration#classes()
* @return the context configuration classes
*/
......@@ -69,6 +72,7 @@ public @interface SpringApplicationConfiguration {
Class<?>[] classes() default {};
/**
* The context configuration initializers.
* @see ContextConfiguration#initializers()
* @return the context configuration initializers
*/
......@@ -76,6 +80,7 @@ public @interface SpringApplicationConfiguration {
Class<? extends ApplicationContextInitializer<? extends ConfigurableApplicationContext>>[] initializers() default {};
/**
* Should context locations be inherited.
* @see ContextConfiguration#inheritLocations()
* @return {@code true} if context locations should be inherited
*/
......@@ -83,6 +88,7 @@ public @interface SpringApplicationConfiguration {
boolean inheritLocations() default true;
/**
* Should initializers be inherited.
* @see ContextConfiguration#inheritInitializers()
* @return {@code true} if context initializers should be inherited
*/
......@@ -90,6 +96,7 @@ public @interface SpringApplicationConfiguration {
boolean inheritInitializers() default true;
/**
* The name of the context hierarchy level.
* @see ContextConfiguration#name()
* @return the name of the context hierarchy level
*/
......
......@@ -130,6 +130,9 @@ public class TestRestTemplate extends RestTemplate {
}
/**
* {@link HttpComponentsClientHttpRequestFactory} to apply customizations.
*/
protected static class CustomHttpComponentsClientHttpRequestFactory extends
HttpComponentsClientHttpRequestFactory {
......
......@@ -36,9 +36,9 @@ import org.springframework.context.annotation.ScannedGenericBeanDefinition;
* {@link BeanFactoryPostProcessor} that registers beans for Servlet components found via
* package scanning.
*
* @author Andy Wilkinson
* @see ServletComponentScan
* @see ServletComponentScanRegistrar
* @author Andy Wilkinson
*/
class ServletComponentRegisteringPostProcessor implements BeanFactoryPostProcessor,
ApplicationContextAware {
......
......@@ -30,7 +30,7 @@ import org.springframework.boot.context.embedded.FilterRegistrationBean;
import org.springframework.util.StringUtils;
/**
* Handler for {@link WebFilter}-annotated classes
* Handler for {@link WebFilter}-annotated classes.
*
* @author Andy Wilkinson
*/
......
......@@ -26,7 +26,7 @@ import org.springframework.beans.factory.support.BeanDefinitionRegistry;
import org.springframework.boot.context.embedded.ServletListenerRegistrationBean;
/**
* Handler for {@link WebListener}-annotated classes
* Handler for {@link WebListener}-annotated classes.
*
* @author Andy Wilkinson
*/
......
......@@ -27,7 +27,7 @@ import org.springframework.boot.context.embedded.ServletRegistrationBean;
import org.springframework.util.StringUtils;
/**
* Handler for {@link WebServlet}-annotated classes
* Handler for {@link WebServlet}-annotated classes.
*
* @author Andy Wilkinson
*/
......
......@@ -15,7 +15,7 @@
*/
/**
* Velocity support classes
* Velocity support classes.
*/
package org.springframework.boot.web.servlet.view.velocity;
......@@ -28,7 +28,7 @@ import org.springframework.context.annotation.ScannedGenericBeanDefinition;
import org.springframework.core.type.classreading.SimpleMetadataReaderFactory;
/**
* Tests for {@WebListenerHandler}
* Tests for {@link WebListenerHandler}.
*
* @author Andy Wilkinson
*/
......
......@@ -40,7 +40,7 @@ import static org.hamcrest.Matchers.is;
import static org.junit.Assert.assertThat;
/**
* Tests for {@WebServletHandler}
* Tests for {@link WebServletHandler}.
*
* @author Andy Wilkinson
*/
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment