Skip to content

Commit e674d75

Browse files
committed
Polish Javadoc
1 parent e07df7e commit e674d75

File tree

252 files changed

+680
-348
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

252 files changed

+680
-348
lines changed

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/audit/AuditEvent.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ public AuditEvent(String principal, String type, Map<String, Object> data) {
6161

6262
/**
6363
* Create a new audit event for the current time from data provided as name-value
64-
* pairs
64+
* pairs.
6565
* @param principal The user principal responsible
6666
* @param type the event type
6767
* @param data The event data in the form 'key=value' or simply 'key'

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/audit/InMemoryAuditEventRepository.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,8 @@ public InMemoryAuditEventRepository(int capacity) {
4646
}
4747

4848
/**
49-
* @param capacity the capacity to set
49+
* Set the capacity of this event repository.
50+
* @param capacity the capacity
5051
*/
5152
public synchronized void setCapacity(int capacity) {
5253
this.events = new AuditEvent[capacity];

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/audit/listener/AuditApplicationEvent.java

+1
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ public AuditApplicationEvent(AuditEvent auditEvent) {
8282
}
8383

8484
/**
85+
* Get the audit event.
8586
* @return the audit event
8687
*/
8788
public AuditEvent getAuditEvent() {

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/HealthIndicatorAutoConfigurationProperties.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
import org.springframework.boot.context.properties.ConfigurationProperties;
2222

2323
/**
24-
* Configuration properties for some health properties
24+
* Configuration properties for some health properties.
2525
*
2626
* @author Christian Dupuis
2727
* @since 1.2.0

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementContextResolver.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public MvcEndpoints getMvcEndpoints() {
5252
}
5353

5454
/**
55-
* Return the management {@link ApplicationContext}
55+
* Return the management {@link ApplicationContext}.
5656
* @return the management {@link ApplicationContext}
5757
*/
5858
public ApplicationContext getApplicationContext() {

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ManagementWebSecurityAutoConfiguration.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ protected static class WebSecurityEnabler extends AuthenticationManagerConfigura
185185
}
186186

187187
/**
188-
* WebSecurityEnabler condition
188+
* WebSecurityEnabler condition.
189189
*/
190190
static class WebSecurityEnablerCondition extends SpringBootCondition {
191191

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/autoconfigure/ShellProperties.java

+6-6
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@ public static abstract class CrshShellAuthenticationProperties extends
221221
}
222222

223223
/**
224-
* SSH properties
224+
* SSH properties.
225225
*/
226226
public static class Ssh extends CrshShellProperties {
227227

@@ -279,7 +279,7 @@ public Integer getPort() {
279279
}
280280

281281
/**
282-
* Telnet properties
282+
* Telnet properties.
283283
*/
284284
public static class Telnet extends CrshShellProperties {
285285

@@ -322,7 +322,7 @@ public Integer getPort() {
322322
}
323323

324324
/**
325-
* Auth specific properties for JAAS authentication
325+
* Auth specific properties for JAAS authentication.
326326
*/
327327
@ConfigurationProperties(prefix = "shell.auth.jaas", ignoreUnknownFields = false)
328328
public static class JaasAuthenticationProperties extends
@@ -351,7 +351,7 @@ public String getDomain() {
351351
}
352352

353353
/**
354-
* Auth specific properties for key authentication
354+
* Auth specific properties for key authentication.
355355
*/
356356
@ConfigurationProperties(prefix = "shell.auth.key", ignoreUnknownFields = false)
357357
public static class KeyAuthenticationProperties extends
@@ -382,7 +382,7 @@ public String getPath() {
382382
}
383383

384384
/**
385-
* Auth specific properties for simple authentication
385+
* Auth specific properties for simple authentication.
386386
*/
387387
@ConfigurationProperties(prefix = "shell.auth.simple", ignoreUnknownFields = false)
388388
public static class SimpleAuthenticationProperties extends
@@ -457,7 +457,7 @@ public void setPassword(String password) {
457457
}
458458

459459
/**
460-
* Auth specific properties for Spring authentication
460+
* Auth specific properties for Spring authentication.
461461
*/
462462
@ConfigurationProperties(prefix = "shell.auth.spring", ignoreUnknownFields = false)
463463
public static class SpringAuthenticationProperties extends

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/cache/AbstractJmxCacheStatisticsProvider.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,9 @@
3737
* Base {@link CacheStatisticsProvider} implementation that uses JMX to retrieve the cache
3838
* statistics.
3939
*
40+
* @param <C> The cache type
4041
* @author Stephane Nicoll
4142
* @since 1.3.0
42-
* @param <C> The cache type
4343
*/
4444
public abstract class AbstractJmxCacheStatisticsProvider<C extends Cache> implements
4545
CacheStatisticsProvider<C> {

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/ConfigurationPropertiesReportEndpoint.java

+13-1
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,10 @@ private Map<String, Object> getConfigurationPropertiesBeans(
144144
/**
145145
* Cautiously serialize the bean to a map (returning a map with an error message
146146
* instead of throwing an exception if there is a problem).
147+
* @param mapper the object mapper
148+
* @param bean the source bean
149+
* @param prefix the prefix
150+
* @return the serialized instance
147151
*/
148152
private Map<String, Object> safeSerialize(ObjectMapper mapper, Object bean,
149153
String prefix) {
@@ -173,6 +177,7 @@ protected void configureObjectMapper(ObjectMapper mapper) {
173177

174178
/**
175179
* Ensure only bindable and non-cyclic bean properties are reported.
180+
* @param mapper the object mapper
176181
*/
177182
private void applySerializationModifier(ObjectMapper mapper) {
178183
SerializerFactory factory = BeanSerializerFactory.instance
@@ -183,6 +188,7 @@ private void applySerializationModifier(ObjectMapper mapper) {
183188
/**
184189
* Configure PropertyFilter to make sure Jackson doesn't process CGLIB generated bean
185190
* properties.
191+
* @param mapper the object mapper
186192
*/
187193
private void applyCglibFilters(ObjectMapper mapper) {
188194
mapper.setAnnotationIntrospector(new CglibAnnotationIntrospector());
@@ -192,7 +198,11 @@ private void applyCglibFilters(ObjectMapper mapper) {
192198

193199
/**
194200
* Extract configuration prefix from {@link ConfigurationProperties} annotation.
195-
* @param beanFactoryMetaData
201+
* @param context the application context
202+
* @param beanFactoryMetaData the bean factory meta-data
203+
* @param beanName the bean name
204+
* @param bean the bean
205+
* @return the prefix
196206
*/
197207
private String extractPrefix(ApplicationContext context,
198208
ConfigurationBeanFactoryMetaData beanFactoryMetaData, String beanName,
@@ -216,6 +226,8 @@ private String extractPrefix(ApplicationContext context,
216226
/**
217227
* Sanitize all unwanted configuration properties to avoid leaking of sensitive
218228
* information.
229+
* @param map the source map
230+
* @return the sanitized map
219231
*/
220232
@SuppressWarnings("unchecked")
221233
private Map<String, Object> sanitize(Map<String, Object> map) {

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/DataSourcePublicMetrics.java

+1
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,7 @@ protected String createPrefix(String name, DataSource dataSource, boolean primar
113113
* Attempt to locate the primary {@link DataSource} (i.e. either the only data source
114114
* available or the one amongst the candidates marked as {@link Primary}. Return
115115
* {@code null} if there no primary data source could be found.
116+
* @return the primary datasource
116117
*/
117118
private DataSource getPrimaryDataSource() {
118119
try {

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/FlywayEndpoint.java

+3
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,9 @@ public List<FlywayMigration> invoke() {
5555
return migrations;
5656
}
5757

58+
/**
59+
* Migration properties.
60+
*/
5861
public static class FlywayMigration {
5962

6063
private MigrationType type;

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/HealthEndpoint.java

+2
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,8 @@ public Health invoke() {
8383

8484
/**
8585
* Turns the bean name into a key that can be used in the map of health information.
86+
* @param name the bean name
87+
* @return the key
8688
*/
8789
private String getKey(String name) {
8890
int index = name.toLowerCase().indexOf("healthindicator");

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/PublicMetrics.java

+2-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@
2929
public interface PublicMetrics {
3030

3131
/**
32-
* @return an indication of current state through metrics
32+
* Return an indication of current state through metrics.
33+
* @return the public metrics
3334
*/
3435
Collection<Metric<?>> metrics();
3536

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/RequestMappingEndpoint.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -58,14 +58,16 @@ public void setApplicationContext(ApplicationContext applicationContext)
5858
}
5959

6060
/**
61-
* @param handlerMappings the mappings to set
61+
* Set the handler mappings.
62+
* @param handlerMappings the handler mappings
6263
*/
6364
public void setHandlerMappings(List<AbstractUrlHandlerMapping> handlerMappings) {
6465
this.handlerMappings = handlerMappings;
6566
}
6667

6768
/**
68-
* @param methodMappings the method mappings to set
69+
* Set the method mappings.
70+
* @param methodMappings the method mappings
6971
*/
7072
public void setMethodMappings(List<AbstractHandlerMethodMapping<?>> methodMappings) {
7173
this.methodMappings = methodMappings;

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/SystemPublicMetrics.java

+3
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ protected void addBasicMetrics(Collection<Metric<?>> result) {
7676
/**
7777
* Add metrics from ManagementFactory if possible. Note that ManagementFactory is not
7878
* available on Google App Engine.
79+
* @param result the result
7980
*/
8081
private void addManagementMetrics(Collection<Metric<?>> result) {
8182
try {
@@ -153,6 +154,8 @@ protected void addGarbageCollectionMetrics(Collection<Metric<?>> result) {
153154
/**
154155
* Turn GC names like 'PS Scavenge' or 'PS MarkSweep' into something that is more
155156
* metrics friendly.
157+
* @param name the source name
158+
* @return a metric friendly name
156159
*/
157160
private String beautifyGcName(String name) {
158161
return StringUtils.replace(name, " ", "_").toLowerCase();

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/jmx/EndpointMBeanExporter.java

+3
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@
6161
public class EndpointMBeanExporter extends MBeanExporter implements SmartLifecycle,
6262
ApplicationContextAware {
6363

64+
/**
65+
* The default JMX domain.
66+
*/
6467
public static final String DEFAULT_DOMAIN = "org.springframework.boot";
6568

6669
private static Log logger = LogFactory.getLog(EndpointMBeanExporter.class);

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorHalBrowserEndpoint.java

+11
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@
3232
import org.springframework.web.servlet.resource.ResourceTransformerChain;
3333
import org.springframework.web.servlet.resource.TransformedResource;
3434

35+
/**
36+
* {@link MvcEndpoint} to expose a HAL browser.
37+
*
38+
* @author Dave Syer
39+
* @author Phillip Webb
40+
* @author Andy Wilkinson
41+
* @since 1.3.0
42+
*/
3543
public class ActuatorHalBrowserEndpoint extends ActuatorHalJsonEndpoint implements
3644
ResourceLoaderAware {
3745

@@ -93,6 +101,9 @@ public static HalBrowserLocation getHalBrowserLocation(ResourceLoader resourceLo
93101
return null;
94102
}
95103

104+
/**
105+
* HAL Browser properties.
106+
*/
96107
public static class HalBrowserLocation {
97108

98109
private final String resourceLocation;

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/ActuatorHalJsonEndpoint.java

+3-3
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@
2929
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
3030

3131
/**
32-
* {@link MvcEndpoint} for the actuator. Uses content negotiation to provide access to the
33-
* HAL browser (when on the classpath), and to HAL-formatted JSON.
32+
* {@link MvcEndpoint} to expose HAL-formatted JSON.
3433
*
3534
* @author Dave Syer
36-
* @author Phil Webb
35+
* @author Phillip Webb
3736
* @author Andy Wilkinson
37+
* @since 1.3.0
3838
*/
3939
@ConfigurationProperties("endpoints.actuator")
4040
public class ActuatorHalJsonEndpoint extends WebMvcConfigurerAdapter implements

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EndpointHandlerMapping.java

+7-4
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ public void afterPropertiesSet() {
9797

9898
/**
9999
* Since all handler beans are passed into the constructor there is no need to detect
100-
* anything here
100+
* anything here.
101101
*/
102102
@Override
103103
protected boolean isHandler(Class<?> beanType) {
@@ -149,7 +149,8 @@ private RequestMappingInfo withNewPatterns(RequestMappingInfo mapping,
149149
}
150150

151151
/**
152-
* @param prefix the prefix to set
152+
* Set the prefix used in mappings.
153+
* @param prefix the prefix
153154
*/
154155
public void setPrefix(String prefix) {
155156
Assert.isTrue("".equals(prefix) || StringUtils.startsWithIgnoreCase(prefix, "/"),
@@ -158,13 +159,15 @@ public void setPrefix(String prefix) {
158159
}
159160

160161
/**
161-
* @return the prefix used in mappings
162+
* Get the prefix used in mappings.
163+
* @return the prefix
162164
*/
163165
public String getPrefix() {
164166
return this.prefix;
165167
}
166168

167169
/**
170+
* Get the path of the endpoint.
168171
* @param endpoint the endpoint
169172
* @return the path used in mappings
170173
*/
@@ -189,7 +192,7 @@ public boolean isDisabled() {
189192
}
190193

191194
/**
192-
* Return the endpoints
195+
* Return the endpoints.
193196
* @return the endpoints
194197
*/
195198
public Set<? extends MvcEndpoint> getEndpoints() {

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EndpointHandlerMappingCustomizer.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
public interface EndpointHandlerMappingCustomizer {
2626

2727
/**
28-
* Customize the specified {@link EndpointHandlerMapping}
28+
* Customize the specified {@link EndpointHandlerMapping}.
2929
* @param mapping the {@link EndpointHandlerMapping} to customize
3030
*/
3131
void customize(EndpointHandlerMapping mapping);

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/EndpointMvcAdapter.java

+2-3
Original file line numberDiff line numberDiff line change
@@ -74,10 +74,9 @@ public Class<? extends Endpoint> getEndpointType() {
7474

7575
/**
7676
* Returns the response that should be returned when the endpoint is disabled.
77-
*
78-
* @see Endpoint#isEnabled()
79-
* @since 1.2.4
8077
* @return The response to be returned when the endpoint is disabled
78+
* @since 1.2.4
79+
* @see Endpoint#isEnabled()
8180
*/
8281
protected ResponseEntity<?> getDisabledResponse() {
8382
return MvcEndpoint.DISABLED_RESPONSE;

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/MvcEndpoint.java

+3
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
*/
3535
public interface MvcEndpoint {
3636

37+
/**
38+
* A {@link ResponseEntity} returned for disabled endpoints.
39+
*/
3740
ResponseEntity<Map<String, String>> DISABLED_RESPONSE = new ResponseEntity<Map<String, String>>(
3841
Collections.singletonMap("message", "This endpoint is disabled"),
3942
HttpStatus.NOT_FOUND);

spring-boot-actuator/src/main/java/org/springframework/boot/actuate/endpoint/mvc/NamePatternFilter.java

+7-1
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@
2626
* must provide implementations of {@link #getValue(Object, String)} and
2727
* {@link #getNames(Object, NameCallback)}.
2828
*
29+
* @param <T> The source data type
2930
* @author Phillip Webb
3031
* @author Sergei Egorov
31-
* @param <T> The source data type
3232
* @since 1.3.0
3333
*/
3434
abstract class NamePatternFilter<T> {
@@ -66,12 +66,18 @@ private boolean isRegex(String name) {
6666

6767
protected abstract Object getValue(T source, String name);
6868

69+
/**
70+
* Callback used to add a name.
71+
*/
6972
protected interface NameCallback {
7073

7174
void addName(String name);
7275

7376
}
7477

78+
/**
79+
* {@link NameCallback} implementation to collect results.
80+
*/
7581
private class ResultCollectingNameCallback implements NameCallback {
7682

7783
private final Pattern pattern;

0 commit comments

Comments
 (0)