CollectionAdapterpublic class CollectionAdapter extends AbstractAdapterElement
Fields Summary |
---|
private Log | log |
Constructors Summary |
---|
public CollectionAdapter()
| public CollectionAdapter(AdapterFactory rootAdapterFactory, AdapterNode parent, String propertyName, Object value)
setContext(rootAdapterFactory, parent, propertyName, value);
|
Methods Summary |
---|
protected java.util.List | buildChildAdapters()
Collection values = (Collection) getPropertyValue();
List<Node> children = new ArrayList<Node>(values.size());
for (Object value : values) {
Node childAdapter = getAdapterFactory().adaptNode(this, "item", value);
if (childAdapter != null)
children.add(childAdapter);
if (log.isDebugEnabled()) {
log.debug(this + " adding adapter: " + childAdapter);
}
}
return children;
|
|