當前位置: 首頁>>代碼示例>>Java>>正文


Java Proxifier類代碼示例

本文整理匯總了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);
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:19,代碼來源:DefaultValidatorTest.java

示例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_$$"));
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:21,代碼來源:LinkToHandlerTest.java

示例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;
}
 
開發者ID:cejug,項目名稱:hurraa,代碼行數:10,代碼來源:CejugValidator.java

示例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;
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:15,代碼來源:DefaultValidator.java

示例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;
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:10,代碼來源:DefaultStatus.java

示例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;
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:10,代碼來源:DefaultPageResult.java

示例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;
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:8,代碼來源:LinkToHandler.java

示例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;
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:14,代碼來源:DefaultLogicResult.java

示例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;
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:11,代碼來源:DefaultRouteBuilder.java

示例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;
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:13,代碼來源:DefaultRouter.java

示例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;
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:11,代碼來源:MockSerializationResult.java

示例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;
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:7,代碼來源:DefaultValidationViewsFactory.java

示例13: MockResult

import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
public MockResult(Proxifier proxifier) {
	this.proxifier = proxifier;
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:4,代碼來源:MockResult.java

示例14: ExceptionRecorder

import br.com.caelum.vraptor.proxy.Proxifier; //導入依賴的package包/類
public ExceptionRecorder(Proxifier proxifier, ReflectionProvider reflectionProvider) {
	this.proxifier = proxifier;
	this.reflectionProvider = reflectionProvider;
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:5,代碼來源:ExceptionRecorder.java

示例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<>();
}
 
開發者ID:caelum,項目名稱:vraptor4,代碼行數:7,代碼來源:DefaultExceptionMapper.java


注:本文中的br.com.caelum.vraptor.proxy.Proxifier類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。