support Class converter

help:
- Create example about how to create a VRaptor3 converter
- bug: parameters are being set twice?
- JstlLocalization test
- MultipartInterceptor should be added only if jar is found on classpath
- make DefaultResourceTranslator work with jsessionid
- when it creates a * from a Path, it should be .*?...
- downloadinterceptor should use return object type and not method type (method cna return Object)
- if two urls have the same value, one is @Get and the other one is @Post, the result.logic FORWARDTO seems not to work



ONLY AFTER RELEASE
- 42 TODOs
- Map support
	map[ENUM]-->
	map["a"]-->
	map[1]-->
	map[custom tambem]
	map[id==2]="por favor"
	map[id==2].nome="por favor"
	(map[id==2] eh o lado direito!!!)
3.0.1 - cache all method lookup algorithms (getDeclaredMethod())
3.0.1 - redirect to logic should work with parameter INJECTIon @ url also
3.0.1 - nice url support as invoke(type).method(param("name1"),param("name2"))
3.0.1 - vraptor quartz component 
3.0.1 - extract VRaptor Validator
3.0.1 - Register other caches
(3.0.2) - xml output support
- integration test for vraptor-example project e vraptor-spring-example
- json support through "Accepts", priorize _format
- returning InputStream could guess the result stream type
- refactor download interceptor: instead of 3 ifs, Map.contains, Map.get
welcome file list:
	- testar se da para try/catch 404 e ver o que acontece... passar um response wrapped??? sendError
	- known bug: accessing / when its /index.html.... if its a dir containing an index.html it doesnt work, but if your url is /clients/ it works...
- MultipartInterceptor.accepts() is never called, so it throws an exception everytime a request which isn't an multipart one is made
UserAgentInterceptor que permite usar isso: documentacao
SessionFormatInterceptor que seta na session: documentacao
- make client server redirect work with proxied parameters
- routes with support to withParam()
- Hibernate.validate(Object instance, String ... fields)
- Hibernate.validate(Object instance) : Proxy.getFirst(), Proxy.getSecond() will hibernate validate those fields
- DefaultRouter cache with cacheable routes
c) unit test for PicoContainersProvider... every scope should be tested
- migrate some vraptor2 functionalities already supported @Components to be supported @Resources too
- routes should tell if they are cacheable or not (* --> sucks, too many strings)
- niceurls with file config support -> path support
- extract BUNDLEMESSAGE validation keys from converters
- if you instanceFor returns null on pico --> log debug???
- Question: RequestResult should contain an Object so logics could execute a totally custom method???
ResourceMethod: two methods with the same name: Log.error
- customizable error process on request execution
- each Provider should have a getComponentsToTest template method
- common-fileupload is mandatory, make it optional by only registering the interceptor if on the classpath
	- same thing with hibernate's validator plugin interceptor and vraptor2
- DDD related: ContainerBasedNullHandler support (non cached instances)
- better than vpraptor2: niceurl route caching	
- better tha vraptor2: faster niceurl parsing when matching
- RequestParameters implementation for POSTed xml and json values.
- MIRROR usage as a fallback for OGNL instantiation
- MIRROR usage everywhere
- reflection fallback system on nullhandler (automatic?)
- CachedConverters and others should neve register(Class), they should do it at startup and clone those pico instances if faster... check it!
- all converter erros messages should contain the original value between '' so its clear in the message if it was empty (or null)
- test that checks that the main PicoContainer is not registered... and the converters interface is also not registered so it doesnt give the same converter to two different requests
- allow private/protected constructors (search for every newInstance with getConstructor and setAccessible them, work it out with pico/mirror and so on)
- allow private/protected getters/setters
- method addAsNext on InterceptorStack could have another name, could have been another interface (same implmementation)?
- accept do base interceptors are not being invoked
- guice support
- SortedMap support
- generic interface support: instantiates the implementation
- vraptor2 components with support for inherited outjection/injection
- vraptor2 logic with 2 names support
- Logger.isDebugEnabled
- result interface as wished
- MAKE CONVERTERS GLOBAL, NOT LOCAL?
- extract the Interface/Implementation part from ReflectionBasedNullHandler
	- extra tests for Colleciton/List/and so on instantiate algorithm
- v2: support extra extensions 
- v2: converters with access to request/session/context
- niceurls extra routes
- refactor ParametersInstantiator into MethodParameters constructor?
- vraptor forward config with request/forward/optional include
- v2: xml output
- refactor all interceptors from RequestExecution inside the DefaultInterceptorStack or InterceptorRegistry so it always load. 
	- this way, the Execution bla bla should always ask the accept method before proceeding
