I see this has more old issues as well, maybe it should be fixed? I’m on 6.2 currently though.
I’m copying the BeanItemContainer’s ability to take a collection over to my subclass of HierarchicalContainer,but the problem is BeanItem’s getPropertyDescriptors has package visibility (and i’ld like to name my package). Any way to do this w/o copy pasting the whole BeanItem in a new class to rewrite the visibility?
public FilterHierarchicalContainer(Collection<BT> collection)
throws IllegalArgumentException {
if (collection == null || collection.isEmpty()) {
throw new IllegalArgumentException(
"The collection passed to BeanItemContainer must not be null or empty");
}
type = (Class<? extends BT>) collection.iterator().next().getClass();
model = BeanItem.getPropertyDescriptors(type);
int i = 0;
for (BT bt : collection) {
addItemAt(i++, bt);
}
}