Skip to content

Commit

Permalink
stubs for disposal method propagation
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@2156 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Mar 23, 2009
1 parent 757e4e8 commit 983ed1e
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 2 deletions.
Expand Up @@ -128,7 +128,7 @@ else if (getAnnotatedItem().getAnnotatedParameters(Disposes.class).size() > 0)
/**
* Initializes the remove method
*/
protected void initDisposalMethod()
protected void initDisposalMethod(BeanDeployerEnvironment environment)
{
Set<AnnotatedMethod<?>> disposalMethods = manager.resolveDisposalMethods(getType(), getBindings().toArray(new Annotation[0]));
if (disposalMethods.size() == 1)
Expand Down
Expand Up @@ -135,6 +135,7 @@ protected <T> void createBean(AbstractClassBean<T> bean, final AnnotatedClass<T>
createProducerMethods(bean, annotatedClass);
createProducerFields(bean, annotatedClass);
createObserverMethods(bean, annotatedClass);
createDisposalMethods(bean, annotatedClass);

if (annotatedClass.isAnnotationPresent(Realizes.class))
{
Expand All @@ -153,6 +154,11 @@ private void createProducerMethods(AbstractClassBean<?> declaringBean, Annotated
}
}

private void createDisposalMethods(AbstractClassBean<?> declaringBean, AnnotatedClass<?> annotatedClass)
{

}

private <T> void createProducerMethod(AbstractClassBean<?> declaringBean, AnnotatedMethod<T> annotatedMethod)
{
ProducerMethodBean<T> bean = ProducerMethodBean.of(annotatedMethod, declaringBean, manager);
Expand Down
Expand Up @@ -26,11 +26,13 @@ public class BeanDeployerEnvironment
private final Map<AnnotatedMethod<?>, ProducerMethodBean<?>> methodBeanMap;
private final Set<RIBean<?>> beans;
private final Set<ObserverImpl<?>> observers;

private final Set<AnnotatedMethod<?>> disposalMethods;

public BeanDeployerEnvironment()
{
this.classBeanMap = new HashMap<AnnotatedClass<?>, AbstractClassBean<?>>();
this.methodBeanMap = new HashMap<AnnotatedMethod<?>, ProducerMethodBean<?>>();
this.disposalMethods = new HashSet<AnnotatedMethod<?>>();
this.beans = new HashSet<RIBean<?>>();
this.observers = new HashSet<ObserverImpl<?>>();
}
Expand Down Expand Up @@ -70,4 +72,9 @@ public Set<ObserverImpl<?>> getObservers()
return observers;
}

public Set<AnnotatedMethod<?>> getDisposalMethods()
{
return disposalMethods;
}

}

0 comments on commit 983ed1e

Please sign in to comment.