Brian is looking for this issue to get resolved asap (he's having a bunch of beans
that don't need any name, mostly inner beans):
-
http://jira.jboss.com/jira/browse/JBMICROCONT-281
-
http://jira.jboss.com/jira/browse/JBMICROCONT-28
-
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=89581&am...
-
http://www.jboss.com/index.html?module=bb&op=viewtopic&t=105759
Is there any preferred to do metadata cloning?
I'm thinking of something like this:
| public Object clone()
| {
| AbstractBeanMetaData clone = new AbstractBeanMetaData();
| doClone(clone);
| return clone;
| }
|
| protected void doClone(AbstractBeanMetaData clone)
| {
| super.doClone(clone);
| clone.setBean(bean);
| clone.setName(name);
| clone.setAliases(aliases);
| ...
| }
|
Do we already have some similar code, to clone collections:
| @SuppressWarnings("unchecked")
| public static <U extends JBossInterface, T extends Collection<U>> T
clone(T collection)
| {
| if (collection == null)
| return null;
|
| try
| {
| Class<? extends Collection> collectionClass = collection.getClass();
| T clone = (T)collectionClass.newInstance();
| for (U item : collection)
| clone.add((U)item.clone());
| return clone;
| }
| catch (Throwable t)
| {
| throw new RuntimeException(t);
| }
| }
|
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142099#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...