本文整理汇总了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());
}