Polishing

- Correct copyright years
- Add `@since` to javadoc of new public classes
- Make new classes final where appropriate
This commit is contained in:
Andy Wilkinson
2016-05-25 11:26:02 +01:00
parent 42353a0b5f
commit 0446c99a10
57 changed files with 71 additions and 46 deletions

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -27,6 +27,7 @@ import org.springframework.restdocs.snippet.Snippet;
* @author Andy Wilkinson
* @author Paul-Christian Volkmer
* @author Raman Gupta
* @since 1.1.0
*/
public abstract class CliDocumentation {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -39,6 +39,7 @@ import org.springframework.util.StringUtils;
* @author Paul-Christian Volkmer
* @see CliDocumentation#curlRequest()
* @see CliDocumentation#curlRequest(Map)
* @since 1.1.0
*/
public class CurlRequestSnippet extends TemplatedSnippet {

View File

@@ -40,6 +40,7 @@ import org.springframework.util.StringUtils;
* @author Andy Wilkinson
* @see CliDocumentation#httpieRequest()
* @see CliDocumentation#httpieRequest(Map)
* @since 1.1.0
*/
public class HttpieRequestSnippet extends TemplatedSnippet {

View File

@@ -25,6 +25,7 @@ import org.springframework.restdocs.RestDocumentationContext;
* configuration implementation.
*
* @author Andy Wilkinson
* @since 1.1.0
*/
public abstract class AbstractConfigurer {

View File

@@ -21,6 +21,7 @@ package org.springframework.restdocs.config;
*
* @param <PARENT> The type of the configurer's parent
* @author Andy Wilkinson
* @since 1.1.0
*/
public abstract class AbstractNestedConfigurer<PARENT> extends AbstractConfigurer
implements NestedConfigurer<PARENT> {

View File

@@ -21,6 +21,7 @@ package org.springframework.restdocs.config;
*
* @param <PARENT> The parent's type
* @author Andy Wilkinson
* @since 1.1.0
*/
interface NestedConfigurer<PARENT> {

View File

@@ -39,6 +39,7 @@ import org.springframework.restdocs.templates.mustache.MustacheTemplateEngine;
* @param <T> The concrete type of this configurer, to be returned from methods that
* support chaining
* @author Andy Wilkinson
* @since 1.1.0
*/
public abstract class RestDocumentationConfigurer<S extends AbstractConfigurer, T> {

View File

@@ -22,6 +22,7 @@ import org.springframework.restdocs.templates.TemplateFormat;
* An encapsulation of the configuration for documentation snippets.
*
* @author Andy Wilkinson
* @since 1.1.0
*/
class SnippetConfiguration {

View File

@@ -35,6 +35,7 @@ import org.springframework.restdocs.templates.TemplateFormats;
* @param <PARENT> The type of the configurer's parent
* @param <TYPE> The concrete type of the configurer to be returned from chained methods
* @author Andy Wilkinson
* @since 1.1.0
*/
public abstract class SnippetConfigurer<PARENT, TYPE>
extends AbstractNestedConfigurer<PARENT> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -21,6 +21,7 @@ package org.springframework.restdocs.generate;
* generation.
*
* @author Andy Wilkinson
* @since 1.1.0
*/
public class RestDocumentationGenerationException extends RuntimeException {

View File

@@ -41,7 +41,7 @@ import org.springframework.util.Assert;
* @param <REQ> the request type that can be handled
* @param <RESP> the response type that can be handled
* @author Andy Wilkinson
* @since 1.1
* @since 1.1.0
*/
public final class RestDocumentationGenerator<REQ, RESP> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2014-2015 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -15,6 +15,6 @@
*/
/**
* Classes that drive the generation of the documentaiton snippets.
* Classes that drive the generation of the documentation snippets.
*/
package org.springframework.restdocs.generate;

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -24,6 +24,7 @@ package org.springframework.restdocs.operation;
* @author Andy Wilkinson
* @see RequestConverter#convert(Object)
* @see ResponseConverter#convert(Object)
* @since 1.1.0
*/
public class ConversionException extends RuntimeException {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@ package org.springframework.restdocs.operation;
*
* @param <R> The implementation-specific request type
* @author Andy Wilkinson
* @since 1.1.0
*/
public interface RequestConverter<R> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -22,6 +22,7 @@ package org.springframework.restdocs.operation;
*
* @param <R> The implementation-specific response type
* @author Andy Wilkinson
* @since 1.1.0
*/
public interface ResponseConverter<R> {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -23,6 +23,7 @@ import org.springframework.restdocs.snippet.IgnorableDescriptor;
*
* @author Andy Wilkinson
* @see RequestDocumentation#partWithName
* @since 1.1.0
*/
public class RequestPartDescriptor extends IgnorableDescriptor<RequestPartDescriptor> {

View File

@@ -42,6 +42,7 @@ import org.springframework.util.Assert;
* @see RequestDocumentation#requestParts(Map, RequestPartDescriptor...)
* @see RequestDocumentation#relaxedRequestParts(RequestPartDescriptor...)
* @see RequestDocumentation#relaxedRequestParts(Map, RequestPartDescriptor...)
* @since 1.1.0
*/
public class RequestPartsSnippet extends TemplatedSnippet {

View File

@@ -23,7 +23,7 @@ import org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver;
* A factory for creating {@link PlaceholderResolver} instances.
*
* @author Andy Wilkinson
* @since 1.1
* @since 1.1.0
*/
public interface PlaceholderResolverFactory {

View File

@@ -24,7 +24,7 @@ import org.springframework.util.PropertyPlaceholderHelper.PlaceholderResolver;
* {@link RestDocumentationContextPlaceholderResolver} instances.
*
* @author Andy Wilkinson
* @since 1.1
* @since 1.1.0
*/
public final class RestDocumentationContextPlaceholderResolverFactory
implements PlaceholderResolverFactory {

View File

@@ -21,6 +21,7 @@ package org.springframework.restdocs.templates;
* as Asciidoctor or Markdown.
*
* @author Andy Wilkinson
* @since 1.1.0
*/
public interface TemplateFormat {

View File

@@ -20,6 +20,7 @@ package org.springframework.restdocs.templates;
* An enumeration of the built-in formats for which templates are provuded.
*
* @author Andy Wilkinson
* @since 1.1.0
*/
public abstract class TemplateFormats {

View File

@@ -27,6 +27,7 @@ import org.springframework.restdocs.mustache.Template.Fragment;
* formatting.
*
* @author Andy Wilkinson
* @since 1.1.0
*/
public final class AsciidoctorTableCellContentLambda implements Lambda {

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2015 the original author or authors.
* Copyright 2014-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2012-2016 the original author or authors.
* Copyright 2014-2016 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.