1*3ff81872SXin Li /* 2*3ff81872SXin Li * Copyright (C) 2009 The JSR-330 Expert Group 3*3ff81872SXin Li * 4*3ff81872SXin Li * Licensed under the Apache License, Version 2.0 (the "License"); 5*3ff81872SXin Li * you may not use this file except in compliance with the License. 6*3ff81872SXin Li * You may obtain a copy of the License at 7*3ff81872SXin Li * 8*3ff81872SXin Li * http://www.apache.org/licenses/LICENSE-2.0 9*3ff81872SXin Li * 10*3ff81872SXin Li * Unless required by applicable law or agreed to in writing, software 11*3ff81872SXin Li * distributed under the License is distributed on an "AS IS" BASIS, 12*3ff81872SXin Li * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13*3ff81872SXin Li * See the License for the specific language governing permissions and 14*3ff81872SXin Li * limitations under the License. 15*3ff81872SXin Li */ 16*3ff81872SXin Li 17*3ff81872SXin Li package javax.inject; 18*3ff81872SXin Li 19*3ff81872SXin Li import java.lang.annotation.Retention; 20*3ff81872SXin Li import java.lang.annotation.Documented; 21*3ff81872SXin Li import static java.lang.annotation.RetentionPolicy.RUNTIME; 22*3ff81872SXin Li 23*3ff81872SXin Li /** 24*3ff81872SXin Li * String-based {@linkplain Qualifier qualifier}. 25*3ff81872SXin Li * 26*3ff81872SXin Li * <p>Example usage: 27*3ff81872SXin Li * 28*3ff81872SXin Li * <pre> 29*3ff81872SXin Li * public class Car { 30*3ff81872SXin Li * @Inject <b>@Named("driver")</b> Seat driverSeat; 31*3ff81872SXin Li * @Inject <b>@Named("passenger")</b> Seat passengerSeat; 32*3ff81872SXin Li * ... 33*3ff81872SXin Li * }</pre> 34*3ff81872SXin Li */ 35*3ff81872SXin Li @Qualifier 36*3ff81872SXin Li @Documented 37*3ff81872SXin Li @Retention(RUNTIME) 38*3ff81872SXin Li public @interface Named { 39*3ff81872SXin Li 40*3ff81872SXin Li /** The name. */ value()41*3ff81872SXin Li String value() default ""; 42*3ff81872SXin Li } 43