• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
2<!--NewPage-->
3<HTML>
4<HEAD>
5<!-- Generated by javadoc (build 1.5.0_16) on Mon Oct 12 16:11:19 PDT 2009 -->
6<TITLE>
7Qualifier
8</TITLE>
9
10<META NAME="keywords" CONTENT="javax.inject.Qualifier class">
11
12<LINK REL ="stylesheet" TYPE="text/css" HREF="../../stylesheet.css" TITLE="Style">
13
14<SCRIPT type="text/javascript">
15function windowTitle()
16{
17    parent.document.title="Qualifier";
18}
19</SCRIPT>
20<NOSCRIPT>
21</NOSCRIPT>
22
23</HEAD>
24
25<BODY BGCOLOR="white" onload="windowTitle();">
26
27
28<!-- ========= START OF TOP NAVBAR ======= -->
29<A NAME="navbar_top"><!-- --></A>
30<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
31<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
32<TR>
33<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
34<A NAME="navbar_top_firstrow"><!-- --></A>
35<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
36  <TR ALIGN="center" VALIGN="top">
37  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../javax/inject/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
38  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
39  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
40  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
41  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
42  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
43  </TR>
44</TABLE>
45</TD>
46<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
47</EM>
48</TD>
49</TR>
50
51<TR>
52<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
53&nbsp;<A HREF="../../javax/inject/Provider.html" title="interface in javax.inject"><B>PREV CLASS</B></A>&nbsp;
54&nbsp;<A HREF="../../javax/inject/Scope.html" title="annotation in javax.inject"><B>NEXT CLASS</B></A></FONT></TD>
55<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
56  <A HREF="../../index.html?javax/inject/Qualifier.html" target="_top"><B>FRAMES</B></A>  &nbsp;
57&nbsp;<A HREF="Qualifier.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
58&nbsp;<SCRIPT type="text/javascript">
59  <!--
60  if(window==top) {
61    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
62  }
63  //-->
64</SCRIPT>
65<NOSCRIPT>
66  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
67</NOSCRIPT>
68
69
70</FONT></TD>
71</TR>
72<TR>
73<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
74  SUMMARY:&nbsp;REQUIRED&nbsp;|&nbsp;OPTIONAL</FONT></TD>
75<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
76DETAIL:&nbsp;ELEMENT</FONT></TD>
77</TR>
78</TABLE>
79<A NAME="skip-navbar_top"></A>
80<!-- ========= END OF TOP NAVBAR ========= -->
81
82<HR>
83<!-- ======== START OF CLASS DATA ======== -->
84<H2>
85<FONT SIZE="-1">
86javax.inject</FONT>
87<BR>
88Annotation Type Qualifier</H2>
89<HR>
90<DL>
91<DT><PRE><FONT SIZE="-1">@Target(value=ANNOTATION_TYPE)
92@Retention(value=RUNTIME)
93@Documented
94</FONT>public @interface <B>Qualifier</B></DL>
95</PRE>
96
97<P>
98Identifies qualifier annotations. Anyone can define a new qualifier. A
99 qualifier annotation:
100
101 <ul>
102   <li>is annotated with <code>@Qualifier</code>, <code>@Retention(RUNTIME)</code>,
103      and typically <code>@Documented</code>.</li>
104   <li>can have attributes.</li>
105   <li>may be part of the public API, much like the dependency type, but
106      unlike implementation types which needn't be part of the public
107      API.</li>
108   <li>may have restricted usage if annotated with <code>@Target</code>. While
109      this specification covers applying qualifiers to fields and
110      parameters only, some injector configurations might use qualifier
111      annotations in other places (on methods or classes for example).</li>
112 </ul>
113
114 <p>For example:
115
116 <pre>
117   &#064;java.lang.annotation.Documented
118   &#064;java.lang.annotation.Retention(RUNTIME)
119   &#064;javax.inject.Qualifier
120   public @interface Leather {
121     Color color() default Color.TAN;
122     public enum Color { RED, BLACK, TAN }
123   }</pre>
124<P>
125
126<P>
127<DL>
128<DT><B>See Also:</B><DD><A HREF="../../javax/inject/Named.html" title="annotation in javax.inject"><CODE>@Named</CODE></A></DL>
129
130<P>
131
132<P>
133<!-- ========= END OF CLASS DATA ========= -->
134<HR>
135
136
137<!-- ======= START OF BOTTOM NAVBAR ====== -->
138<A NAME="navbar_bottom"><!-- --></A>
139<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
140<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
141<TR>
142<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
143<A NAME="navbar_bottom_firstrow"><!-- --></A>
144<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
145  <TR ALIGN="center" VALIGN="top">
146  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../javax/inject/package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
147  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
148  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
149  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
150  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
151  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
152  </TR>
153</TABLE>
154</TD>
155<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
156</EM>
157</TD>
158</TR>
159
160<TR>
161<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
162&nbsp;<A HREF="../../javax/inject/Provider.html" title="interface in javax.inject"><B>PREV CLASS</B></A>&nbsp;
163&nbsp;<A HREF="../../javax/inject/Scope.html" title="annotation in javax.inject"><B>NEXT CLASS</B></A></FONT></TD>
164<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
165  <A HREF="../../index.html?javax/inject/Qualifier.html" target="_top"><B>FRAMES</B></A>  &nbsp;
166&nbsp;<A HREF="Qualifier.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
167&nbsp;<SCRIPT type="text/javascript">
168  <!--
169  if(window==top) {
170    document.writeln('<A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>');
171  }
172  //-->
173</SCRIPT>
174<NOSCRIPT>
175  <A HREF="../../allclasses-noframe.html"><B>All Classes</B></A>
176</NOSCRIPT>
177
178
179</FONT></TD>
180</TR>
181<TR>
182<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
183  SUMMARY:&nbsp;REQUIRED&nbsp;|&nbsp;OPTIONAL</FONT></TD>
184<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
185DETAIL:&nbsp;ELEMENT</FONT></TD>
186</TR>
187</TABLE>
188<A NAME="skip-navbar_bottom"></A>
189<!-- ======== END OF BOTTOM NAVBAR ======= -->
190
191<HR>
192<font size='-1'>Copyright (C) 2009 <a href='http://code.google.com/p/atinject/'>The JSR-330 Expert Group</a>. Licensed under the <a href='http://www.apache.org/licenses/LICENSE-2.0'>Apache License</a>, Version 2.0.</font>
193</BODY>
194</HTML>
195