generic, annotation-driven eventuality presentation frameworks
while simple, interface-driven eventuality presentation frameworks java have around given pre-cambrian times (e.g. java.beans.propertychangesupport), apropos increasingly renouned frameworks annotation-driven eventuality presentation instead.
for an example, . listener category the listener methods annotated, rather adapting firm interface. rather easier way to, easier read, given don't have lifeless implementations listener callbacks you're prying (and yes, i know listener adapter superclasses).
here's illustration jbosscache docs:
@cachelistener
public category mylistener {
@cachestarted
@cachestopped
open vacant cachestartstopevent(event e) {
switch (e.gettype()) {
box event.type.cache_started:
system.out.println("cache started");
break;
box event.type.cache_stopped:
system.out.println("cache stopped");
break;
}
}
@nodecreated
@noderemoved
@nodevisited
@nodemodified
@nodemoved
open vacant lognodeevent(nodeevent ne) {
log("an eventuality node " + ne.getfqn() + " occured");
}
}
the problem this, it's unequivocally many some-more an concerned slight minute horizon support arrange thing, due annotation-reflection inlet it.
so, before i assign off down highway minute general framework, i anticipating someone finished already. anyone opposing such thing?
Comments
Post a Comment