- MAKE CACHE WORKS
	support vraptor2 plugins if possible:
		- what else?
	- v2: lookup custom converter annotated field and complain?
- path annotation with support to dynamic logic and component lookup (niceurls?)
- custom converters for specified method parameters
- v2: support for session scoped components for constructor injection
- support to method return != string --> outject
	- do not do it if @Component vrraptor2

OgnlGenericTypesSupportTest:
    @Test
    public void isCapableOfInstantiatingCustomTypesInAListSettingItsInternalValue() throws OgnlException {
        Ognl.setValue("legs[0].color", context, myCat, "red");
        assertThat(myCat.legs.get(0).color, is(equalTo("red")));
        mockery.assertIsSatisfied();
    }

OgnlParametersProviderTest:

    @Test
    public void removeFromTheCollectionIfAnElementIsCreatedWithinAListAndItsAttributesAreSetToExplicitelyToNull() throws SecurityException, NoSuchMethodException {
        final Method method = MyResource.class.getDeclaredMethod("buyA", House.class);
        final Matcher<ResourceMethod> resourceMethod = VRaptorMatchers.resourceMethod(method);
        mockery.checking(new Expectations() {
            {
                one(parameters).get("house.extraCats[1].id");
                will(returnValue(new String[] { "guilherme" }));
                one(parameters).get("house.extraCats[0].id");
                will(returnValue(new String[] { "" }));
                one(parameters).getNames();
                will(returnValue(new HashSet(Arrays.asList(new String[] { "house.extraCats[1].id",
                        "house.extraCats[0].id" }))));
                one(creator).typeFor(with(resourceMethod));
                will(returnValue(BuyASetter.class));
                one(nameProvider).parameterNamesFor(method);
                will(returnValue(new String[] { "House" }));
            }
        });
        Object[] params = provider.getParametersFor(mockery.methodFor(MyResource.class, "buyA", House.class));
        House house = (House) params[0];
        assertThat(house.extraCats, hasSize(1));
        assertThat(house.extraCats.get(0).id, is(equalTo("guilherme")));
        mockery.assertIsSatisfied();
    }


	optimizations (product):
	- component instances without any logging (faster proceedings)
	- cluster (v2, v3?)
	- converter optimization
	- connection leak
	- (optimization) static file lookup cache
	- (optimization) filter optimization
	- (support) lookup for common mistakes:
		- example: two components with the same name, same method name (same path)
	- deploy mode: complain about request unused args/ignore request unused args
	- support
	- extra vraptor2 compatibility procedures:
		- interceptor with restricted functionalities
		- plugins with restricted functionalities
		- custom lib
		- @In, @Out, @Read, @Parameter, @Logic(full support), @Component(full support)
		- v2: getters for value injection if vraptor2 component, using vraptor2 crazy introspectors, otherwise vraptor3
		- v2 paranamer support if vraptor2 component
		- v2: custom converters used on annotated fields
		- v2: migration without paranamer and annotation (defaultprovider)
		- v2: complain about parameter annotation on @Logic when not usingthe correct number of values (same as parameters)
	- vraptor2 code analysis product
		- migrator
	- (optimization) instantiate asm class only once
	- (optimization) dir lookup run only once (faster startup)
	- mistakes check removal: i.e. outjectioninterceptor ifs, assuming that the client code is just fine
	
	- totally new:
		- log visualization tool
		- log per user on log file (so you can keep track of who did what and debug an specific user)
		- stats ala hibernate stats
		
	- validate invalid parameter names in vraptor2 (duplicated names)
	- validate invalid parameter names in vraptor3 (duplicated names)
	- (optimization) empty lists should be cached and early returned
	- (optimization) cache EMPTY parameter class for method without parameters
	- (optimization) parameter name provider needs cache? maybe
	- (optimization) vraptor2 validation method lookup: remove the search
	- vrapro2 customization: log/error/pre-check on wrong validation method parameters or similar name (edid distance < 2)
	- vraptor2/3 customization: log/error/pre-check on most validations (faster/error prone/etc) - pre-analysis tool base
	- (optimization) global converters annotation/local converter annotation
	- statement product
	- graph product
	- ehcache
	- niceurl injection cache component
	- niceurl and common path two components for one url live detection (for  integration test or live)
	- niceurl cache (so the previous thing is not a problem)
	- (optimization) internal component cache limits (due to niceurl which might be huge)
	- log when trying to register a component with no interface 
