下面列出了com.google.inject.matcher.Matchers#annotatedWith ( ) 实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。
@SuppressWarnings("unchecked")
protected Matcher<? super Class<?>> getClassMatcher(final Class<? extends Annotation> annotation) {
final Matcher<AnnotatedElement> res = Matchers.annotatedWith(annotation);
return classMatcher == Matchers.any()
// combine custom filter with annotation
? res : res.and((Matcher<? super AnnotatedElement>) classMatcher);
}
@SuppressWarnings({"unchecked", "PMD.CompareObjectsWithEquals"})
protected Matcher<? super Method> getMethodMatcher(final Class<? extends Annotation> annotation) {
final Matcher<AnnotatedElement> res = Matchers.annotatedWith(annotation);
return methodMatcher == DECLARED_METHOD_MATCHER
// combine custom filter with annotation
? res : res.and((Matcher<? super AnnotatedElement>) methodMatcher);
}
@Inject
public AutoScanSchemeInitializer(@Named("orient.model.package") final String appPkgs,
final Provider<ODatabaseObject> dbProvider,
final ObjectSchemeInitializer schemeInitializer) {
super(dbProvider, schemeInitializer, Matchers.annotatedWith(Persistent.class), appPkgs.split(","));
}