gautamdudeja90 / beanio

Automatically exported from code.google.com/p/beanio
Apache License 2.0
0 stars 1 forks source link

CustomTypeHandler needs access to more information #117

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Using BeanIO 2.1.0.M2

We are configuring a number of CustomTypeHandlers and for the most part this is 
working well but now I am coding a more "interesting" one and am having to 
kludge more than I'd like.  Specifically I have a custom fixed-width format 
that needs to know the width of the field along with any padding or 
justification settings.  Unfortunately these are not passed along to the 
Properties object when newInstance is called (or more to the point newInstance 
isn't even called if the "format" attribute isn't set)

Feature Request: newInstance should always be called with ALL field attributes 
passed in as properties. (length, padding, justify, etc).  An "interesting" 
CustomTypeHandler can make very good use of this information and right now the 
only way to provide it is by hacking the format attribute into something messy.

Thanks

Original issue reported on code.google.com by omnipit...@gmail.com on 15 Aug 2014 at 5:37

GoogleCodeExporter commented 9 years ago

Original comment by kevin.s...@gmail.com on 28 Aug 2014 at 3:09