Skip to content

Commit 1fd9975

Browse files
committed
Polish Javadoc for NoSuchBeanDefinitionException
1 parent 2b7a629 commit 1fd9975

File tree

1 file changed

+23
-22
lines changed

1 file changed

+23
-22
lines changed

spring-beans/src/main/java/org/springframework/beans/factory/NoSuchBeanDefinitionException.java

+23-22
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2002-2009 the original author or authors.
2+
* Copyright 2002-2012 the original author or authors.
33
*
44
* Licensed under the Apache License, Version 2.0 (the "License");
55
* you may not use this file except in compliance with the License.
@@ -20,23 +20,24 @@
2020
import org.springframework.util.StringUtils;
2121

2222
/**
23-
* Exception thrown when a BeanFactory is asked for a bean
24-
* instance name for which it cannot find a definition.
23+
* Exception thrown when a {@code BeanFactory} is asked for a bean
24+
* instance for which it cannot find a definition.
2525
*
2626
* @author Rod Johnson
2727
* @author Juergen Hoeller
2828
*/
29+
@SuppressWarnings("serial")
2930
public class NoSuchBeanDefinitionException extends BeansException {
3031

31-
/** Name of the missing bean */
32+
/** Name of the missing bean. */
3233
private String beanName;
3334

34-
/** Required bean type */
35-
private Class beanType;
35+
/** Required type of the missing bean. */
36+
private Class<?> beanType;
3637

3738

3839
/**
39-
* Create a new NoSuchBeanDefinitionException.
40+
* Create a new {@code NoSuchBeanDefinitionException}.
4041
* @param name the name of the missing bean
4142
*/
4243
public NoSuchBeanDefinitionException(String name) {
@@ -45,7 +46,7 @@ public NoSuchBeanDefinitionException(String name) {
4546
}
4647

4748
/**
48-
* Create a new NoSuchBeanDefinitionException.
49+
* Create a new {@code NoSuchBeanDefinitionException}.
4950
* @param name the name of the missing bean
5051
* @param message detailed message describing the problem
5152
*/
@@ -55,31 +56,31 @@ public NoSuchBeanDefinitionException(String name, String message) {
5556
}
5657

5758
/**
58-
* Create a new NoSuchBeanDefinitionException.
59-
* @param type required type of bean
59+
* Create a new {@code NoSuchBeanDefinitionException}.
60+
* @param type required type of the missing bean
6061
*/
61-
public NoSuchBeanDefinitionException(Class type) {
62+
public NoSuchBeanDefinitionException(Class<?> type) {
6263
super("No unique bean of type [" + type.getName() + "] is defined");
6364
this.beanType = type;
6465
}
6566

6667
/**
67-
* Create a new NoSuchBeanDefinitionException.
68-
* @param type required type of bean
68+
* Create a new {@code NoSuchBeanDefinitionException}.
69+
* @param type required type of the missing bean
6970
* @param message detailed message describing the problem
7071
*/
71-
public NoSuchBeanDefinitionException(Class type, String message) {
72+
public NoSuchBeanDefinitionException(Class<?> type, String message) {
7273
super("No unique bean of type [" + type.getName() + "] is defined: " + message);
7374
this.beanType = type;
7475
}
7576

7677
/**
77-
* Create a new NoSuchBeanDefinitionException.
78-
* @param type required type of bean
78+
* Create a new {@code NoSuchBeanDefinitionException}.
79+
* @param type required type of the missing bean
7980
* @param dependencyDescription a description of the originating dependency
8081
* @param message detailed message describing the problem
8182
*/
82-
public NoSuchBeanDefinitionException(Class type, String dependencyDescription, String message) {
83+
public NoSuchBeanDefinitionException(Class<?> type, String dependencyDescription, String message) {
8384
super("No matching bean of type [" + type.getName() + "] found for dependency" +
8485
(StringUtils.hasLength(dependencyDescription) ? " [" + dependencyDescription + "]" : "") +
8586
": " + message);
@@ -88,18 +89,18 @@ public NoSuchBeanDefinitionException(Class type, String dependencyDescription, S
8889

8990

9091
/**
91-
* Return the name of the missing bean,
92-
* if it was a lookup by name that failed.
92+
* Return the name of the missing bean, if it was a lookup <em>by name</em>
93+
* that failed.
9394
*/
9495
public String getBeanName() {
9596
return this.beanName;
9697
}
9798

9899
/**
99-
* Return the required type of bean,
100-
* if it was a lookup by type that failed.
100+
* Return the required type of the missing bean, if it was a lookup
101+
* <em>by type</em> that failed.
101102
*/
102-
public Class getBeanType() {
103+
public Class<?> getBeanType() {
103104
return this.beanType;
104105
}
105106

0 commit comments

Comments
 (0)