Annotation Interface Name
This annotation is used to explicitly specify a parameter name when bytecode parameter names
are not available (i.e., when code is not compiled with the -parameters flag).
It allows constructors to map parameters to bean properties by name.
Can be used in the following locations:
- On constructor and method arguments when the parameter names are not in the compiled bytecode.
Examples:
Comparison with @Named:
Do not confuse this annotation with @Named, which serves a different purpose:
@Name- Specifies the parameter name for bean property mapping@Named- Specifies which named bean to inject (bean qualifier)
Example showing the difference:
See Also:
-
Required Element Summary
Required Elements
-
Element Details
-
value
The bean property or parameter name.- Returns:
- The annotation value.
-