本文整理匯總了Java中org.osgl.inject.annotation.InjectTag類的典型用法代碼示例。如果您正苦於以下問題:Java InjectTag類的具體用法?Java InjectTag怎麽用?Java InjectTag使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
InjectTag類屬於org.osgl.inject.annotation包,在下文中一共展示了InjectTag類的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testTaggedAnnotation
import org.osgl.inject.annotation.InjectTag; //導入依賴的package包/類
@Test
public void testTaggedAnnotation() throws Exception {
Constructor<LeatherSmoother.Host> constructor = LeatherSmoother.Host.class.getConstructor(LeatherSmoother.class);
Annotation[] annotations = constructor.getParameterAnnotations()[0];
Type paramType = constructor.getGenericParameterTypes()[0];
BeanSpec spec = BeanSpec.of(paramType, annotations, Genie.create());
eq(1, spec.taggedAnnotations(Qualifier.class).length);
eq(0, spec.taggedAnnotations(InjectTag.class).length);
eq(0, spec.taggedAnnotations(Retention.class).length);
eq(0, spec.taggedAnnotations(Target.class).length);
eq(0, spec.taggedAnnotations(Inherited.class).length);
eq(0, spec.taggedAnnotations(Documented.class).length);
}