Skip to content

Commit

Permalink
Refactor to remove *Model and *Constructor and xmlAnnotatedItem, part 1
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@284 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Nov 9, 2008
1 parent 5cef577 commit ea93232
Show file tree
Hide file tree
Showing 49 changed files with 1,454 additions and 1,758 deletions.
10 changes: 3 additions & 7 deletions webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
Expand Up @@ -37,11 +37,8 @@
import org.jboss.webbeans.event.EventBus;
import org.jboss.webbeans.exceptions.NameResolutionLocation;
import org.jboss.webbeans.exceptions.TypesafeResolutionLocation;
import org.jboss.webbeans.injectable.Injectable;
import org.jboss.webbeans.injectable.ResolverInjectable;
import org.jboss.webbeans.introspector.AnnotatedClass;
import org.jboss.webbeans.introspector.impl.SimpleAnnotatedClass;
import org.jboss.webbeans.model.bean.SimpleBeanModel;
import org.jboss.webbeans.introspector.impl.Injectable;
import org.jboss.webbeans.introspector.impl.ResolverInjectable;
import org.jboss.webbeans.util.ClientProxy;
import org.jboss.webbeans.util.ProxyPool;
import org.jboss.webbeans.util.Reflections;
Expand Down Expand Up @@ -99,8 +96,7 @@ public ManagerImpl()
this.proxyPool = new ProxyPool(this);
this.decorators = new HashSet<Decorator>();
this.interceptors = new HashSet<Interceptor>();
SimpleAnnotatedClass<DefaultEnterpriseBeanLookup> sc = new SimpleAnnotatedClass<DefaultEnterpriseBeanLookup>(DefaultEnterpriseBeanLookup.class, new HashMap<Class<? extends Annotation>, Annotation>());
addBean( new SimpleBean<DefaultEnterpriseBeanLookup>( new SimpleBeanModel<DefaultEnterpriseBeanLookup>(sc, null, this), this ) );
addBean( new SimpleBean<DefaultEnterpriseBeanLookup>( DefaultEnterpriseBeanLookup.class, this ) );
}

protected void initEnabledDeploymentTypes(List<Class<? extends Annotation>> enabledDeploymentTypes)
Expand Down
13 changes: 0 additions & 13 deletions webbeans-ri/src/main/java/org/jboss/webbeans/ModelManager.java
Expand Up @@ -8,7 +8,6 @@
import org.jboss.webbeans.model.BindingTypeModel;
import org.jboss.webbeans.model.ScopeModel;
import org.jboss.webbeans.model.StereotypeModel;
import org.jboss.webbeans.model.bean.BeanModel;

import com.google.common.collect.ForwardingMap;

Expand Down Expand Up @@ -85,8 +84,6 @@ protected <S extends Annotation> BindingTypeModel<?> createAnnotationModel(Class

private Map<Class<? extends Annotation>, StereotypeModel<?>> stereotypes = new HashMap<Class<? extends Annotation>, StereotypeModel<?>>();

private Map<Class<?>, BeanModel<?, ?>> beanModels = new HashMap<Class<?>, BeanModel<?,?>>();

private ScopeModelMap scopes = new ScopeModelMap();

private BindingTypeModelMap bindingTypes = new BindingTypeModelMap();
Expand All @@ -102,16 +99,6 @@ public StereotypeModel<?> getStereotype(Class<? extends Annotation> annotationTy
return stereotypes.get(annotationType);
}

public void addBeanModel(BeanModel<?, ?> beanModel)
{
beanModels.put(beanModel.getType(), beanModel);
}

public BeanModel<?, ?> getBeanModel(Class<?> clazz)
{
return beanModels.get(clazz);
}

public <T extends Annotation> ScopeModel<T> getScopeModel(Class<T> scopeType)
{
return scopes.putIfAbsent(scopeType);
Expand Down
Expand Up @@ -13,7 +13,7 @@
import javax.webbeans.NullableDependencyException;
import javax.webbeans.manager.Bean;

import org.jboss.webbeans.injectable.Injectable;
import org.jboss.webbeans.introspector.impl.Injectable;
import org.jboss.webbeans.util.ListComparator;

import com.google.common.collect.ForwardingMap;
Expand Down

0 comments on commit ea93232

Please sign in to comment.