"jaikiran" wrote :
| I guess, instead of checking two things in the metadata (a DependencyBuilder and a
IgnoreAOP annotation), its better to just look for a single annotation
|
Yes, I was just thinking about this duplicate lookup.
This is what we have now:
| protected DependencyBuilder getDependencyBuilder(MetaData md, Kernel kernel) throws
Throwable
| {
| DependencyBuilder dependencyBuilder = null;
| DependencyBuilderFactory factory =
md.getAnnotation(DependencyBuilderFactory.class);
| if (factory != null)
| {
| if (factory.checkMetaDataForBuilderInstance())
| {
| // still allow for more configurable DependencyBuilder
| dependencyBuilder = md.getMetaData(DependencyBuilder.class);
| }
| else
| {
| Class<? extends DependencyBuilder> value = factory.value();
| if (basicDependencyBuilder.getClass().equals(value))
| {
| dependencyBuilder = basicDependencyBuilder;
| }
| else
| {
| dependencyBuilder = value.newInstance();
| }
| }
| }
|
| if (dependencyBuilder == null)
| {
| KernelConfig config = kernel.getConfig();
| dependencyBuilder = config.getDependencyBuilder();
| }
|
| return dependencyBuilder;
| }
|
View the original post :
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4230393#...
Reply to the post :
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&a...