[webbeans-dev] Web Bean discovery
Ales Justin
ales.justin at gmail.com
Wed Nov 26 08:09:11 EST 2008
> Any idea how portable such an approach will be to other app servers?
No idea, never looked into details of anything else than ours truly. ;-)
So, you're thinking of something like this:
WebBeansDiscovery wbd = ...;
ClassFilter cf = new ModifierClassFilter(ABSTRACT);
Set<Class<?>> abstractClasses = wbd.search(cf)
In the worst case this would be implemented on top of all classes:
WBD impl detail:
public Set<Class<?>> search(ClassFilter cf)
{
Set<Class<?>> result = new HashSet<Class<?>>();
for (Class<?> clazz : allClasses)
{
if (cf.accepts(clazz))
result.add(clazz);
}
// TODO - some cache here
return result;
}
Where we could already easily prepare this info when we do visitor
pattern - performance optimization.
Or what exactly are you trying to do?
More information about the weld-dev
mailing list