commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yogesh Rao (JIRA)" <>
Subject [jira] [Commented] (SANDBOX-472) Transformer Registry
Date Tue, 20 May 2014 06:13:38 GMT


Yogesh Rao commented on SANDBOX-472:


quick thoughts on the builder pattern implementation.
Was wondering if including the class type / object / name  as part of the build up of the
BU2object would add value. The advantage that i see is that
the class definitions on which reflection needs to be applied etc can be stored with the instance
and be reused over subsequent invocations on the different methods of the class

for eg:-

BeanUtils classXYZUtil = new BeanUtils.Configure().forClassName("x.y.z").addTransformer("a.b.c",transformerImpl).build()

Here Configure is a inner class and has methods to set the bean type / object or name and
also methods for adding or replacing the default transformers / converters shipped with BU2

I would recommend instead of the factory approach can we provide helper class with methods
which would be used by developers who wouldnt like to create their own cutomized BU2 instances
and also do not want to make multiple calls to the object for setting / getting values (quite
similar to the what is existing in BU2 today)

> Transformer Registry
> --------------------
>                 Key: SANDBOX-472
>                 URL:
>             Project: Commons Sandbox
>          Issue Type: Task
>          Components: BeanUtils2
>    Affects Versions: Nightly Builds
>            Reporter: Yogesh Rao
>             Fix For: Nightly Builds
> Hi,
> This is my first development JIRA for BU2 so apologies in case i m missing out on basics.
Beanutils1 has a functionality wherein all the converters are registered and are called when
conversion in value is required. This functionality is missing for BU2 project. I also saw
that BeanUtils1 uses WeakFastHashMap for this, which seems like is having issues across architectures
and did see few JIRA's on this. Wanted inputs if having a synchronized instance of WeakHashMap
wrapped in the TransformerRegsitry class and providing methods to register, deregister, restoreDefault,
lookup be desired?

This message was sent by Atlassian JIRA

View raw message