Not fully agree 2015-01-20 16:58 GMT+01:00 Anatole Tresch <[email protected]>: > Romain, I think that reflection was already clearly stated to not be the > way to go (see Marks mail some days ago). I follow Mark hereby completely, > also due to performance reasons. >
performance overhead at runtime = 0...you shouldn't do it at runtime but at registration time. > Also when we would add a method returning the expected formats (which I > think would be a very useful thing) we would loose the functional aspects, > if we add the > This is why making the type the contract makes sense here. > I see the following options currently: > 1) Define an annotation, e.g. @ConverterSpec to add to the meta-info > automatically for the auto-registered PropertyProvider instances. > 2) Add an additional interface, extending PropertyProvider that adds the > additional methods. This interface then must be used for registration and > adds the missing functionality. > 3) We could let be PropertyProvider to be non functional, but add in Java 8 > an additional method to Configuration, which tykes a Function<String,T>. > In all cases you break java 8 lambdas, not an issue by itself but we should maybe think removing this java 8 module which will soon be only justified by Optional which is highly controversed. > -Anatole > > > 2015-01-20 16:33 GMT+01:00 Romain Manni-Bucau <[email protected]>: > >> The annotation by itself doesn't make of the interface a >> FunctionalInterface or the opposite (ie you can be without it) - so >> yes this is fully useless from a code/bytecode point of view. That's >> because getTargetType() was added. >> >> I'd just remove it and use reflection to determine it. We would then >> be able to do a lot more than simple Class which are more and more >> java 1.4 (it is very funny to see it aside java 8 code ;)) >> >> >> Romain Manni-Bucau >> @rmannibucau >> http://www.tomitribe.com >> http://rmannibucau.wordpress.com >> https://github.com/rmannibucau >> >> >> 2015-01-20 16:18 GMT+01:00 Werner Keil <[email protected]>: >> > How, did it lose the annotation or was the method signature changed >> > violating the Functional Interface definition? >> > >> > Werner >> > >> > On Tue, Jan 20, 2015 at 4:10 PM, Reinhard Sandtner < >> > [email protected]> wrote: >> > >> >> Hey guys >> >> >> >> build is broken since PropertyConverter is no longer a >> FunctionalInterface >> >> :-( >> >> >> >> shall i fix it or is someone working on it? >> >> >> >> lg >> >> reini >> > > > > -- > *Anatole Tresch* > Java Engineer & Architect, JSR Spec Lead > Glärnischweg 10 > CH - 8620 Wetzikon > > *Switzerland, Europe Zurich, GMT+1* > *Twitter: @atsticks* > *Blogs: **http://javaremarkables.blogspot.ch/ > <http://javaremarkables.blogspot.ch/>* > > *Google: atsticksMobile +41-76 344 62 79*
