Javadoc fixes and pruning of outdated references

This commit is contained in:
Juergen Hoeller
2016-07-15 22:12:11 +02:00
parent f0c397e4e2
commit dc1664939c
38 changed files with 145 additions and 275 deletions

View File

@@ -73,47 +73,6 @@ public class AnnotationAttributes extends LinkedHashMap<String, Object> {
this.displayName = UNKNOWN;
}
/**
* Create a new, empty {@link AnnotationAttributes} instance for the
* specified {@code annotationType}.
* @param annotationType the type of annotation represented by this
* {@code AnnotationAttributes} instance; never {@code null}
* @since 4.2
*/
public AnnotationAttributes(Class<? extends Annotation> annotationType) {
Assert.notNull(annotationType, "'annotationType' must not be null");
this.annotationType = annotationType;
this.displayName = annotationType.getName();
}
/**
* Create a new, empty {@link AnnotationAttributes} instance for the
* specified {@code annotationType}.
* @param annotationType the type of annotation represented by this
* {@code AnnotationAttributes} instance; never {@code null}
* @param classLoader the ClassLoader to try to load the annotation type on,
* or {@code null} to just store the annotation type name
* @since 4.3.2
*/
public AnnotationAttributes(String annotationType, ClassLoader classLoader) {
Assert.notNull(annotationType, "'annotationType' must not be null");
this.annotationType = getAnnotationType(annotationType, classLoader);
this.displayName = annotationType;
}
@SuppressWarnings("unchecked")
private static Class<? extends Annotation> getAnnotationType(String annotationType, ClassLoader classLoader) {
if (classLoader != null) {
try {
return (Class<? extends Annotation>) classLoader.loadClass(annotationType);
}
catch (ClassNotFoundException ex) {
// Annotation Class not resolvable
}
}
return null;
}
/**
* Create a new {@link AnnotationAttributes} instance, wrapping the provided
* map and all its <em>key-value</em> pairs.
@@ -139,6 +98,47 @@ public class AnnotationAttributes extends LinkedHashMap<String, Object> {
this.validated = other.validated;
}
/**
* Create a new, empty {@link AnnotationAttributes} instance for the
* specified {@code annotationType}.
* @param annotationType the type of annotation represented by this
* {@code AnnotationAttributes} instance; never {@code null}
* @since 4.2
*/
public AnnotationAttributes(Class<? extends Annotation> annotationType) {
Assert.notNull(annotationType, "'annotationType' must not be null");
this.annotationType = annotationType;
this.displayName = annotationType.getName();
}
/**
* Create a new, empty {@link AnnotationAttributes} instance for the
* specified {@code annotationType}.
* @param annotationType the annotation type name represented by this
* {@code AnnotationAttributes} instance; never {@code null}
* @param classLoader the ClassLoader to try to load the annotation type on,
* or {@code null} to just store the annotation type name
* @since 4.3.2
*/
public AnnotationAttributes(String annotationType, ClassLoader classLoader) {
Assert.notNull(annotationType, "'annotationType' must not be null");
this.annotationType = getAnnotationType(annotationType, classLoader);
this.displayName = annotationType;
}
@SuppressWarnings("unchecked")
private static Class<? extends Annotation> getAnnotationType(String annotationType, ClassLoader classLoader) {
if (classLoader != null) {
try {
return (Class<? extends Annotation>) classLoader.loadClass(annotationType);
}
catch (ClassNotFoundException ex) {
// Annotation Class not resolvable
}
}
return null;
}
/**
* Get the type of annotation represented by this

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2012 the original author or authors.
* Copyright 2002-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,7 +24,6 @@ import java.util.Map;
*
* <p>Used by {@link org.springframework.core.io.support.PathMatchingResourcePatternResolver},
* {@link org.springframework.web.servlet.handler.AbstractUrlHandlerMapping},
* {@link org.springframework.web.servlet.mvc.multiaction.PropertiesMethodNameResolver},
* and {@link org.springframework.web.servlet.mvc.WebContentInterceptor}.
*
* <p>The default implementation is {@link AntPathMatcher}, supporting the

View File

@@ -1,5 +1,5 @@
/*
* Copyright 2002-2015 the original author or authors.
* Copyright 2002-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.
@@ -41,12 +41,6 @@ import org.springframework.core.io.Resource;
* object, which in turn allows one to obtain a {@code java.io.File} in the
* file system through its {@code getFile()} method.
*
* <p>The main reason for these utility methods for resource location handling
* is to support {@link Log4jConfigurer}, which must be able to resolve
* resource locations <i>before the logging system has been initialized</i>.
* Spring's {@code Resource} abstraction in the core package, on the other hand,
* already expects the logging system to be available.
*
* @author Juergen Hoeller
* @since 1.1.5
* @see org.springframework.core.io.Resource