本文整理匯總了Java中br.com.caelum.vraptor.proxy.Proxifier類的典型用法代碼示例。如果您正苦於以下問題:Java Proxifier類的具體用法?Java Proxifier怎麽用?Java Proxifier使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
Proxifier類屬於br.com.caelum.vraptor.proxy包,在下文中一共展示了Proxifier類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: setup
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
@Before
public void setup() {
ResourceBundle bundle = new SafeResourceBundle(ResourceBundle.getBundle("messages"));
ValidatorFactory validatorFactory = javax.validation.Validation.buildDefaultValidatorFactory();
javax.validation.Validator bvalidator = validatorFactory.getValidator();
MessageInterpolator interpolator = validatorFactory.getMessageInterpolator();
Proxifier proxifier = new JavassistProxifier();
Messages messages = new Messages();
validator = new DefaultValidator(result, new DefaultValidationViewsFactory(result, proxifier, new DefaultReflectionProvider()),
outjector, proxifier, bundle, bvalidator, interpolator, Locale.ENGLISH, messages);
when(result.use(LogicResult.class)).thenReturn(logicResult);
when(result.use(PageResult.class)).thenReturn(pageResult);
when(logicResult.forwardTo(MyComponent.class)).thenReturn(instance);
when(pageResult.of(MyComponent.class)).thenReturn(instance);
}
示例2: shouldAvoidFrozenClassIfTwoVRaptorInstancesAreLoaded
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
@Test
public void shouldAvoidFrozenClassIfTwoVRaptorInstancesAreLoaded() throws Throwable {
ServletContext context0 = Mockito.mock(ServletContext.class);
ServletContext context1 = Mockito.mock(ServletContext.class);
when(context0.getContextPath()).thenReturn("");
when(context1.getContextPath()).thenReturn("/another");
ReflectionProvider reflectionProvider = new DefaultReflectionProvider();
Proxifier proxifier = new JavassistProxifier();
LinkToHandler handler0 = new LinkToHandler(context0, router, proxifier, reflectionProvider);
LinkToHandler handler1 = new LinkToHandler(context1, router, proxifier, reflectionProvider);
Object object0 = handler0.get(new DefaultBeanClass(TestController.class));
assertThat(object0.getClass().getName(), containsString("$linkTo_$$"));
Object object1 = handler1.get(new DefaultBeanClass(TestController.class));
assertThat(object1.getClass().getName(), containsString("$linkTo$another_$$"));
}
示例3: CejugValidator
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
@Inject
public CejugValidator(Result result, ValidationViewsFactory factory, Outjector outjector, Proxifier proxifier,
ResourceBundle bundle, Validator validator, MessageInterpolator interpolator, Locale locale) {
super(result, factory, outjector, proxifier, bundle, validator, interpolator, locale);
this.result = result;
this.viewsFactory = factory;
this.outjector = outjector;
this.proxifier = proxifier;
}
示例4: DefaultValidator
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
@Inject
public DefaultValidator(Result result, ValidationViewsFactory factory, Outjector outjector, Proxifier proxifier,
ResourceBundle bundle, javax.validation.Validator bvalidator, MessageInterpolator interpolator, Locale locale,
Messages messages) {
this.result = result;
this.viewsFactory = factory;
this.outjector = outjector;
this.proxifier = proxifier;
this.bundle = bundle;
this.bvalidator = bvalidator;
this.interpolator = interpolator;
this.locale = locale;
this.messages = messages;
}
示例5: DefaultStatus
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
@Inject
public DefaultStatus(HttpServletResponse response, Result result, Configuration config,
Proxifier proxifier, Router router) {
this.response = response;
this.result = result;
this.config = config;
this.proxifier = proxifier;
this.router = router;
}
示例6: DefaultPageResult
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
@Inject
public DefaultPageResult(MutableRequest req, MutableResponse res, MethodInfo methodInfo,
PathResolver resolver, Proxifier proxifier) {
this.request = unproxifyIfPossible(req);
this.response = unproxifyIfPossible(res);
this.methodInfo = methodInfo;
this.proxifier = proxifier;
this.resolver = resolver;
}
示例7: LinkToHandler
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
@Inject
public LinkToHandler(ServletContext context, Router router, Proxifier proxifier, ReflectionProvider reflectionProvider) {
this.context = context;
this.router = router;
this.proxifier = proxifier;
this.reflectionProvider = reflectionProvider;
}
示例8: DefaultLogicResult
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
@Inject
public DefaultLogicResult(Proxifier proxifier, Router router, MutableRequest request, HttpServletResponse response,
Container container, PathResolver resolver, TypeNameExtractor extractor, FlashScope flash, MethodInfo methodInfo) {
this.proxifier = proxifier;
this.response = unproxifyIfPossible(response);
this.request = unproxifyIfPossible(request);
this.router = router;
this.container = container;
this.resolver = resolver;
this.extractor = extractor;
this.flash = flash;
this.methodInfo = methodInfo;
}
示例9: DefaultRouteBuilder
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
public DefaultRouteBuilder(Proxifier proxifier, TypeFinder finder, Converters converters, ParameterNameProvider nameProvider,
Evaluator evaluator, String uri, EncodingHandler encodingHandler) {
this.proxifier = proxifier;
this.finder = finder;
this.converters = converters;
this.nameProvider = nameProvider;
this.evaluator = evaluator;
this.originalUri = uri;
this.encodingHandler = encodingHandler;
}
示例10: DefaultRouter
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
@Inject
public DefaultRouter(Proxifier proxifier, TypeFinder finder, Converters converters,
ParameterNameProvider nameProvider, Evaluator evaluator, EncodingHandler encodingHandler,
CacheStore<Invocation, Route> cache) {
this.proxifier = proxifier;
this.finder = finder;
this.converters = converters;
this.nameProvider = nameProvider;
this.evaluator = evaluator;
this.encodingHandler = encodingHandler;
this.cache = cache;
}
示例11: MockSerializationResult
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
public MockSerializationResult(Proxifier proxifier, XStreamBuilder xstreambuilder, GsonSerializerBuilder gsonBuilder,
Environment environment, ReflectionProvider reflectionProvider) {
super(proxifier);
this.environment = environment;
this.reflectionProvider = reflectionProvider;
this.response = new MockHttpServletResponse();
this.extractor = new DefaultTypeNameExtractor();
this.xstreambuilder = xstreambuilder;
this.gsonBuilder = gsonBuilder;
}
示例12: DefaultValidationViewsFactory
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
@Inject
public DefaultValidationViewsFactory(Result result, Proxifier proxifier, ReflectionProvider reflectionProvider) {
this.result = result;
this.proxifier = proxifier;
this.reflectionProvider = reflectionProvider;
}
示例13: MockResult
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
public MockResult(Proxifier proxifier) {
this.proxifier = proxifier;
}
示例14: ExceptionRecorder
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
public ExceptionRecorder(Proxifier proxifier, ReflectionProvider reflectionProvider) {
this.proxifier = proxifier;
this.reflectionProvider = reflectionProvider;
}
示例15: DefaultExceptionMapper
import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
@Inject
public DefaultExceptionMapper(Proxifier proxifier, ReflectionProvider reflectionProvider) {
this.proxifier = proxifier;
this.reflectionProvider = reflectionProvider;
this.exceptions = new LinkedHashMap<>();
}