[jboss-dev-forums] [Design the new POJO MicroContainer] - Re: Anonymous beans
alesj
do-not-reply at jboss.com
Tue Apr 8 08:45:05 EDT 2008
"adrian at jboss.org" wrote : No. Just make MetaDataVisitorNode implement Cloneable.
How does that help me with cloning the items?
Since the item::clone() method comes from Object, where it is protected.
e.g.
| public AbstractCollectionMetaData clone()
| {
| AbstractCollectionMetaData clone = (AbstractCollectionMetaData)super.clone();
| clone.collection = getDefaultInstance();
| for (MetaDataVisitorNode item : collection)
| clone.collection.add((MetaDataVisitorNode)item.clone());
| return clone;
| }
|
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4142345#4142345
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4142345
More information about the jboss-dev-forums
mailing list