Name: Anonymous 2008-05-01 0:00
Have you read your Design Patterns: Elements of Reusable Object-Oriented Software today?
new ObjectFactoryInstanceBridgeObserverFactory today ?
public class AnnotatableModel implements Adapter {
private List adapters = new ArrayList();
public Object getAdapter(Class clazz) {
for(Object o : adapters) {
if(o instanceof clazz)
return o;
}
return null;
}
public void addAdapter(Object o) {
this.adapters.add(o);
}
}
// Now you could add annotations of arbitrary type to the model, and get them out later. I thought that was cool.