本文整理匯總了Java中com.google.inject.matcher.Matchers.any方法的典型用法代碼示例。如果您正苦於以下問題:Java Matchers.any方法的具體用法?Java Matchers.any怎麽用?Java Matchers.any使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類com.google.inject.matcher.Matchers
的用法示例。
在下文中一共展示了Matchers.any方法的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: testBindIntercepor
import com.google.inject.matcher.Matchers; //導入方法依賴的package包/類
public void testBindIntercepor() {
final Matcher<Class> classMatcher = Matchers.subclassesOf(List.class);
final Matcher<Object> methodMatcher = Matchers.any();
final org.aopalliance.intercept.MethodInterceptor methodInterceptor =
new org.aopalliance.intercept.MethodInterceptor() {
@Override
public Object invoke(org.aopalliance.intercept.MethodInvocation methodInvocation) {
return null;
}
};
checkModule(
new AbstractModule() {
@Override
protected void configure() {
bindInterceptor(classMatcher, methodMatcher, methodInterceptor);
}
},
new FailingElementVisitor() {
@Override
public Void visit(InterceptorBinding command) {
assertSame(classMatcher, command.getClassMatcher());
assertSame(methodMatcher, command.getMethodMatcher());
assertEquals(Arrays.asList(methodInterceptor), command.getInterceptors());
return null;
}
});
}
示例2: testBindIntercepor
import com.google.inject.matcher.Matchers; //導入方法依賴的package包/類
public void testBindIntercepor() {
final Matcher<Class> classMatcher = Matchers.subclassesOf(List.class);
final Matcher<Object> methodMatcher = Matchers.any();
final org.aopalliance.intercept.MethodInterceptor methodInterceptor
= new org.aopalliance.intercept.MethodInterceptor() {
public Object invoke(org.aopalliance.intercept.MethodInvocation methodInvocation) {
return null;
}
};
checkModule(
new AbstractModule() {
protected void configure() {
bindInterceptor(classMatcher, methodMatcher, methodInterceptor);
}
},
new FailingElementVisitor() {
@Override public Void visit(InterceptorBinding command) {
assertSame(classMatcher, command.getClassMatcher());
assertSame(methodMatcher, command.getMethodMatcher());
assertEquals(Arrays.asList(methodInterceptor), command.getInterceptors());
return null;
}
}
);
}
示例3: configure
import com.google.inject.matcher.Matchers; //導入方法依賴的package包/類
@Override
protected void configure() {
final Matcher<Object> matcher = Matchers.any();
bindListener(matcher, new ServerEndpointListener());
}
示例4: LogModule
import com.google.inject.matcher.Matchers; //導入方法依賴的package包/類
public LogModule() {
this(Matchers.any());
}
示例5: ObjectConverterModule
import com.google.inject.matcher.Matchers; //導入方法依賴的package包/類
public ObjectConverterModule() {
this(Matchers.any());
}
示例6: PackageSchemeInitializer
import com.google.inject.matcher.Matchers; //導入方法依賴的package包/類
@Inject
public PackageSchemeInitializer(@Named("orient.model.package") final String modelPkgs,
final Provider<OObjectDatabaseTx> dbProvider,
final ObjectSchemeInitializer schemeInitializer) {
super(dbProvider, schemeInitializer, Matchers.any(), modelPkgs.split(","));
}
示例7: ExtAnnotationsModule
import com.google.inject.matcher.Matchers; //導入方法依賴的package包/類
/**
* Default module constructor to check annotations on all beans.
*/
public ExtAnnotationsModule() {
this(Matchers.any());
}