[webbeans-commits] Webbeans SVN: r902 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection.
by webbeans-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-01-12 12:01:25 -0500 (Mon, 12 Jan 2009)
New Revision: 902
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointImpl.java
Log:
getBindingTypes() -> getBindings()
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointImpl.java 2009-01-12 17:01:16 UTC (rev 901)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointImpl.java 2009-01-12 17:01:25 UTC (rev 902)
@@ -98,7 +98,7 @@
return this.bean;
}
- public Set<Annotation> getBindingTypes()
+ public Set<Annotation> getBindings()
{
return this.memberInjectionPoint.getBindingTypes();
}
16 years
[webbeans-commits] Webbeans SVN: r901 - ri/trunk/webbeans-api/src/main/java/javax/webbeans.
by webbeans-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-01-12 12:01:16 -0500 (Mon, 12 Jan 2009)
New Revision: 901
Modified:
ri/trunk/webbeans-api/src/main/java/javax/webbeans/InjectionPoint.java
Log:
getBindingTypes() -> getBindings()
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/InjectionPoint.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/InjectionPoint.java 2009-01-12 16:55:17 UTC (rev 900)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/InjectionPoint.java 2009-01-12 17:01:16 UTC (rev 901)
@@ -55,7 +55,7 @@
*
* @return the declared binding types of the injection point
*/
- public Set<Annotation> getBindingTypes();
+ public Set<Annotation> getBindings();
/**
* Get the Bean object representing the Web Bean that defines the injection
16 years
[webbeans-commits] Webbeans SVN: r900 - in ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test: ejb and 1 other directories.
by webbeans-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-01-12 11:55:17 -0500 (Mon, 12 Jan 2009)
New Revision: 900
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerFieldBeanModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodBeanModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypesTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanSpecializationTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/newbean/NewEnterpriseBeanTest.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/newbean/NewSimpleBeanTest.java
Log:
getBindingTypes() -> getBindings()
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerFieldBeanModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerFieldBeanModelTest.java 2009-01-12 16:47:16 UTC (rev 899)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerFieldBeanModelTest.java 2009-01-12 16:55:17 UTC (rev 900)
@@ -83,8 +83,8 @@
manager.addBean(bean);
Field field = OtherSpiderProducer.class.getField("produceTarantula");
ProducerFieldBean<Tarantula> tarantulaModel = ProducerFieldBean.of(field, bean, manager);
- assert tarantulaModel.getBindingTypes().size() == 1;
- assert tarantulaModel.getBindingTypes().iterator().next().annotationType().equals(Current.class);
+ assert tarantulaModel.getBindings().size() == 1;
+ assert tarantulaModel.getBindings().iterator().next().annotationType().equals(Current.class);
}
@Test(groups="producerField") @SpecAssertion(section="3.5.1")
@@ -146,8 +146,8 @@
manager.addBean(bean);
Field field = OtherSpiderProducer.class.getField("produceTameTarantula");
ProducerFieldBean<Tarantula> tarantulaModel = ProducerFieldBean.of(field, bean, manager);
- assert tarantulaModel.getBindingTypes().size() == 1;
- assert tarantulaModel.getBindingTypes().iterator().next().annotationType().equals(Tame.class);
+ assert tarantulaModel.getBindings().size() == 1;
+ assert tarantulaModel.getBindings().iterator().next().annotationType().equals(Tame.class);
}
@Test(groups="producerField") @SpecAssertion(section="3.5.2")
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodBeanModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodBeanModelTest.java 2009-01-12 16:47:16 UTC (rev 899)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ProducerMethodBeanModelTest.java 2009-01-12 16:55:17 UTC (rev 900)
@@ -88,8 +88,8 @@
manager.addBean(bean);
Method method = SpiderProducer.class.getMethod("produceTarantula");
ProducerMethodBean<Tarantula> tarantulaModel = ProducerMethodBean.of(method, bean, manager);
- assert tarantulaModel.getBindingTypes().size() == 1;
- assert tarantulaModel.getBindingTypes().iterator().next().annotationType().equals(Current.class);
+ assert tarantulaModel.getBindings().size() == 1;
+ assert tarantulaModel.getBindings().iterator().next().annotationType().equals(Current.class);
}
@Test(groups="producerMethod") @SpecAssertion(section="3.4.1")
@@ -151,8 +151,8 @@
manager.addBean(bean);
Method method = SpiderProducer.class.getMethod("produceTameTarantula");
ProducerMethodBean<Tarantula> tarantulaModel = ProducerMethodBean.of(method, bean, manager);
- assert tarantulaModel.getBindingTypes().size() == 1;
- assert tarantulaModel.getBindingTypes().iterator().next().annotationType().equals(Tame.class);
+ assert tarantulaModel.getBindings().size() == 1;
+ assert tarantulaModel.getBindings().iterator().next().annotationType().equals(Tame.class);
}
@Test(groups="producerMethod") @SpecAssertion(section="3.4.2")
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java 2009-01-12 16:47:16 UTC (rev 899)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/SimpleBeanModelTest.java 2009-01-12 16:55:17 UTC (rev 900)
@@ -283,9 +283,9 @@
public void testSpecializedClassInheritsBindingTypes()
{
SimpleBean<Tractor> bean = SimpleBean.of(Tractor.class, manager);
- assert bean.getBindingTypes().size()==2;
- assert bean.getBindingTypes().contains( new AnnotationLiteral<Motorized>() {} );
- assert bean.getBindingTypes().contains( new AnnotationLiteral<HeavyDuty>() {} );
+ assert bean.getBindings().size()==2;
+ assert bean.getBindings().contains( new AnnotationLiteral<Motorized>() {} );
+ assert bean.getBindings().contains( new AnnotationLiteral<HeavyDuty>() {} );
}
@Test(groups="specializationInherit") @SpecAssertion(section="3.2.6")
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypesTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypesTest.java 2009-01-12 16:47:16 UTC (rev 899)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/StereotypesTest.java 2009-01-12 16:55:17 UTC (rev 900)
@@ -144,7 +144,7 @@
{
SimpleBean<HighlandCow> highlandCow = SimpleBean.of(HighlandCow.class, manager);
assert highlandCow.getName() == null;
- assert highlandCow.getBindingTypes().iterator().next().annotationType().equals(Tame.class);
+ assert highlandCow.getBindings().iterator().next().annotationType().equals(Tame.class);
assert highlandCow.getScopeType().equals(RequestScoped.class);
assert highlandCow.getMergedStereotypes().getRequiredTypes().size() == 1;
assert highlandCow.getMergedStereotypes().getRequiredTypes().contains(Animal.class);
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanSpecializationTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanSpecializationTest.java 2009-01-12 16:47:16 UTC (rev 899)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ejb/EnterpriseBeanSpecializationTest.java 2009-01-12 16:55:17 UTC (rev 900)
@@ -62,15 +62,15 @@
private boolean compareBindingTypesOK(EnterpriseBean<Hound> hound, EnterpriseBean<HoundOfBaskerville> houndOfBaskerville)
{
- if (hound.getBindingTypes().size() != houndOfBaskerville.getBindingTypes().size())
+ if (hound.getBindings().size() != houndOfBaskerville.getBindings().size())
{
return false;
}
- if (!hound.getBindingTypes().containsAll(houndOfBaskerville.getBindingTypes()))
+ if (!hound.getBindings().containsAll(houndOfBaskerville.getBindings()))
{
return false;
}
- if (!houndOfBaskerville.getBindingTypes().containsAll(hound.getBindingTypes()))
+ if (!houndOfBaskerville.getBindings().containsAll(hound.getBindings()))
{
return false;
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/newbean/NewEnterpriseBeanTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/newbean/NewEnterpriseBeanTest.java 2009-01-12 16:47:16 UTC (rev 899)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/newbean/NewEnterpriseBeanTest.java 2009-01-12 16:55:17 UTC (rev 900)
@@ -83,8 +83,8 @@
@SpecAssertion(section = "3.9")
public void testNewBeanIsHasOnlyNewBinding()
{
- assert newEnterpriseBean.getBindingTypes().size() == 1;
- assert newEnterpriseBean.getBindingTypes().iterator().next().annotationType().equals(new NewBinding().annotationType());
+ assert newEnterpriseBean.getBindings().size() == 1;
+ assert newEnterpriseBean.getBindings().iterator().next().annotationType().equals(new NewBinding().annotationType());
}
/**
@@ -276,7 +276,7 @@
public void testNewBeanHasNoDisposalMethods()
{
Class<?> type = TypeInfo.ofTypes(newEnterpriseBean.getTypes()).getSuperClass();
- assert manager.resolveDisposalMethods(type, newEnterpriseBean.getBindingTypes().toArray(new Annotation[0])).isEmpty();
+ assert manager.resolveDisposalMethods(type, newEnterpriseBean.getBindings().toArray(new Annotation[0])).isEmpty();
}
/**
@@ -312,7 +312,7 @@
@SpecAssertion(section = "3.9")
public void testNewBeanHasNoDecorators()
{
- Annotation[] bindingTypes = newEnterpriseBean.getBindingTypes().toArray(new Annotation[0]);
+ Annotation[] bindingTypes = newEnterpriseBean.getBindings().toArray(new Annotation[0]);
assert manager.resolveDecorators(newEnterpriseBean.getTypes(), bindingTypes).isEmpty();
}
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/newbean/NewSimpleBeanTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/newbean/NewSimpleBeanTest.java 2009-01-12 16:47:16 UTC (rev 899)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/newbean/NewSimpleBeanTest.java 2009-01-12 16:55:17 UTC (rev 900)
@@ -81,8 +81,8 @@
@SpecAssertion(section = "3.9")
public void testNewBeanIsHasOnlyNewBinding()
{
- assert newSimpleBean.getBindingTypes().size() == 1;
- assert newSimpleBean.getBindingTypes().iterator().next().annotationType().equals(new NewBinding().annotationType());
+ assert newSimpleBean.getBindings().size() == 1;
+ assert newSimpleBean.getBindings().iterator().next().annotationType().equals(new NewBinding().annotationType());
}
/**
@@ -271,7 +271,7 @@
public void testNewBeanHasNoDisposalMethods()
{
Class<?> type = TypeInfo.ofTypes(newSimpleBean.getTypes()).getSuperClass();
- assert manager.resolveDisposalMethods(type, newSimpleBean.getBindingTypes().toArray(new Annotation[0])).isEmpty();
+ assert manager.resolveDisposalMethods(type, newSimpleBean.getBindings().toArray(new Annotation[0])).isEmpty();
}
/**
@@ -307,7 +307,7 @@
@SpecAssertion(section = "3.9")
public void testNewBeanHasNoDecorators()
{
- Annotation[] bindingTypes = newSimpleBean.getBindingTypes().toArray(new Annotation[0]);
+ Annotation[] bindingTypes = newSimpleBean.getBindings().toArray(new Annotation[0]);
assert manager.resolveDecorators(newSimpleBean.getTypes(), bindingTypes).isEmpty();
}
16 years
[webbeans-commits] Webbeans SVN: r899 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean.
by webbeans-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-01-12 11:47:16 -0500 (Mon, 12 Jan 2009)
New Revision: 899
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EventBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
Log:
getBindingTypes() -> getBindings()
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-01-12 16:43:36 UTC (rev 898)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-01-12 16:47:16 UTC (rev 899)
@@ -159,7 +159,7 @@
this.bindingTypes.addAll(getAnnotatedItem().getMetaAnnotations(BindingType.class));
if (specialization)
{
- this.bindingTypes.addAll(getSpecializedType().getBindingTypes());
+ this.bindingTypes.addAll(getSpecializedType().getBindings());
log.trace("Using binding types " + bindingTypes + " specified by annotations and specialized supertype");
}
else if (bindingTypes.size() == 0)
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java 2009-01-12 16:43:36 UTC (rev 898)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractProducerBean.java 2009-01-12 16:47:16 UTC (rev 899)
@@ -279,7 +279,7 @@
buffer.append("simple producer bean '" + getName() + "'");
}
buffer.append(" [" + getType().getName() + "]\n");
- buffer.append(" API types " + getTypes() + ", binding types " + getBindingTypes() + "\n");
+ buffer.append(" API types " + getTypes() + ", binding types " + getBindings() + "\n");
return buffer.toString();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-01-12 16:43:36 UTC (rev 898)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-01-12 16:47:16 UTC (rev 899)
@@ -413,7 +413,7 @@
buffer.append(" enterprise bean '" + getName() + "'");
}
buffer.append(" [" + getType().getName() + "]\n");
- buffer.append(" API types " + getTypes() + ", binding types " + getBindingTypes() + "\n");
+ buffer.append(" API types " + getTypes() + ", binding types " + getBindings() + "\n");
return buffer.toString();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EventBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EventBean.java 2009-01-12 16:43:36 UTC (rev 898)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EventBean.java 2009-01-12 16:47:16 UTC (rev 899)
@@ -172,7 +172,7 @@
buffer.append(" enterprise bean '" + getName() + "'");
}
buffer.append(" [" + getType().getName() + "]\n");
- buffer.append(" API types " + getTypes() + ", binding types " + getBindingTypes() + "\n");
+ buffer.append(" API types " + getTypes() + ", binding types " + getBindings() + "\n");
return buffer.toString();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java 2009-01-12 16:43:36 UTC (rev 898)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerFieldBean.java 2009-01-12 16:47:16 UTC (rev 899)
@@ -125,7 +125,7 @@
buffer.append("simple producer field bean '" + getName() + "'");
}
buffer.append(" [" + getType().getName() + "]\n");
- buffer.append(" API types " + getTypes() + ", binding types " + getBindingTypes() + "\n");
+ buffer.append(" API types " + getTypes() + ", binding types " + getBindings() + "\n");
return buffer.toString();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-01-12 16:43:36 UTC (rev 898)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ProducerMethodBean.java 2009-01-12 16:47:16 UTC (rev 899)
@@ -138,7 +138,7 @@
*/
protected void initDisposalMethod()
{
- Set<AnnotatedMethod<Object>> disposalMethods = manager.resolveDisposalMethods(getType(), getBindingTypes().toArray(new Annotation[0]));
+ Set<AnnotatedMethod<Object>> disposalMethods = manager.resolveDisposalMethods(getType(), getBindings().toArray(new Annotation[0]));
if (disposalMethods.size() == 1)
{
this.disposalMethod = disposalMethods.iterator().next();
@@ -201,7 +201,7 @@
buffer.append("simple producer method bean '" + getName() + "'");
}
buffer.append(" [" + getType().getName() + "]\n");
- buffer.append(" API types " + getTypes() + ", binding types " + getBindingTypes() + "\n");
+ buffer.append(" API types " + getTypes() + ", binding types " + getBindings() + "\n");
return buffer.toString();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-01-12 16:43:36 UTC (rev 898)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-01-12 16:47:16 UTC (rev 899)
@@ -489,7 +489,7 @@
buffer.append("simple bean '" + getName() + "'");
}
buffer.append(" [" + getType().getName() + "]\n");
- buffer.append(" API types " + getTypes() + ", binding types " + getBindingTypes() + "\n");
+ buffer.append(" API types " + getTypes() + ", binding types " + getBindings() + "\n");
return buffer.toString();
}
16 years
[webbeans-commits] Webbeans SVN: r898 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans.
by webbeans-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-01-12 11:43:36 -0500 (Mon, 12 Jan 2009)
New Revision: 898
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java
Log:
getBindingTypes() -> getBindings()
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java 2009-01-12 16:43:03 UTC (rev 897)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/Resolver.java 2009-01-12 16:43:36 UTC (rev 898)
@@ -317,7 +317,7 @@
Set<Bean<T>> resolvedBeans = new HashSet<Bean<T>>();
for (Bean<?> bean : beans)
{
- if (element.isAssignableFrom(bean.getTypes()) && containsAllBindingBindingTypes(element, bean.getBindingTypes()))
+ if (element.isAssignableFrom(bean.getTypes()) && containsAllBindingBindingTypes(element, bean.getBindings()))
{
resolvedBeans.add((Bean<T>) bean);
}
16 years
[webbeans-commits] Webbeans SVN: r897 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test.
by webbeans-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-01-12 11:43:03 -0500 (Mon, 12 Jan 2009)
New Revision: 897
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/CommonWebBeanTest.java
Log:
getBindingTypes() -> getBindings()
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/CommonWebBeanTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/CommonWebBeanTest.java 2009-01-12 16:42:36 UTC (rev 896)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/CommonWebBeanTest.java 2009-01-12 16:43:03 UTC (rev 897)
@@ -41,7 +41,7 @@
public void testBindingTypesNonEmpty()
{
Bean<?> model = SimpleBean.of(RedSnapper.class, manager);
- assert model.getBindingTypes().size() > 0;
+ assert model.getBindings().size() > 0;
}
@Test @SpecAssertion(section="2")
16 years
[webbeans-commits] Webbeans SVN: r896 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean.
by webbeans-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-01-12 11:42:36 -0500 (Mon, 12 Jan 2009)
New Revision: 896
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewEnterpriseBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewSimpleBean.java
Log:
getBindingTypes() -> getBindings()
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-01-12 16:42:15 UTC (rev 895)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-01-12 16:42:36 UTC (rev 896)
@@ -355,9 +355,9 @@
*
* @return The set of binding types
*
- * @see javax.webbeans.manager.Bean#getBindingTypes()
+ * @see javax.webbeans.manager.Bean#getBindings()
*/
- public Set<Annotation> getBindingTypes()
+ public Set<Annotation> getBindings()
{
return bindingTypes;
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java 2009-01-12 16:42:15 UTC (rev 895)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java 2009-01-12 16:42:36 UTC (rev 896)
@@ -72,9 +72,9 @@
* @return The binding types
*/
@Override
- public Set<Annotation> getBindingTypes()
+ public Set<Annotation> getBindings()
{
- return delegate().getBindingTypes();
+ return delegate().getBindings();
}
/**
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewEnterpriseBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewEnterpriseBean.java 2009-01-12 16:42:15 UTC (rev 895)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewEnterpriseBean.java 2009-01-12 16:42:36 UTC (rev 896)
@@ -72,7 +72,7 @@
}
@Override
- public Set<Annotation> getBindingTypes()
+ public Set<Annotation> getBindings()
{
return NEW_BINDING_SET;
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewSimpleBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewSimpleBean.java 2009-01-12 16:42:15 UTC (rev 895)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/NewSimpleBean.java 2009-01-12 16:42:36 UTC (rev 896)
@@ -94,7 +94,7 @@
}
@Override
- public Set<Annotation> getBindingTypes()
+ public Set<Annotation> getBindings()
{
return NEW_BINDING_SET;
}
16 years
[webbeans-commits] Webbeans SVN: r895 - ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager.
by webbeans-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-01-12 11:42:15 -0500 (Mon, 12 Jan 2009)
New Revision: 895
Modified:
ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java
ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java
Log:
getBindingTypes() -> getBindings()
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java 2009-01-12 16:34:17 UTC (rev 894)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java 2009-01-12 16:42:15 UTC (rev 895)
@@ -51,7 +51,7 @@
public abstract Set<Type> getTypes();
- public abstract Set<Annotation> getBindingTypes();
+ public abstract Set<Annotation> getBindings();
public abstract Class<? extends Annotation> getScopeType();
Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java 2009-01-12 16:34:17 UTC (rev 894)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java 2009-01-12 16:42:15 UTC (rev 895)
@@ -30,7 +30,7 @@
public abstract Class<?> getDelegateType();
- public abstract Set<Annotation> getDelegateBindingTypes();
+ public abstract Set<Annotation> getDelegateBindings();
public abstract void setDelegate(Object instance, Object delegate);
16 years
[webbeans-commits] Webbeans SVN: r894 - in ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans: injection and 1 other directory.
by webbeans-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-01-12 11:34:17 -0500 (Mon, 12 Jan 2009)
New Revision: 894
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointProvider.java
Log:
ditch getInstance()
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-01-12 16:32:43 UTC (rev 893)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/EnterpriseBean.java 2009-01-12 16:34:17 UTC (rev 894)
@@ -422,7 +422,6 @@
try
{
manager.getInjectionPointFactory().pushBean(this);
- manager.getInjectionPointFactory().pushInstance(this);
DependentContext.INSTANCE.setActive(true);
bindDecorators();
bindInterceptors();
@@ -432,7 +431,6 @@
}
finally
{
- manager.getInjectionPointFactory().popInstance();
manager.getInjectionPointFactory().popBean();
DependentContext.INSTANCE.setActive(false);
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-01-12 16:32:43 UTC (rev 893)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-01-12 16:34:17 UTC (rev 894)
@@ -122,20 +122,12 @@
try
{
instance = constructor.newInstance(manager);
- try
- {
- injectionPointProvider.pushInstance(instance);
- bindDecorators();
- bindInterceptors();
- injectEjbAndCommonFields(instance);
- injectBoundFields(instance);
- callInitializers(instance);
- callPostConstruct(instance);
- }
- finally
- {
- injectionPointProvider.popInstance();
- }
+ bindDecorators();
+ bindInterceptors();
+ injectEjbAndCommonFields(instance);
+ injectBoundFields(instance);
+ callInitializers(instance);
+ callPostConstruct(instance);
}
finally
{
@@ -236,14 +228,14 @@
{
for (AnnotatedField<?> field : annotatedItem.getAnnotatedFields(manager.getEjbResolver().getEJBAnnotation()))
{
- InjectionPoint injectionPoint = new InjectionPointImpl(field, this, beanInstance);
+ InjectionPoint injectionPoint = new InjectionPointImpl(field, this);
Object ejbInstance = manager.getEjbResolver().resolveEjb(injectionPoint, manager.getNaming());
field.inject(beanInstance, ejbInstance);
}
for (AnnotatedMethod<?> method : annotatedItem.getAnnotatedMethods(manager.getEjbResolver().getEJBAnnotation()))
{
- InjectionPoint injectionPoint = new InjectionPointImpl(method, this, beanInstance);
+ InjectionPoint injectionPoint = new InjectionPointImpl(method, this);
Object ejbInstance = manager.getEjbResolver().resolveEjb(injectionPoint, manager.getNaming());
method.invoke(beanInstance, ejbInstance);
}
@@ -254,21 +246,21 @@
{
throw new ExecutionException("Cannot inject an extended persistence context into " + field);
}
- InjectionPoint injectionPoint = new InjectionPointImpl(field, this, beanInstance);
+ InjectionPoint injectionPoint = new InjectionPointImpl(field, this);
Object puInstance = manager.getEjbResolver().resolvePersistenceContext(injectionPoint, manager.getNaming());
field.inject(beanInstance, puInstance);
}
for (AnnotatedMethod<?> method : annotatedItem.getAnnotatedMethods(manager.getEjbResolver().getPersistenceContextAnnotation()))
{
- InjectionPoint injectionPoint = new InjectionPointImpl(method, this, beanInstance);
+ InjectionPoint injectionPoint = new InjectionPointImpl(method, this);
Object puInstance = manager.getEjbResolver().resolvePersistenceContext(injectionPoint, manager.getNaming());
method.invoke(beanInstance, puInstance);
}
for (AnnotatedField<?> field : annotatedItem.getAnnotatedFields(manager.getEjbResolver().getResourceAnnotation()))
{
- InjectionPoint injectionPoint = new InjectionPointImpl(field, this, beanInstance);
+ InjectionPoint injectionPoint = new InjectionPointImpl(field, this);
Object resourceInstance = manager.getEjbResolver().resolveResource(injectionPoint, manager.getNaming());
field.inject(beanInstance, resourceInstance);
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointProvider.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointProvider.java 2009-01-12 16:32:43 UTC (rev 893)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/injection/InjectionPointProvider.java 2009-01-12 16:34:17 UTC (rev 894)
@@ -37,7 +37,6 @@
public class InjectionPointProvider
{
private final Stack<Bean<?>> beans = new Stack<Bean<?>>();
- private final Stack<Object> beanInstances = new Stack<Object>();
private final Stack<AnnotatedMember<?, ? extends Member>> injectionPoints = new Stack<AnnotatedMember<?, ? extends Member>>();
/**
@@ -50,31 +49,9 @@
public void pushBean(Bean<?> currentBean)
{
beans.push(currentBean);
- beanInstances.push(null);
}
/**
- * Pushes the current bean instance that has been instantiated, but has not
- * yet had any injection points initialized.
- *
- * @param currentInstance The bean instance last instantiated
- */
- public void pushInstance(Object currentInstance)
- {
- // Replace the null instance (from pushing the bean) with this one
- // on the top of the stack.
- if (beanInstances.peek() == null)
- {
- popInstance();
- beanInstances.push(currentInstance);
- }
- else
- {
- throw new java.lang.IllegalStateException("More bean instances pushed than there are beans");
- }
- }
-
- /**
* Pushes the current injection point member being processed.
*
* @param injectedMember The metadata for the injection point member
@@ -90,24 +67,10 @@
*/
public void popBean()
{
- if (!beanInstances.isEmpty() && beanInstances.size() == beans.size() && beanInstances.peek() == null)
- {
- // Pop the null instance since a real one was never pushed.
- popInstance();
- }
beans.pop();
}
/**
- * Pops the current instance from the stack. This should be called whenever
- * all processing is complete for instantiating a bean.
- */
- public void popInstance()
- {
- beanInstances.pop();
- }
-
- /**
* Pops the current injection point being processed. This should be called
* once the injection point is bound.
*/
@@ -124,7 +87,7 @@
*/
public InjectionPoint getPreviousInjectionPoint()
{
- return new InjectionPointImpl(getPreviousInjectionMember(), getPreviousBean(), getPreviousInstance());
+ return new InjectionPointImpl(getPreviousInjectionMember(), getPreviousBean());
}
/**
@@ -135,19 +98,13 @@
*/
public InjectionPoint getCurrentInjectionPoint()
{
- return new InjectionPointImpl(getCurrentInjectionMember(), getCurrentBean(), getCurrentInstance());
+ return new InjectionPointImpl(getCurrentInjectionMember(), getCurrentBean());
}
protected Bean<?> getCurrentBean()
{
return beans.peek();
}
-
- protected Object getCurrentInstance()
- {
- return beanInstances.peek();
- }
-
protected AnnotatedMember<?, ? extends Member> getCurrentInjectionMember()
{
if (injectionPoints.size() > 0)
@@ -164,24 +121,6 @@
return result;
}
- protected Object getPreviousInstance()
- {
- Object result = null;
- if (beanInstances.size() < beans.size())
- {
- // Return top of stack since this is the previous instance when a
- // constructor is being invoked with injection points
- result = beanInstances.peek();
- }
- else
- {
- Object currentInstance = beanInstances.pop();
- result = beanInstances.peek();
- beanInstances.push(currentInstance);
- }
- return result;
- }
-
protected AnnotatedMember<?, ? extends Member> getPreviousInjectionMember()
{
AnnotatedMember<?, ? extends Member> result = null;
16 years
[webbeans-commits] Webbeans SVN: r893 - ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test.
by webbeans-commits@lists.jboss.org
Author: gavin.king(a)jboss.com
Date: 2009-01-12 11:32:43 -0500 (Mon, 12 Jan 2009)
New Revision: 893
Modified:
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java
Log:
ditch getInstance()
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java 2009-01-12 16:17:02 UTC (rev 892)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/InjectionPointTest.java 2009-01-12 16:32:43 UTC (rev 893)
@@ -47,29 +47,7 @@
@SpecVersion("20081222")
public class InjectionPointTest extends AbstractTest
{
- @Test(groups = { "broken", "injectionPoint" })
- @SpecAssertion(section = "5.11")
- public void testGetInstance()
- {
- webBeansBootstrap.setWebBeanDiscovery(new MockWebBeanDiscovery(FieldInjectionPointBean.class, BeanWithInjectionPointMetadata.class));
- webBeansBootstrap.boot();
- // Get an instance of the bean which has another bean injected into it
- try
- {
- activateDependentContext();
- FieldInjectionPointBean beanWithInjectedBean = manager.getInstanceByType(FieldInjectionPointBean.class, new CurrentBinding());
- BeanWithInjectionPointMetadata beanWithInjectionPoint = beanWithInjectedBean.getInjectedBean();
- assert beanWithInjectionPoint.getInjectedMetadata() != null;
- //TODO Fix injection issue where raw bean is used instead of proxied bean
- assert beanWithInjectionPoint.getInjectedMetadata().getInstance().equals(beanWithInjectedBean);
- }
- finally
- {
- deactivateDependentContext();
- }
- }
-
@Test(groups = { "injectionPoint" })
@SpecAssertion(section = "5.11")
public void testGetBean()
16 years