Weld SVN: r3899 - core/trunk.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-10-08 06:24:21 -0400 (Thu, 08 Oct 2009)
New Revision: 3899
Added:
core/trunk/cdi-api/
Removed:
core/trunk/api/
Log:
rename api dir to cdi-api
Copied: core/trunk/cdi-api (from rev 3898, core/trunk/api)
15 years, 1 month
Weld SVN: r3898 - /.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-10-08 06:11:48 -0400 (Thu, 08 Oct 2009)
New Revision: 3898
Added:
cdi-tck/
Removed:
tck/
Log:
rename tck to cdi-tck
Copied: cdi-tck (from rev 3897, tck)
15 years, 1 month
Weld SVN: r3897 - /.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-10-08 06:11:01 -0400 (Thu, 08 Oct 2009)
New Revision: 3897
Added:
core/
Removed:
ri/
Log:
rename ri to core
Copied: core (from rev 3896, ri)
15 years, 1 month
Weld SVN: r3896 - examples/trunk/jsf/translator/war/src/main/webapp/WEB-INF.
by weld-commits@lists.jboss.org
Author: pete.muir(a)jboss.org
Date: 2009-10-08 05:56:51 -0400 (Thu, 08 Oct 2009)
New Revision: 3896
Added:
examples/trunk/jsf/translator/war/src/main/webapp/WEB-INF/beans.xml
Log:
WELD-196
Added: examples/trunk/jsf/translator/war/src/main/webapp/WEB-INF/beans.xml
===================================================================
15 years, 1 month
Weld SVN: r3895 - in ri/trunk: impl/src/main/java/org/jboss/weld/bean and 22 other directories.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-10-08 02:32:51 -0400 (Thu, 08 Oct 2009)
New Revision: 3895
Added:
ri/trunk/impl/src/main/java/org/jboss/weld/context/ForwardingWeldCreationalContext.java
ri/trunk/impl/src/main/java/org/jboss/weld/context/WeldCreationalContext.java
ri/trunk/impl/src/main/java/org/jboss/weld/injection/WeldInjectionPoint.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldAnnotated.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldAnnotation.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldClass.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldConstructor.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldField.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldMember.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldMethod.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldParameter.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldAnnotated.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldAnnotation.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldCallable.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldClass.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldConstructor.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldField.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldMember.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldMethod.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldParameter.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldCallable.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldMember.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldAnnotationImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldClassImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldConstructorImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldFieldImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableWeldClass.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/WeldStartupTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/Weld256Test.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri279/Weld279Test.java
Removed:
ri/trunk/impl/src/main/java/org/jboss/weld/context/ForwardingWBCreationalContext.java
ri/trunk/impl/src/main/java/org/jboss/weld/context/WBCreationalContext.java
ri/trunk/impl/src/main/java/org/jboss/weld/injection/WBInjectionPoint.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBAnnotated.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBAnnotation.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBClass.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBConstructor.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBField.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBMember.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBMethod.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBParameter.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBAnnotated.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBAnnotation.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBCallable.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBClass.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBConstructor.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBField.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMember.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMethod.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBParameter.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBAnnotated.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBCallable.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBMember.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBAnnotationImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBClassImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBConstructorImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBFieldImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBMethodImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBParameterImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableWBClass.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/WBStartupTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/Wbri256Test.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri279/Wbri279Test.java
Modified:
ri/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/SimpleInjectionTarget.java
ri/trunk/impl/src/main/java/org/jboss/weld/Validator.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/DisposalMethod.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/InterceptorImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewManagedBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewSessionBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerField.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerMethod.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/RIBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractBuiltInBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ExtensionBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/facade/InstanceImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/ee/EEResourceProducerField.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/ee/PersistenceContextProducerField.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ClientProxyMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java
ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployerEnvironment.java
ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/ExtensionBeanDeployer.java
ri/trunk/impl/src/main/java/org/jboss/weld/context/CreationalContextImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/context/DependentContext.java
ri/trunk/impl/src/main/java/org/jboss/weld/el/ELCreationalContext.java
ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverFactory.java
ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/event/TransactionalObserverMethodImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java
ri/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java
ri/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java
ri/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/AnnotationStore.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/ConstructorSignatureImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/MethodSignatureImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/AnnotationModel.java
ri/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/BindingTypeModel.java
ri/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/InterceptorBindingModel.java
ri/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableFactory.java
ri/trunk/impl/src/main/java/org/jboss/weld/resources/ClassTransformer.java
ri/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/deployment/structure/AccessibleManagerResolutionTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/NewEnterpriseBeanTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/newsimple/NewSimpleBeanTest.java
Log:
rename WB* classes
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -63,13 +63,13 @@
import org.jboss.weld.bean.proxy.ClientProxyProvider;
import org.jboss.weld.bootstrap.api.ServiceRegistry;
import org.jboss.weld.context.CreationalContextImpl;
-import org.jboss.weld.context.WBCreationalContext;
+import org.jboss.weld.context.WeldCreationalContext;
import org.jboss.weld.ejb.EjbDescriptors;
import org.jboss.weld.ejb.spi.EjbDescriptor;
import org.jboss.weld.el.Namespace;
import org.jboss.weld.el.WeldELResolver;
import org.jboss.weld.el.WeldExpressionFactory;
-import org.jboss.weld.introspector.WBAnnotated;
+import org.jboss.weld.introspector.WeldAnnotated;
import org.jboss.weld.literal.AnyLiteral;
import org.jboss.weld.literal.DefaultLiteral;
import org.jboss.weld.log.Log;
@@ -80,7 +80,7 @@
import org.jboss.weld.resolution.NameBasedResolver;
import org.jboss.weld.resolution.Resolvable;
import org.jboss.weld.resolution.ResolvableFactory;
-import org.jboss.weld.resolution.ResolvableWBClass;
+import org.jboss.weld.resolution.ResolvableWeldClass;
import org.jboss.weld.resolution.TypeSafeBeanResolver;
import org.jboss.weld.resolution.TypeSafeDecoratorResolver;
import org.jboss.weld.resolution.TypeSafeInterceptorResolver;
@@ -699,10 +699,10 @@
public Set<Bean<?>> getBeans(Type beanType, Annotation... bindings)
{
- return getBeans(ResolvableWBClass.of(beanType, bindings, this), bindings);
+ return getBeans(ResolvableWeldClass.of(beanType, bindings, this), bindings);
}
- public Set<Bean<?>> getBeans(WBAnnotated<?, ?> element, Annotation... bindings)
+ public Set<Bean<?>> getBeans(WeldAnnotated<?, ?> element, Annotation... bindings)
{
for (Annotation annotation : element.getAnnotations())
{
@@ -739,7 +739,7 @@
currentInjectionPoint.get().push(injectionPoint);
}
// TODO Do this properly
- Set<Bean<?>> beans = getBeans(ResolvableWBClass.of(injectionPoint.getType(), injectionPoint.getQualifiers().toArray(new Annotation[0]), this));
+ Set<Bean<?>> beans = getBeans(ResolvableWeldClass.of(injectionPoint.getType(), injectionPoint.getQualifiers().toArray(new Annotation[0]), this));
Set<Bean<?>> injectableBeans = new HashSet<Bean<?>>();
for (Bean<?> bean : beans)
{
@@ -903,9 +903,9 @@
public Object getReference(Bean<?> bean, CreationalContext<?> creationalContext)
{
bean = getMostSpecializedBean(bean);
- if (creationalContext instanceof WBCreationalContext<?>)
+ if (creationalContext instanceof WeldCreationalContext<?>)
{
- creationalContext = ((WBCreationalContext<?>) creationalContext).getCreationalContext(bean);
+ creationalContext = ((WeldCreationalContext<?>) creationalContext).getCreationalContext(bean);
}
if (getServices().get(MetaAnnotationStore.class).getScopeModel(bean.getScope()).isNormal())
{
@@ -957,9 +957,9 @@
throw new UnproxyableResolutionException("Attempting to inject an unproxyable normal scoped bean " + resolvedBean + " into " + injectionPoint);
}
// TODO Can we move this logic to getReference?
- if (creationalContext instanceof WBCreationalContext<?>)
+ if (creationalContext instanceof WeldCreationalContext<?>)
{
- WBCreationalContext<?> wbCreationalContext = (WBCreationalContext<?>) creationalContext;
+ WeldCreationalContext<?> wbCreationalContext = (WeldCreationalContext<?>) creationalContext;
if (wbCreationalContext.containsIncompleteInstance(resolvedBean))
{
return wbCreationalContext.getIncompleteInstance(resolvedBean);
@@ -986,7 +986,7 @@
public Object getInjectableReference(InjectionPoint injectionPoint, CreationalContext<?> creationalContext)
{
- WBAnnotated<?, ?> element = ResolvableWBClass.of(injectionPoint.getType(), injectionPoint.getQualifiers().toArray(new Annotation[0]), this);
+ WeldAnnotated<?, ?> element = ResolvableWeldClass.of(injectionPoint.getType(), injectionPoint.getQualifiers().toArray(new Annotation[0]), this);
Bean<?> resolvedBean = getBean(element, element.getBindingsAsArray());
return getReference(injectionPoint, resolvedBean, creationalContext);
}
@@ -1012,7 +1012,7 @@
return instance;
}
- public <T> Bean<T> getBean(WBAnnotated<T, ?> element, Annotation... bindings)
+ public <T> Bean<T> getBean(WeldAnnotated<T, ?> element, Annotation... bindings)
{
Bean<T> bean = (Bean<T>) resolve(getBeans(element, bindings));
if (bean == null)
@@ -1371,7 +1371,7 @@
return new WeldExpressionFactory(expressionFactory);
}
- public <T> WBCreationalContext<T> createCreationalContext(Contextual<T> contextual)
+ public <T> WeldCreationalContext<T> createCreationalContext(Contextual<T> contextual)
{
return new CreationalContextImpl<T>(contextual);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/SimpleInjectionTarget.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/SimpleInjectionTarget.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/SimpleInjectionTarget.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -28,9 +28,9 @@
import org.jboss.weld.injection.FieldInjectionPoint;
import org.jboss.weld.injection.InjectionContextImpl;
import org.jboss.weld.injection.MethodInjectionPoint;
-import org.jboss.weld.injection.WBInjectionPoint;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.WBMethod;
+import org.jboss.weld.injection.WeldInjectionPoint;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.util.Beans;
/**
@@ -41,19 +41,19 @@
{
private final BeanManagerImpl beanManager;
- private final WBClass<T> type;
+ private final WeldClass<T> type;
private final ConstructorInjectionPoint<T> constructor;
private final List<Set<FieldInjectionPoint<?, ?>>> injectableFields;
private final List<Set<MethodInjectionPoint<?, ?>>> initializerMethods;
- private final WBMethod<?, ?> postConstruct;
- private final WBMethod<?, ?> preDestroy;
+ private final WeldMethod<?, ?> postConstruct;
+ private final WeldMethod<?, ?> preDestroy;
private final Set<InjectionPoint> injectionPoints;
- private final Set<WBInjectionPoint<?, ?>> ejbInjectionPoints;
- private final Set<WBInjectionPoint<?, ?>> persistenceContextInjectionPoints;
- private final Set<WBInjectionPoint<?, ?>> persistenceUnitInjectionPoints;
- private final Set<WBInjectionPoint<?, ?>> resourceInjectionPoints;
+ private final Set<WeldInjectionPoint<?, ?>> ejbInjectionPoints;
+ private final Set<WeldInjectionPoint<?, ?>> persistenceContextInjectionPoints;
+ private final Set<WeldInjectionPoint<?, ?>> persistenceUnitInjectionPoints;
+ private final Set<WeldInjectionPoint<?, ?>> resourceInjectionPoints;
- public SimpleInjectionTarget(WBClass<T> type, BeanManagerImpl beanManager)
+ public SimpleInjectionTarget(WeldClass<T> type, BeanManagerImpl beanManager)
{
this.beanManager = beanManager;
this.type = type;
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/Validator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/Validator.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/Validator.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -48,9 +48,9 @@
import org.jboss.weld.bean.RIBean;
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
import org.jboss.weld.bootstrap.api.Service;
-import org.jboss.weld.introspector.WBAnnotated;
+import org.jboss.weld.introspector.WeldAnnotated;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
-import org.jboss.weld.resolution.ResolvableWBClass;
+import org.jboss.weld.resolution.ResolvableWeldClass;
import org.jboss.weld.util.Beans;
import org.jboss.weld.util.Proxies;
import org.jboss.weld.util.Reflections;
@@ -155,7 +155,7 @@
checkFacadeInjectionPoint(ij, Instance.class);
checkFacadeInjectionPoint(ij, Event.class);
Annotation[] bindings = ij.getQualifiers().toArray(new Annotation[0]);
- WBAnnotated<?, ?> annotatedItem = ResolvableWBClass.of(ij.getType(), bindings, beanManager);
+ WeldAnnotated<?, ?> annotatedItem = ResolvableWeldClass.of(ij.getType(), bindings, beanManager);
Set<?> resolvedBeans = beanManager.getBeanResolver().resolve(beanManager.getInjectableBeans(ij));
if (resolvedBeans.isEmpty())
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -34,10 +34,10 @@
import org.jboss.weld.Container;
import org.jboss.weld.DefinitionException;
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
-import org.jboss.weld.injection.WBInjectionPoint;
-import org.jboss.weld.introspector.WBAnnotated;
-import org.jboss.weld.introspector.WBField;
-import org.jboss.weld.introspector.WBParameter;
+import org.jboss.weld.injection.WeldInjectionPoint;
+import org.jboss.weld.introspector.WeldAnnotated;
+import org.jboss.weld.introspector.WeldField;
+import org.jboss.weld.introspector.WeldParameter;
import org.jboss.weld.literal.AnyLiteral;
import org.jboss.weld.literal.DefaultLiteral;
import org.jboss.weld.log.Log;
@@ -79,8 +79,8 @@
// The API types
protected Set<Type> types;
// The injection points
- private Set<WBInjectionPoint<?, ?>> injectionPoints;
- private Set<WBInjectionPoint<?, ?>> delegateInjectionPoints;
+ private Set<WeldInjectionPoint<?, ?>> injectionPoints;
+ private Set<WeldInjectionPoint<?, ?>> delegateInjectionPoints;
// If the type a primitive?
private boolean primitive;
// The Bean manager
@@ -106,8 +106,8 @@
{
super(idSuffix, manager);
this.manager = manager;
- this.injectionPoints = new HashSet<WBInjectionPoint<?, ?>>();
- this.delegateInjectionPoints = new HashSet<WBInjectionPoint<?,?>>();
+ this.injectionPoints = new HashSet<WeldInjectionPoint<?, ?>>();
+ this.delegateInjectionPoints = new HashSet<WeldInjectionPoint<?,?>>();
}
/**
@@ -145,7 +145,7 @@
}
}
- protected void addInjectionPoint(WBInjectionPoint<?, ?> injectionPoint)
+ protected void addInjectionPoint(WeldInjectionPoint<?, ?> injectionPoint)
{
if (injectionPoint.isAnnotationPresent(Decorates.class))
{
@@ -154,15 +154,15 @@
injectionPoints.add(injectionPoint);
}
- protected void addInjectionPoints(Iterable<? extends WBInjectionPoint<?, ?>> injectionPoints)
+ protected void addInjectionPoints(Iterable<? extends WeldInjectionPoint<?, ?>> injectionPoints)
{
- for (WBInjectionPoint<?, ?> injectionPoint : injectionPoints)
+ for (WeldInjectionPoint<?, ?> injectionPoint : injectionPoints)
{
addInjectionPoint(injectionPoint);
}
}
- protected Set<WBInjectionPoint<?, ?>> getDelegateInjectionPoints()
+ protected Set<WeldInjectionPoint<?, ?>> getDelegateInjectionPoints()
{
return delegateInjectionPoints;
}
@@ -262,13 +262,13 @@
private boolean checkInjectionPointsAreSerializable()
{
boolean passivating = manager.getServices().get(MetaAnnotationStore.class).getScopeModel(this.getScope()).isPassivating();
- for (WBInjectionPoint<?, ?> injectionPoint : getAnnotatedInjectionPoints())
+ for (WeldInjectionPoint<?, ?> injectionPoint : getAnnotatedInjectionPoints())
{
Annotation[] bindings = injectionPoint.getMetaAnnotationsAsArray(Qualifier.class);
Bean<?> resolvedBean = manager.getBeans(injectionPoint.getJavaClass(), bindings).iterator().next();
if (passivating)
{
- if (Dependent.class.equals(resolvedBean.getScope()) && !Reflections.isSerializable(resolvedBean.getBeanClass()) && (((injectionPoint instanceof WBField<?, ?>) && !((WBField<?, ?>) injectionPoint).isTransient()) || (injectionPoint instanceof WBParameter<?, ?>)))
+ if (Dependent.class.equals(resolvedBean.getScope()) && !Reflections.isSerializable(resolvedBean.getBeanClass()) && (((injectionPoint instanceof WeldField<?, ?>) && !((WeldField<?, ?>) injectionPoint).isTransient()) || (injectionPoint instanceof WeldParameter<?, ?>)))
{
return false;
}
@@ -331,7 +331,7 @@
*
* @return The annotated item
*/
- protected abstract WBAnnotated<T, E> getAnnotatedItem();
+ protected abstract WeldAnnotated<T, E> getAnnotatedItem();
/**
* Gets the binding types
@@ -356,7 +356,7 @@
public abstract AbstractBean<?, ?> getSpecializedBean();
@Override
- public Set<WBInjectionPoint<?, ?>> getAnnotatedInjectionPoints()
+ public Set<WeldInjectionPoint<?, ?>> getAnnotatedInjectionPoints()
{
return injectionPoints;
}
@@ -425,7 +425,7 @@
* @param annotatedItem The other annotation to check
* @return True if assignable, otherwise false
*/
- public boolean isAssignableFrom(WBAnnotated<?, ?> annotatedItem)
+ public boolean isAssignableFrom(WeldAnnotated<?, ?> annotatedItem)
{
return this.getAnnotatedItem().isAssignableFrom(annotatedItem);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -44,8 +44,8 @@
import org.jboss.weld.context.SerializableContextualInstance;
import org.jboss.weld.injection.FieldInjectionPoint;
import org.jboss.weld.injection.MethodInjectionPoint;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.WBMethod;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.log.LogProvider;
import org.jboss.weld.log.Logging;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
@@ -69,7 +69,7 @@
// Logger
private static final LogProvider log = Logging.getLogProvider(AbstractClassBean.class);
// The item representation
- protected WBClass<T> annotatedItem;
+ protected WeldClass<T> annotatedItem;
// The injectable fields of each type in the type hierarchy, with the actual type at the bottom
private List<Set<FieldInjectionPoint<?, ?>>> injectableFields;
// The initializer methods of each type in the type hierarchy, with the actual type at the bottom
@@ -81,8 +81,8 @@
private Class<T> proxyClassForDecorators;
private final ThreadLocal<Integer> decoratorStackPosition;
- private WBMethod<?, ?> postConstruct;
- private WBMethod<?, ?> preDestroy;
+ private WeldMethod<?, ?> postConstruct;
+ private WeldMethod<?, ?> preDestroy;
/**
* Constructor
@@ -90,7 +90,7 @@
* @param type The type
* @param manager The Bean manager
*/
- protected AbstractClassBean(WBClass<T> type, String idSuffix, BeanManagerImpl manager)
+ protected AbstractClassBean(WeldClass<T> type, String idSuffix, BeanManagerImpl manager)
{
super(idSuffix, manager);
this.annotatedItem = type;
@@ -251,7 +251,7 @@
@Override
protected void initScopeType()
{
- for (WBClass<?> clazz = getAnnotatedItem(); clazz != null; clazz = clazz.getWBSuperclass())
+ for (WeldClass<?> clazz = getAnnotatedItem(); clazz != null; clazz = clazz.getWeldSuperclass())
{
Set<Annotation> scopeTypes = new HashSet<Annotation>();
scopeTypes.addAll(clazz.getDeclaredMetaAnnotations(Scope.class));
@@ -292,7 +292,7 @@
protected void preSpecialize(BeanDeployerEnvironment environment)
{
super.preSpecialize(environment);
- if (getAnnotatedItem().getWBSuperclass() == null || getAnnotatedItem().getWBSuperclass().getJavaClass().equals(Object.class))
+ if (getAnnotatedItem().getWeldSuperclass() == null || getAnnotatedItem().getWeldSuperclass().getJavaClass().equals(Object.class))
{
throw new DefinitionException("Specializing bean must extend another bean " + toString());
}
@@ -304,7 +304,7 @@
* @return The annotated item
*/
@Override
- public WBClass<T> getAnnotatedItem()
+ public WeldClass<T> getAnnotatedItem()
{
return annotatedItem;
}
@@ -350,7 +350,7 @@
public void postConstruct(T instance)
{
- WBMethod<?, ?> postConstruct = getPostConstruct();
+ WeldMethod<?, ?> postConstruct = getPostConstruct();
if (postConstruct != null)
{
try
@@ -366,7 +366,7 @@
public void preDestroy(T instance)
{
- WBMethod<?, ?> preDestroy = getPreDestroy();
+ WeldMethod<?, ?> preDestroy = getPreDestroy();
if (preDestroy != null)
{
try
@@ -402,7 +402,7 @@
*
* @return The post-construct method
*/
- public WBMethod<?, ?> getPostConstruct()
+ public WeldMethod<?, ?> getPostConstruct()
{
return postConstruct;
}
@@ -412,7 +412,7 @@
*
* @return The pre-destroy method
*/
- public WBMethod<?, ?> getPreDestroy()
+ public WeldMethod<?, ?> getPreDestroy()
{
return preDestroy;
}
@@ -455,8 +455,8 @@
builder.interceptPostConstruct().with(manager.resolveInterceptors(InterceptionType.POST_CONSTRUCT, classBindingAnnotations.toArray(new Annotation[0])).toArray(new Interceptor<?>[]{}));
builder.interceptPreDestroy().with(manager.resolveInterceptors(InterceptionType.PRE_DESTROY, classBindingAnnotations.toArray(new Annotation[0])).toArray(new Interceptor<?>[]{}));
- List<WBMethod<?, ?>> businessMethods = Beans.getInterceptableBusinessMethods(getAnnotatedItem());
- for (WBMethod<?, ?> method : businessMethods)
+ List<WeldMethod<?, ?>> businessMethods = Beans.getInterceptableBusinessMethods(getAnnotatedItem());
+ for (WeldMethod<?, ?> method : businessMethods)
{
List<Annotation> methodBindingAnnotations = new ArrayList<Annotation>(classBindingAnnotations);
methodBindingAnnotations.addAll(flattenInterceptorBindings(manager, method.getAnnotations()));
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -40,7 +40,7 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.DefinitionException;
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
-import org.jboss.weld.introspector.WBMember;
+import org.jboss.weld.introspector.WeldMember;
import org.jboss.weld.log.LogProvider;
import org.jboss.weld.log.Logging;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
@@ -71,7 +71,7 @@
}
@Override
- public abstract WBMember<T, X, S> getAnnotatedItem();
+ public abstract WeldMember<T, X, S> getAnnotatedItem();
@Override
// Overriden to provide the class of the bean that declares the producer method/field
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -23,8 +23,8 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
-import org.jboss.weld.context.WBCreationalContext;
-import org.jboss.weld.introspector.WBMember;
+import org.jboss.weld.context.WeldCreationalContext;
+import org.jboss.weld.introspector.WeldMember;
import org.jboss.weld.log.LogProvider;
import org.jboss.weld.log.Logging;
@@ -68,9 +68,9 @@
}
else
{
- if (creationalContext instanceof WBCreationalContext<?>)
+ if (creationalContext instanceof WeldCreationalContext<?>)
{
- WBCreationalContext<?> creationalContextImpl = (WBCreationalContext<?>) creationalContext;
+ WeldCreationalContext<?> creationalContextImpl = (WeldCreationalContext<?>) creationalContext;
if (creationalContextImpl.containsIncompleteInstance(getDeclaringBean()))
{
log.warn("Executing producer field or method " + getAnnotatedItem() + " on incomplete declaring bean " + getDeclaringBean() + " due to circular injection");
@@ -119,6 +119,6 @@
}
@Override
- protected abstract WBMember<T, ?, S> getAnnotatedItem();
+ protected abstract WeldMember<T, ?, S> getAnnotatedItem();
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/DecoratorImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -31,8 +31,8 @@
import org.jboss.weld.DefinitionException;
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
import org.jboss.weld.injection.MethodInjectionPoint;
-import org.jboss.weld.injection.WBInjectionPoint;
-import org.jboss.weld.introspector.WBClass;
+import org.jboss.weld.injection.WeldInjectionPoint;
+import org.jboss.weld.introspector.WeldClass;
public class DecoratorImpl<T> extends ManagedBean<T> implements Decorator<T>
{
@@ -71,18 +71,18 @@
* @param manager the current manager
* @return a Bean
*/
- public static <T> DecoratorImpl<T> of(WBClass<T> clazz, BeanManagerImpl manager)
+ public static <T> DecoratorImpl<T> of(WeldClass<T> clazz, BeanManagerImpl manager)
{
return new DecoratorImpl<T>(clazz, manager);
}
- private WBInjectionPoint<?, ?> delegateInjectionPoint;
+ private WeldInjectionPoint<?, ?> delegateInjectionPoint;
private Set<Annotation> delegateBindings;
private Type delegateType;
private Set<Type> delegateTypes;
private Set<Type> decoratedTypes;
- protected DecoratorImpl(WBClass<T> type, BeanManagerImpl manager)
+ protected DecoratorImpl(WeldClass<T> type, BeanManagerImpl manager)
{
super(type, new StringBuilder().append(Decorator.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(type.getName()).toString(), manager);
}
@@ -116,7 +116,7 @@
@Override
protected void checkDelegateInjectionPoints()
{
- for (WBInjectionPoint<?, ?> injectionPoint : getDelegateInjectionPoints())
+ for (WeldInjectionPoint<?, ?> injectionPoint : getDelegateInjectionPoints())
{
if (injectionPoint instanceof MethodInjectionPoint<?, ?> && !injectionPoint.isAnnotationPresent(Inject.class))
{
@@ -197,7 +197,7 @@
return decoratedTypes;
}
- public WBInjectionPoint<?, ?> getDelegateInjectionPoint()
+ public WeldInjectionPoint<?, ?> getDelegateInjectionPoint()
{
return delegateInjectionPoint;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/DisposalMethod.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/DisposalMethod.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/DisposalMethod.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -33,14 +33,14 @@
import org.jboss.weld.DefinitionException;
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
import org.jboss.weld.injection.MethodInjectionPoint;
-import org.jboss.weld.introspector.WBMethod;
+import org.jboss.weld.introspector.WeldMethod;
public class DisposalMethod<X, T> extends AbstractReceiverBean<X, T, Method>
{
protected MethodInjectionPoint<T, ?> disposalMethodInjectionPoint;
- protected DisposalMethod(BeanManagerImpl manager, WBMethod<T, X> disposalMethod, AbstractClassBean<X> declaringBean)
+ protected DisposalMethod(BeanManagerImpl manager, WeldMethod<T, X> disposalMethod, AbstractClassBean<X> declaringBean)
{
super(new StringBuilder().append(DisposalMethod.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getAnnotatedItem().getName()).append(disposalMethod.getSignature().toString()).toString(), declaringBean, manager);
this.disposalMethodInjectionPoint = MethodInjectionPoint.of(this, disposalMethod);
@@ -66,12 +66,12 @@
}
@Override
- public WBMethod<T, ?> getAnnotatedItem()
+ public WeldMethod<T, ?> getAnnotatedItem()
{
return disposalMethodInjectionPoint;
}
- public static <X, T> DisposalMethod<X, T> of(BeanManagerImpl manager, WBMethod<T, X> disposalMethod, AbstractClassBean<X> declaringBean)
+ public static <X, T> DisposalMethod<X, T> of(BeanManagerImpl manager, WeldMethod<T, X> disposalMethod, AbstractClassBean<X> declaringBean)
{
return new DisposalMethod<X, T>(manager, disposalMethod, declaringBean);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/InterceptorImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/InterceptorImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/InterceptorImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -21,7 +21,7 @@
import org.jboss.interceptor.registry.InterceptorClassMetadataRegistry;
import org.jboss.interceptor.proxy.DirectClassInterceptionHandler;
import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.introspector.WBClass;
+import org.jboss.weld.introspector.WeldClass;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
import javax.enterprise.inject.spi.InterceptionType;
@@ -40,14 +40,14 @@
private final Set<Annotation> interceptorBindingTypes;
- protected InterceptorImpl(WBClass<T> type, BeanManagerImpl manager)
+ protected InterceptorImpl(WeldClass<T> type, BeanManagerImpl manager)
{
super(type, new StringBuilder().append(Interceptor.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(type.getName()).toString(), manager);
this.interceptorClassMetadata = InterceptorClassMetadataRegistry.getRegistry().getInterceptorClassMetadata(type.getJavaClass());
this.interceptorBindingTypes = flattenInterceptorBindings(manager, getAnnotatedItem().getAnnotations());
}
- public static <T> InterceptorImpl<T> of(WBClass<T> type, BeanManagerImpl manager)
+ public static <T> InterceptorImpl<T> of(WeldClass<T> type, BeanManagerImpl manager)
{
return new InterceptorImpl(type, manager);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -41,11 +41,11 @@
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
import org.jboss.weld.injection.ConstructorInjectionPoint;
import org.jboss.weld.injection.InjectionContextImpl;
-import org.jboss.weld.injection.WBInjectionPoint;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.WBConstructor;
-import org.jboss.weld.introspector.WBField;
-import org.jboss.weld.introspector.WBMethod;
+import org.jboss.weld.injection.WeldInjectionPoint;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldConstructor;
+import org.jboss.weld.introspector.WeldField;
+import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.log.LogProvider;
import org.jboss.weld.log.Logging;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
@@ -67,10 +67,10 @@
// The constructor
private ConstructorInjectionPoint<T> constructor;
- private Set<WBInjectionPoint<?, ?>> ejbInjectionPoints;
- private Set<WBInjectionPoint<?, ?>> persistenceContextInjectionPoints;
- private Set<WBInjectionPoint<?, ?>> persistenceUnitInjectionPoints;
- private Set<WBInjectionPoint<?, ?>> resourceInjectionPoints;
+ private Set<WeldInjectionPoint<?, ?>> ejbInjectionPoints;
+ private Set<WeldInjectionPoint<?, ?>> persistenceContextInjectionPoints;
+ private Set<WeldInjectionPoint<?, ?>> persistenceUnitInjectionPoints;
+ private Set<WeldInjectionPoint<?, ?>> resourceInjectionPoints;
private ManagedBean<?> specializedBean;
@@ -82,7 +82,7 @@
* @param manager the current manager
* @return A Web Bean
*/
- public static <T> ManagedBean<T> of(WBClass<T> clazz, BeanManagerImpl manager)
+ public static <T> ManagedBean<T> of(WeldClass<T> clazz, BeanManagerImpl manager)
{
return new ManagedBean<T>(clazz, new StringBuilder().append(ManagedBean.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(clazz.getName()).toString(), manager);
}
@@ -93,7 +93,7 @@
* @param type The type of the bean
* @param manager The Bean manager
*/
- protected ManagedBean(WBClass<T> type, String idSuffix, BeanManagerImpl manager)
+ protected ManagedBean(WeldClass<T> type, String idSuffix, BeanManagerImpl manager)
{
super(type, idSuffix, manager);
initType();
@@ -252,9 +252,9 @@
if (decorator instanceof DecoratorImpl<?>)
{
DecoratorImpl<?> decoratorBean = (DecoratorImpl<?>) decorator;
- for (WBMethod<?, ?> decoratorMethod : decoratorBean.getAnnotatedItem().getWBMethods())
+ for (WeldMethod<?, ?> decoratorMethod : decoratorBean.getAnnotatedItem().getWeldMethods())
{
- WBMethod<?, ?> method = getAnnotatedItem().getWBMethod(decoratorMethod.getSignature());
+ WeldMethod<?, ?> method = getAnnotatedItem().getWBMethod(decoratorMethod.getSignature());
if (method != null && !method.isStatic() && !method.isPrivate() && method.isFinal())
{
throw new DefinitionException("Decorated bean method " + method + " (decorated by "+ decoratorMethod + ") cannot be declarted final");
@@ -275,7 +275,7 @@
super.checkBeanImplementation();
if (isNormalScoped())
{
- for (WBField<?, ?> field : getAnnotatedItem().getWBFields())
+ for (WeldField<?, ?> field : getAnnotatedItem().getWeldFields())
{
if (field.isPublic() && !field.isStatic())
{
@@ -301,7 +301,7 @@
protected void preSpecialize(BeanDeployerEnvironment environment)
{
super.preSpecialize(environment);
- if (environment.getEjbDescriptors().contains(getAnnotatedItem().getWBSuperclass().getJavaClass()))
+ if (environment.getEjbDescriptors().contains(getAnnotatedItem().getWeldSuperclass().getJavaClass()))
{
throw new DefinitionException("Simple bean must specialize a simple bean");
}
@@ -310,11 +310,11 @@
@Override
protected void specialize(BeanDeployerEnvironment environment)
{
- if (environment.getClassBean(getAnnotatedItem().getWBSuperclass()) == null)
+ if (environment.getClassBean(getAnnotatedItem().getWeldSuperclass()) == null)
{
throw new DefinitionException(toString() + " does not specialize a bean");
}
- AbstractClassBean<?> specializedBean = environment.getClassBean(getAnnotatedItem().getWBSuperclass());
+ AbstractClassBean<?> specializedBean = environment.getClassBean(getAnnotatedItem().getWeldSuperclass());
if (!(specializedBean instanceof ManagedBean))
{
throw new DefinitionException(toString() + " doesn't have a simple bean as a superclass " + specializedBean);
@@ -340,7 +340,7 @@
*
* @return The constructor
*/
- public WBConstructor<T> getConstructor()
+ public WeldConstructor<T> getConstructor()
{
return constructor;
}
@@ -444,8 +444,8 @@
builder.interceptPreDestroy().with(classDeclaredInterceptors);
}
- List<WBMethod<?, ?>> businessMethods = Beans.getInterceptableBusinessMethods(getAnnotatedItem());
- for (WBMethod<?, ?> method : businessMethods)
+ List<WeldMethod<?, ?>> businessMethods = Beans.getInterceptableBusinessMethods(getAnnotatedItem());
+ for (WeldMethod<?, ?> method : businessMethods)
{
boolean excludeClassInterceptors = method.isAnnotationPresent(InterceptionUtils.getExcludeClassInterceptorsAnnotationClass());
Class<?>[] methodDeclaredInterceptors = null;
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewManagedBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewManagedBean.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewManagedBean.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -23,7 +23,7 @@
import javax.enterprise.context.Dependent;
import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.introspector.WBClass;
+import org.jboss.weld.introspector.WeldClass;
import org.jboss.weld.literal.NewLiteral;
/**
@@ -41,7 +41,7 @@
* @param manager The Bean manager
* @return a new NewSimpleBean instance
*/
- public static <T> NewManagedBean<T> of(WBClass<T> clazz, BeanManagerImpl manager)
+ public static <T> NewManagedBean<T> of(WeldClass<T> clazz, BeanManagerImpl manager)
{
return new NewManagedBean<T>(clazz, new StringBuilder().append(NewManagedBean.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(clazz.getName()).toString(), manager);
}
@@ -54,7 +54,7 @@
* @param type An annotated class
* @param manager The Bean manager
*/
- protected NewManagedBean(final WBClass<T> type, String idSuffix, BeanManagerImpl manager)
+ protected NewManagedBean(final WeldClass<T> type, String idSuffix, BeanManagerImpl manager)
{
super(type, idSuffix, manager);
this.bindings = new HashSet<Annotation>();
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewSessionBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewSessionBean.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewSessionBean.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -24,7 +24,7 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.ejb.InternalEjbDescriptor;
-import org.jboss.weld.introspector.WBClass;
+import org.jboss.weld.introspector.WeldClass;
import org.jboss.weld.literal.NewLiteral;
import org.jboss.weld.resources.ClassTransformer;
@@ -45,7 +45,7 @@
*/
public static <T> NewSessionBean<T> of(InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl manager)
{
- WBClass<T> type = manager.getServices().get(ClassTransformer.class).loadClass(ejbDescriptor.getBeanClass());
+ WeldClass<T> type = manager.getServices().get(ClassTransformer.class).loadClass(ejbDescriptor.getBeanClass());
return new NewSessionBean<T>(type, ejbDescriptor, new StringBuilder().append(NewSessionBean.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(ejbDescriptor.getEjbName()).toString(), manager);
}
@@ -57,7 +57,7 @@
* @param type An annotated class
* @param manager The Bean manager
*/
- protected NewSessionBean(final WBClass<T> type, InternalEjbDescriptor<T> ejbDescriptor, String idSuffix, BeanManagerImpl manager)
+ protected NewSessionBean(final WeldClass<T> type, InternalEjbDescriptor<T> ejbDescriptor, String idSuffix, BeanManagerImpl manager)
{
super(type, ejbDescriptor, idSuffix, manager);
this.bindings = new HashSet<Annotation>();
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerField.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerField.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerField.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -25,7 +25,7 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
-import org.jboss.weld.introspector.WBField;
+import org.jboss.weld.introspector.WeldField;
import org.jboss.weld.util.Names;
/**
@@ -38,7 +38,7 @@
public class ProducerField<X, T> extends AbstractProducerBean<X, T, Field>
{
// The underlying field
- private WBField<T, X> field;
+ private WeldField<T, X> field;
private final String id;
/**
@@ -49,7 +49,7 @@
* @param manager the current manager
* @return A producer field
*/
- public static <X, T> ProducerField<X, T> of(WBField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ public static <X, T> ProducerField<X, T> of(WeldField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
{
return new ProducerField<X, T>(field, declaringBean, manager);
}
@@ -61,7 +61,7 @@
* @param declaringBean The declaring bean
* @param manager The Bean manager
*/
- protected ProducerField(WBField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ protected ProducerField(WeldField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
{
super(new StringBuilder().append(ProducerField.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getAnnotatedItem().getName()).append(field.getName()).toString(), declaringBean, manager);
this.field = field;
@@ -104,7 +104,7 @@
* @return The annotated item
*/
@Override
- public WBField<T, X> getAnnotatedItem()
+ public WeldField<T, X> getAnnotatedItem()
{
return field;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerMethod.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerMethod.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerMethod.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -32,8 +32,8 @@
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
import org.jboss.weld.injection.MethodInjectionPoint;
import org.jboss.weld.injection.ParameterInjectionPoint;
-import org.jboss.weld.introspector.WBMethod;
-import org.jboss.weld.introspector.WBParameter;
+import org.jboss.weld.introspector.WeldMethod;
+import org.jboss.weld.introspector.WeldParameter;
import org.jboss.weld.util.Names;
/**
@@ -62,12 +62,12 @@
* @param manager the current manager
* @return A producer Web Bean
*/
- public static <X, T> ProducerMethod<X, T> of(WBMethod<T, X> method, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ public static <X, T> ProducerMethod<X, T> of(WeldMethod<T, X> method, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
{
return new ProducerMethod<X, T>(method, declaringBean, manager);
}
- protected ProducerMethod(WBMethod<T, X> method, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ protected ProducerMethod(WeldMethod<T, X> method, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
{
super(new StringBuilder().append(ProducerMethod.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(declaringBean.getAnnotatedItem().getName()).append(".").append(method.getSignature().toString()).toString(), declaringBean, manager);
this.method = MethodInjectionPoint.of(this, method);
@@ -112,7 +112,7 @@
*/
protected void initProducerMethodInjectableParameters()
{
- for (WBParameter<?, ?> parameter : method.getWBParameters())
+ for (WeldParameter<?, ?> parameter : method.getWBParameters())
{
addInjectionPoint(ParameterInjectionPoint.of(this, parameter));
}
@@ -205,7 +205,7 @@
* @return The annotated item
*/
@Override
- public WBMethod<T, X> getAnnotatedItem()
+ public WeldMethod<T, X> getAnnotatedItem()
{
return method;
}
@@ -262,7 +262,7 @@
@Override
protected void preSpecialize(BeanDeployerEnvironment environment)
{
- if (getDeclaringBean().getAnnotatedItem().getWBSuperclass().getDeclaredWBMethod(getAnnotatedItem().getAnnotatedMethod()) == null)
+ if (getDeclaringBean().getAnnotatedItem().getWeldSuperclass().getDeclaredWeldMethod(getAnnotatedItem().getAnnotatedMethod()) == null)
{
throw new DefinitionException("Specialized producer method does not override a method on the direct superclass");
}
@@ -271,7 +271,7 @@
@Override
protected void specialize(BeanDeployerEnvironment environment)
{
- WBMethod<?, ?> superClassMethod = getDeclaringBean().getAnnotatedItem().getWBSuperclass().getWBMethod(getAnnotatedItem().getAnnotatedMethod());
+ WeldMethod<?, ?> superClassMethod = getDeclaringBean().getAnnotatedItem().getWeldSuperclass().getWeldMethod(getAnnotatedItem().getAnnotatedMethod());
if (environment.getProducerMethod(superClassMethod) == null)
{
throw new IllegalStateException(toString() + " does not specialize a bean");
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/RIBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/RIBean.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/RIBean.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -25,7 +25,7 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
-import org.jboss.weld.injection.WBInjectionPoint;
+import org.jboss.weld.injection.WeldInjectionPoint;
/**
* Abstract base class with functions specific to RI built-in beans
@@ -74,7 +74,7 @@
public abstract boolean isPrimitive();
- public abstract Set<WBInjectionPoint<?, ?>> getAnnotatedInjectionPoints();
+ public abstract Set<WeldInjectionPoint<?, ?>> getAnnotatedInjectionPoints();
public Set<InjectionPoint> getInjectionPoints()
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -47,8 +47,8 @@
import org.jboss.weld.ejb.spi.BusinessInterfaceDescriptor;
import org.jboss.weld.ejb.spi.EjbServices;
import org.jboss.weld.injection.InjectionContextImpl;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.WBMethod;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.log.Log;
import org.jboss.weld.log.Logging;
import org.jboss.weld.resources.ClassTransformer;
@@ -84,7 +84,7 @@
*/
public static <T> SessionBean<T> of(InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl manager)
{
- WBClass<T> type = manager.getServices().get(ClassTransformer.class).loadClass(ejbDescriptor.getBeanClass());
+ WeldClass<T> type = manager.getServices().get(ClassTransformer.class).loadClass(ejbDescriptor.getBeanClass());
return new SessionBean<T>(type, ejbDescriptor, new StringBuilder().append(SessionBean.class.getSimpleName()).append(BEAN_ID_SEPARATOR).append(ejbDescriptor.getEjbName()).toString(), manager);
}
@@ -94,7 +94,7 @@
* @param type The type of the bean
* @param manager The Bean manager
*/
- protected SessionBean(WBClass<T> type, InternalEjbDescriptor<T> ejbDescriptor, String idSuffix, BeanManagerImpl manager)
+ protected SessionBean(WeldClass<T> type, InternalEjbDescriptor<T> ejbDescriptor, String idSuffix, BeanManagerImpl manager)
{
super(type, idSuffix, manager);
initType();
@@ -185,7 +185,7 @@
{
super.preSpecialize(environment);
// We appear to check this twice?
- if (!environment.getEjbDescriptors().contains(getAnnotatedItem().getWBSuperclass().getJavaClass()))
+ if (!environment.getEjbDescriptors().contains(getAnnotatedItem().getWeldSuperclass().getJavaClass()))
{
throw new DefinitionException("Annotation defined specializing EJB must have EJB superclass");
}
@@ -194,11 +194,11 @@
@Override
protected void specialize(BeanDeployerEnvironment environment)
{
- if (environment.getClassBean(getAnnotatedItem().getWBSuperclass()) == null)
+ if (environment.getClassBean(getAnnotatedItem().getWeldSuperclass()) == null)
{
throw new IllegalStateException(toString() + " does not specialize a bean");
}
- AbstractClassBean<?> specializedBean = environment.getClassBean(getAnnotatedItem().getWBSuperclass());
+ AbstractClassBean<?> specializedBean = environment.getClassBean(getAnnotatedItem().getWeldSuperclass());
if (!(specializedBean instanceof SessionBean<?>))
{
throw new IllegalStateException(toString() + " doesn't have a session bean as a superclass " + specializedBean);
@@ -351,7 +351,7 @@
*/
protected void checkObserverMethods()
{
- for (WBMethod<?, ?> method : this.annotatedItem.getDeclaredWBMethodsWithAnnotatedParameters(Observes.class))
+ for (WeldMethod<?, ?> method : this.annotatedItem.getDeclaredWeldMethodsWithAnnotatedParameters(Observes.class))
{
if (!method.isStatic())
{
@@ -364,7 +364,7 @@
}
// TODO must be a nicer way to do this!
- public boolean isMethodExistsOnTypes(WBMethod<?, ?> method)
+ public boolean isMethodExistsOnTypes(WeldMethod<?, ?> method)
{
for (Type type : getTypes())
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractBuiltInBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractBuiltInBean.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/AbstractBuiltInBean.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -27,7 +27,7 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.bean.RIBean;
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
-import org.jboss.weld.injection.WBInjectionPoint;
+import org.jboss.weld.injection.WeldInjectionPoint;
import org.jboss.weld.literal.AnyLiteral;
import org.jboss.weld.literal.DefaultLiteral;
@@ -78,7 +78,7 @@
}
@Override
- public Set<WBInjectionPoint<?, ?>> getAnnotatedInjectionPoints()
+ public Set<WeldInjectionPoint<?, ?>> getAnnotatedInjectionPoints()
{
return Collections.emptySet();
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ExtensionBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ExtensionBean.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/ExtensionBean.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -25,7 +25,7 @@
import javax.enterprise.inject.spi.Extension;
import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.introspector.WBClass;
+import org.jboss.weld.introspector.WeldClass;
/**
* @author pmuir
@@ -36,10 +36,10 @@
private static final String ID_PREFIX = "Extension";
- private final WBClass<Extension> clazz;
+ private final WeldClass<Extension> clazz;
private final Extension instance;
- public ExtensionBean(BeanManagerImpl manager, WBClass<Extension> clazz, Extension instance)
+ public ExtensionBean(BeanManagerImpl manager, WeldClass<Extension> clazz, Extension instance)
{
super(new StringBuilder().append(ID_PREFIX).append(BEAN_ID_SEPARATOR).append(clazz.getName()).toString(), manager);
this.clazz = clazz;
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/facade/InstanceImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/facade/InstanceImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/facade/InstanceImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -31,7 +31,7 @@
import javax.enterprise.inject.spi.Bean;
import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.resolution.ResolvableWBClass;
+import org.jboss.weld.resolution.ResolvableWeldClass;
/**
* Helper implementation for Instance for getting instances
@@ -62,7 +62,7 @@
public T get(Annotation... bindings)
{
Annotation[] annotations = mergeInBindings(bindings);
- Bean<T> bean = getManager().getBean(ResolvableWBClass.<T>of(getType(), annotations, getManager()), annotations);
+ Bean<T> bean = getManager().getBean(ResolvableWeldClass.<T>of(getType(), annotations, getManager()), annotations);
@SuppressWarnings("unchecked")
T instance = (T) getManager().getReference(bean, getType(), getManager().createCreationalContext(bean));
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/ee/EEResourceProducerField.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/ee/EEResourceProducerField.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/ee/EEResourceProducerField.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -21,7 +21,7 @@
import org.jboss.weld.bean.ProducerField;
import org.jboss.weld.bootstrap.BeanDeployerEnvironment;
import org.jboss.weld.ejb.EJBApiAbstraction;
-import org.jboss.weld.introspector.WBField;
+import org.jboss.weld.introspector.WeldField;
import org.jboss.weld.persistence.PersistenceApiAbstraction;
import org.jboss.weld.ws.WSApiAbstraction;
@@ -40,12 +40,12 @@
* @param manager the current manager
* @return A producer field
*/
- public static <X, T> EEResourceProducerField<X, T> of(WBField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ public static <X, T> EEResourceProducerField<X, T> of(WeldField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
{
return new EEResourceProducerField<X, T>(field, declaringBean, manager);
}
- protected EEResourceProducerField(WBField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ protected EEResourceProducerField(WeldField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
{
super(field, declaringBean, manager);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/ee/PersistenceContextProducerField.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/ee/PersistenceContextProducerField.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/ee/PersistenceContextProducerField.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -20,7 +20,7 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.bean.AbstractClassBean;
-import org.jboss.weld.introspector.WBField;
+import org.jboss.weld.introspector.WeldField;
/**
* @author pmuir
@@ -37,7 +37,7 @@
* @param manager the current manager
* @return A producer field
*/
- public static <X, T extends EntityManager> EEResourceProducerField<X, T> of(WBField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ public static <X, T extends EntityManager> EEResourceProducerField<X, T> of(WeldField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
{
return new PersistenceContextProducerField<X, T>(field, declaringBean, manager);
}
@@ -47,7 +47,7 @@
* @param declaringBean
* @param manager
*/
- protected PersistenceContextProducerField(WBField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
+ protected PersistenceContextProducerField(WeldField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
{
super(field, declaringBean, manager);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ClientProxyMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ClientProxyMethodHandler.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ClientProxyMethodHandler.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -27,7 +27,7 @@
import javax.enterprise.inject.spi.Bean;
import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.context.WBCreationalContext;
+import org.jboss.weld.context.WeldCreationalContext;
import org.jboss.weld.log.LogProvider;
import org.jboss.weld.log.Logging;
import org.jboss.weld.util.Reflections;
@@ -54,7 +54,7 @@
private final BeanManagerImpl manager;
- private static final ThreadLocal<WBCreationalContext<?>> currentCreationalContext = new ThreadLocal<WBCreationalContext<?>>();
+ private static final ThreadLocal<WeldCreationalContext<?>> currentCreationalContext = new ThreadLocal<WeldCreationalContext<?>>();
/**
* Constructor
@@ -120,7 +120,7 @@
private <T> T getProxiedInstance(Bean<T> bean)
{
- WBCreationalContext<T> creationalContext;
+ WeldCreationalContext<T> creationalContext;
boolean outer;
if (currentCreationalContext.get() == null)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/DecoratorProxyMethodHandler.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -27,7 +27,7 @@
import org.jboss.weld.bean.DecoratorImpl;
import org.jboss.weld.context.SerializableContextualInstance;
import org.jboss.weld.introspector.MethodSignature;
-import org.jboss.weld.introspector.WBMethod;
+import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.introspector.jlr.MethodSignatureImpl;
/**
@@ -79,7 +79,7 @@
MethodSignature methodSignature = new MethodSignatureImpl(method);
for (SerializableContextualInstance<DecoratorImpl<Object>, Object> beanInstance : decoratorInstances)
{
- WBMethod<?, ?> decoratorMethod = beanInstance.getContextual().get().getAnnotatedItem().getWBMethod(methodSignature);
+ WeldMethod<?, ?> decoratorMethod = beanInstance.getContextual().get().getAnnotatedItem().getWBMethod(methodSignature);
if (decoratorMethod != null)
{
return decoratorMethod.invokeOnInstance(beanInstance.getInstance(), args);
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/AbstractBeanDeployer.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -51,9 +51,9 @@
import org.jboss.weld.ejb.spi.EjbServices;
import org.jboss.weld.event.ObserverFactory;
import org.jboss.weld.event.ObserverMethodImpl;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.WBField;
-import org.jboss.weld.introspector.WBMethod;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldField;
+import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.jsf.JsfApiAbstraction;
import org.jboss.weld.log.LogProvider;
import org.jboss.weld.log.Logging;
@@ -141,17 +141,17 @@
}
- protected <X> void createProducerMethods(AbstractClassBean<X> declaringBean, WBClass<X> annotatedClass)
+ protected <X> void createProducerMethods(AbstractClassBean<X> declaringBean, WeldClass<X> annotatedClass)
{
- for (WBMethod<?, X> method : annotatedClass.getDeclaredAnnotatedWBMethods(Produces.class))
+ for (WeldMethod<?, X> method : annotatedClass.getDeclaredAnnotatedWeldMethods(Produces.class))
{
createProducerMethod(declaringBean, method);
}
}
- protected <X> void createDisposalMethods(AbstractClassBean<X> declaringBean, WBClass<X> annotatedClass)
+ protected <X> void createDisposalMethods(AbstractClassBean<X> declaringBean, WeldClass<X> annotatedClass)
{
- for (WBMethod<?, X> method : annotatedClass.getDeclaredWBMethodsWithAnnotatedParameters(Disposes.class))
+ for (WeldMethod<?, X> method : annotatedClass.getDeclaredWeldMethodsWithAnnotatedParameters(Disposes.class))
{
DisposalMethod<X, ?> disposalBean = DisposalMethod.of(manager, method, declaringBean);
disposalBean.initialize(getEnvironment());
@@ -159,13 +159,13 @@
}
}
- protected <X, T> void createProducerMethod(AbstractClassBean<X> declaringBean, WBMethod<T, X> annotatedMethod)
+ protected <X, T> void createProducerMethod(AbstractClassBean<X> declaringBean, WeldMethod<T, X> annotatedMethod)
{
ProducerMethod<X, T> bean = ProducerMethod.of(annotatedMethod, declaringBean, manager);
getEnvironment().addBean(bean);
}
- protected <X, T> void createProducerField(AbstractClassBean<X> declaringBean, WBField<T, X> field)
+ protected <X, T> void createProducerField(AbstractClassBean<X> declaringBean, WeldField<T, X> field)
{
ProducerField<X, T> bean;
if (isPersistenceContextProducerField(field))
@@ -200,23 +200,23 @@
manager.fireEvent(eventType, payload);
}
- protected <X> void createProducerFields(AbstractClassBean<X> declaringBean, WBClass<X> annotatedClass)
+ protected <X> void createProducerFields(AbstractClassBean<X> declaringBean, WeldClass<X> annotatedClass)
{
- for (WBField<?, X> field : annotatedClass.getDeclaredAnnotatedWBFields(Produces.class))
+ for (WeldField<?, X> field : annotatedClass.getDeclaredAnnotatedWeldFields(Produces.class))
{
createProducerField(declaringBean, field);
}
}
- protected <X> void createObserverMethods(RIBean<X> declaringBean, WBClass<X> annotatedClass)
+ protected <X> void createObserverMethods(RIBean<X> declaringBean, WeldClass<X> annotatedClass)
{
- for (WBMethod<?, X> method : annotatedClass.getDeclaredWBMethodsWithAnnotatedParameters(Observes.class))
+ for (WeldMethod<?, X> method : annotatedClass.getDeclaredWeldMethodsWithAnnotatedParameters(Observes.class))
{
createObserverMethod(declaringBean, method);
}
}
- protected <X, T> void createObserverMethod(RIBean<X> declaringBean, WBMethod<T, X> method)
+ protected <X, T> void createObserverMethod(RIBean<X> declaringBean, WeldMethod<T, X> method)
{
ObserverMethodImpl<X, T> observer = ObserverFactory.create(method, declaringBean, manager);
getEnvironment().addObserver(observer);
@@ -234,7 +234,7 @@
return;
}
- protected <T> void createSimpleBean(WBClass<T> annotatedClass)
+ protected <T> void createSimpleBean(WeldClass<T> annotatedClass)
{
ManagedBean<T> bean = ManagedBean.of(annotatedClass, manager);
getEnvironment().addBean(bean);
@@ -242,13 +242,13 @@
getEnvironment().addBean(NewManagedBean.of(annotatedClass, manager));
}
- protected <T> void createDecorator(WBClass<T> annotatedClass)
+ protected <T> void createDecorator(WeldClass<T> annotatedClass)
{
DecoratorImpl<T> bean = DecoratorImpl.of(annotatedClass, manager);
getEnvironment().addBean(bean);
}
- protected <T> void createInterceptor(WBClass<T> annotatedClass)
+ protected <T> void createInterceptor(WeldClass<T> annotatedClass)
{
InterceptorImpl<T> bean = InterceptorImpl.of(annotatedClass, manager);
getEnvironment().addBean(bean);
@@ -270,7 +270,7 @@
* The type to inspect
* @return True if simple Web Bean, false otherwise
*/
- protected boolean isTypeManagedBeanOrDecorator(WBClass<?> clazz)
+ protected boolean isTypeManagedBeanOrDecorator(WeldClass<?> clazz)
{
Class<?> javaClass = clazz.getJavaClass();
EJBApiAbstraction ejbApiAbstraction = manager.getServices().get(EJBApiAbstraction.class);
@@ -288,7 +288,7 @@
hasSimpleWebBeanConstructor(clazz);
}
- protected boolean isEEResourceProducerField(WBField<?, ?> field)
+ protected boolean isEEResourceProducerField(WeldField<?, ?> field)
{
EJBApiAbstraction ejbApiAbstraction = manager.getServices().get(EJBApiAbstraction.class);
PersistenceApiAbstraction persistenceApiAbstraction = manager.getServices().get(PersistenceApiAbstraction.class);
@@ -296,15 +296,15 @@
return field.isAnnotationPresent(ejbApiAbstraction.EJB_ANNOTATION_CLASS) || field.isAnnotationPresent(ejbApiAbstraction.RESOURCE_ANNOTATION_CLASS) || field.isAnnotationPresent(persistenceApiAbstraction.PERSISTENCE_UNIT_ANNOTATION_CLASS) || field.isAnnotationPresent(wsApiAbstraction.WEB_SERVICE_REF_ANNOTATION_CLASS);
}
- protected boolean isPersistenceContextProducerField(WBField<?, ?> field)
+ protected boolean isPersistenceContextProducerField(WeldField<?, ?> field)
{
PersistenceApiAbstraction persistenceApiAbstraction = manager.getServices().get(PersistenceApiAbstraction.class);
return field.isAnnotationPresent(persistenceApiAbstraction.PERSISTENCE_CONTEXT_ANNOTATION_CLASS);
}
- private static boolean hasSimpleWebBeanConstructor(WBClass<?> type)
+ private static boolean hasSimpleWebBeanConstructor(WeldClass<?> type)
{
- return type.getNoArgsWBConstructor() != null || type.getAnnotatedWBConstructors(Inject.class).size() > 0;
+ return type.getNoArgsWeldConstructor() != null || type.getAnnotatedWeldConstructors(Inject.class).size() > 0;
}
public E getEnvironment()
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployer.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployer.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -28,7 +28,7 @@
import org.jboss.weld.bootstrap.events.ProcessAnnotatedTypeImpl;
import org.jboss.weld.ejb.EjbDescriptors;
import org.jboss.weld.ejb.InternalEjbDescriptor;
-import org.jboss.weld.introspector.WBClass;
+import org.jboss.weld.introspector.WeldClass;
import org.jboss.weld.resources.ClassTransformer;
/**
@@ -40,7 +40,7 @@
private final BeanManagerImpl deploymentManager;
- private final Set<WBClass<?>> classes;
+ private final Set<WeldClass<?>> classes;
/**
* @param manager
@@ -49,7 +49,7 @@
public BeanDeployer(BeanManagerImpl manager, BeanManagerImpl deploymentManager, EjbDescriptors ejbDescriptors)
{
super(manager, new BeanDeployerEnvironment(ejbDescriptors, manager));
- this.classes = new HashSet<WBClass<?>>();
+ this.classes = new HashSet<WeldClass<?>>();
this.deploymentManager = deploymentManager;
}
@@ -62,9 +62,9 @@
deploymentManager.fireEvent(event);
if (!event.isVeto())
{
- if (event.getAnnotatedType() instanceof WBClass<?>)
+ if (event.getAnnotatedType() instanceof WeldClass<?>)
{
- classes.add((WBClass<?>) event.getAnnotatedType());
+ classes.add((WeldClass<?>) event.getAnnotatedType());
}
else
{
@@ -77,7 +77,7 @@
private static <X> ProcessAnnotatedTypeImpl<X> createProcessAnnotatedTypeEvent(Class<X> clazz, ClassTransformer classTransformer)
{
- WBClass<X> annotatedType = classTransformer.loadClass(clazz);
+ WeldClass<X> annotatedType = classTransformer.loadClass(clazz);
return new ProcessAnnotatedTypeImpl<X>(annotatedType) {};
}
@@ -100,7 +100,7 @@
public BeanDeployer createBeans()
{
- for (WBClass<?> clazz : classes)
+ for (WeldClass<?> clazz : classes)
{
boolean managedBeanOrDecorator = !getEnvironment().getEjbDescriptors().contains(clazz.getJavaClass()) && isTypeManagedBeanOrDecorator(clazz);
if (managedBeanOrDecorator && clazz.isAnnotationPresent(Decorator.class))
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployerEnvironment.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployerEnvironment.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/BeanDeployerEnvironment.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -39,16 +39,16 @@
import org.jboss.weld.bean.builtin.ExtensionBean;
import org.jboss.weld.ejb.EjbDescriptors;
import org.jboss.weld.event.ObserverMethodImpl;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.WBMethod;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.resolution.ResolvableFactory;
import org.jboss.weld.resolution.TypeSafeDisposerResolver;
public class BeanDeployerEnvironment
{
- private final Map<WBClass<?>, AbstractClassBean<?>> classBeanMap;
- private final Map<WBMethod<?, ?>, ProducerMethod<?, ?>> producerMethodBeanMap;
+ private final Map<WeldClass<?>, AbstractClassBean<?>> classBeanMap;
+ private final Map<WeldMethod<?, ?>, ProducerMethod<?, ?>> producerMethodBeanMap;
private final Set<RIBean<?>> beans;
private final Set<ObserverMethodImpl<?, ?>> observers;
private final List<DisposalMethod<?, ?>> allDisposalBeans;
@@ -60,8 +60,8 @@
public BeanDeployerEnvironment(EjbDescriptors ejbDescriptors, BeanManagerImpl manager)
{
- this.classBeanMap = new HashMap<WBClass<?>, AbstractClassBean<?>>();
- this.producerMethodBeanMap = new HashMap<WBMethod<?, ?>, ProducerMethod<?, ?>>();
+ this.classBeanMap = new HashMap<WeldClass<?>, AbstractClassBean<?>>();
+ this.producerMethodBeanMap = new HashMap<WeldMethod<?, ?>, ProducerMethod<?, ?>>();
this.allDisposalBeans = new ArrayList<DisposalMethod<?, ?>>();
this.resolvedDisposalBeans = new HashSet<DisposalMethod<?, ?>>();
this.beans = new HashSet<RIBean<?>>();
@@ -72,7 +72,7 @@
this.disposalMethodResolver = new TypeSafeDisposerResolver(manager, allDisposalBeans);
}
- public <X, T> ProducerMethod<X, T> getProducerMethod(WBMethod<X, T> method)
+ public <X, T> ProducerMethod<X, T> getProducerMethod(WeldMethod<X, T> method)
{
if (!producerMethodBeanMap.containsKey(method))
{
@@ -86,7 +86,7 @@
}
}
- public AbstractClassBean<?> getClassBean(WBClass<?> clazz)
+ public AbstractClassBean<?> getClassBean(WeldClass<?> clazz)
{
if (!classBeanMap.containsKey(clazz))
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/ExtensionBeanDeployer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/ExtensionBeanDeployer.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/ExtensionBeanDeployer.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -24,7 +24,7 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.Container;
import org.jboss.weld.bean.builtin.ExtensionBean;
-import org.jboss.weld.introspector.WBClass;
+import org.jboss.weld.introspector.WeldClass;
import org.jboss.weld.resources.ClassTransformer;
/**
@@ -49,7 +49,7 @@
for (Extension extension : extensions)
{
@SuppressWarnings("unchecked")
- WBClass<Extension> clazz = (WBClass<Extension>) classTransformer.loadClass(extension.getClass());
+ WeldClass<Extension> clazz = (WeldClass<Extension>) classTransformer.loadClass(extension.getClass());
ExtensionBean bean = new ExtensionBean(getManager(), clazz, extension);
this.
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/context/CreationalContextImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/context/CreationalContextImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/context/CreationalContextImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -23,7 +23,7 @@
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-public class CreationalContextImpl<T> implements CreationalContext<T>, WBCreationalContext<T>, Serializable
+public class CreationalContextImpl<T> implements CreationalContext<T>, WeldCreationalContext<T>, Serializable
{
private static final long serialVersionUID = 7375854583908262422L;
@@ -54,7 +54,7 @@
incompleteInstances.put(contextual, incompleteInstance);
}
- public <S> WBCreationalContext<S> getCreationalContext(Contextual<S> Contextual)
+ public <S> WeldCreationalContext<S> getCreationalContext(Contextual<S> Contextual)
{
return new CreationalContextImpl<S>(Contextual, new HashMap<Contextual<?>, Object>(incompleteInstances), dependentInstancesStore);
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/context/DependentContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/context/DependentContext.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/context/DependentContext.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -60,9 +60,9 @@
if (creationalContext != null)
{
T instance = contextual.create(creationalContext);
- if (creationalContext instanceof WBCreationalContext<?>)
+ if (creationalContext instanceof WeldCreationalContext<?>)
{
- WBCreationalContext<T> creationalContextImpl = (WBCreationalContext<T>) creationalContext;
+ WeldCreationalContext<T> creationalContextImpl = (WeldCreationalContext<T>) creationalContext;
ContextualInstance<T> beanInstance = new SerializableContextualInstance<Contextual<T>, T>(contextual, instance, creationalContext);
creationalContextImpl.getParentDependentInstancesStore().addDependentInstance(beanInstance);
}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/context/ForwardingWBCreationalContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/context/ForwardingWBCreationalContext.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/context/ForwardingWBCreationalContext.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,79 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.context;
-
-import javax.enterprise.context.spi.Contextual;
-
-
-/**
- * @author pmuir
- *
- */
-public abstract class ForwardingWBCreationalContext<T> implements WBCreationalContext<T>
-{
-
- protected abstract WBCreationalContext<T> delegate();
-
- public void push(T incompleteInstance)
- {
- delegate().push(incompleteInstance);
- }
-
- public void release()
- {
- delegate().release();
- }
-
- public boolean containsIncompleteInstance(Contextual<?> bean)
- {
- return delegate().containsIncompleteInstance(bean);
- }
-
- public <S> WBCreationalContext<S> getCreationalContext(Contextual<S> Contextual)
- {
- return delegate().getCreationalContext(Contextual);
- }
-
- public <S> S getIncompleteInstance(Contextual<S> bean)
- {
- return delegate().getIncompleteInstance(bean);
- }
-
- public DependentInstancesStore getParentDependentInstancesStore()
- {
- return delegate().getParentDependentInstancesStore();
- }
-
- @Override
- public boolean equals(Object obj)
- {
- return delegate().equals(obj);
- }
-
- @Override
- public int hashCode()
- {
- return delegate().hashCode();
- }
-
- @Override
- public String toString()
- {
- return delegate().toString();
- }
-
-}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/context/ForwardingWeldCreationalContext.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/context/ForwardingWBCreationalContext.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/context/ForwardingWeldCreationalContext.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/context/ForwardingWeldCreationalContext.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,79 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.context;
+
+import javax.enterprise.context.spi.Contextual;
+
+
+/**
+ * @author pmuir
+ *
+ */
+public abstract class ForwardingWeldCreationalContext<T> implements WeldCreationalContext<T>
+{
+
+ protected abstract WeldCreationalContext<T> delegate();
+
+ public void push(T incompleteInstance)
+ {
+ delegate().push(incompleteInstance);
+ }
+
+ public void release()
+ {
+ delegate().release();
+ }
+
+ public boolean containsIncompleteInstance(Contextual<?> bean)
+ {
+ return delegate().containsIncompleteInstance(bean);
+ }
+
+ public <S> WeldCreationalContext<S> getCreationalContext(Contextual<S> Contextual)
+ {
+ return delegate().getCreationalContext(Contextual);
+ }
+
+ public <S> S getIncompleteInstance(Contextual<S> bean)
+ {
+ return delegate().getIncompleteInstance(bean);
+ }
+
+ public DependentInstancesStore getParentDependentInstancesStore()
+ {
+ return delegate().getParentDependentInstancesStore();
+ }
+
+ @Override
+ public boolean equals(Object obj)
+ {
+ return delegate().equals(obj);
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return delegate().hashCode();
+ }
+
+ @Override
+ public String toString()
+ {
+ return delegate().toString();
+ }
+
+}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/context/WBCreationalContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/context/WBCreationalContext.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/context/WBCreationalContext.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,42 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.context;
-
-import javax.enterprise.context.spi.Contextual;
-import javax.enterprise.context.spi.CreationalContext;
-
-/**
- * @author pmuir
- *
- * @param <T>
- */
-public interface WBCreationalContext<T> extends CreationalContext<T>
-{
-
- public abstract void push(T incompleteInstance);
-
- public abstract <S> WBCreationalContext<S> getCreationalContext(Contextual<S> Contextual);
-
- public abstract <S> S getIncompleteInstance(Contextual<S> bean);
-
- public abstract boolean containsIncompleteInstance(Contextual<?> bean);
-
- public abstract DependentInstancesStore getParentDependentInstancesStore();
-
- public abstract void release();
-
-}
\ No newline at end of file
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/context/WeldCreationalContext.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/context/WBCreationalContext.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/context/WeldCreationalContext.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/context/WeldCreationalContext.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,42 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.context;
+
+import javax.enterprise.context.spi.Contextual;
+import javax.enterprise.context.spi.CreationalContext;
+
+/**
+ * @author pmuir
+ *
+ * @param <T>
+ */
+public interface WeldCreationalContext<T> extends CreationalContext<T>
+{
+
+ public abstract void push(T incompleteInstance);
+
+ public abstract <S> WeldCreationalContext<S> getCreationalContext(Contextual<S> Contextual);
+
+ public abstract <S> S getIncompleteInstance(Contextual<S> bean);
+
+ public abstract boolean containsIncompleteInstance(Contextual<?> bean);
+
+ public abstract DependentInstancesStore getParentDependentInstancesStore();
+
+ public abstract void release();
+
+}
\ No newline at end of file
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/el/ELCreationalContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/el/ELCreationalContext.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/el/ELCreationalContext.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -7,19 +7,19 @@
import javax.enterprise.context.Dependent;
import javax.enterprise.inject.spi.Bean;
-import org.jboss.weld.context.ForwardingWBCreationalContext;
-import org.jboss.weld.context.WBCreationalContext;
+import org.jboss.weld.context.ForwardingWeldCreationalContext;
+import org.jboss.weld.context.WeldCreationalContext;
-abstract class ELCreationalContext<T> extends ForwardingWBCreationalContext<T>
+abstract class ELCreationalContext<T> extends ForwardingWeldCreationalContext<T>
{
- public static <X> ELCreationalContext<X> of(final WBCreationalContext<X> creationalContext)
+ public static <X> ELCreationalContext<X> of(final WeldCreationalContext<X> creationalContext)
{
return new ELCreationalContext<X>()
{
@Override
- protected WBCreationalContext<X> delegate()
+ protected WeldCreationalContext<X> delegate()
{
return creationalContext;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverFactory.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverFactory.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverFactory.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -21,8 +21,8 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.bean.RIBean;
-import org.jboss.weld.introspector.WBMethod;
-import org.jboss.weld.introspector.WBParameter;
+import org.jboss.weld.introspector.WeldMethod;
+import org.jboss.weld.introspector.WeldParameter;
import org.jboss.weld.transaction.spi.TransactionServices;
/**
@@ -41,7 +41,7 @@
* @param manager The Bean manager
* @return An observer implementation built from the method abstraction
*/
- public static <X, T> ObserverMethodImpl<X, T> create(WBMethod<T, X> method, RIBean<X> declaringBean, BeanManagerImpl manager)
+ public static <X, T> ObserverMethodImpl<X, T> create(WeldMethod<T, X> method, RIBean<X> declaringBean, BeanManagerImpl manager)
{
ObserverMethodImpl<X, T> result = null;
TransactionPhase transactionPhase = getTransactionalPhase(method);
@@ -62,9 +62,9 @@
* @param observer The observer method
* @return true if the observer method is annotated as transactional
*/
- public static TransactionPhase getTransactionalPhase(WBMethod<?, ?> observer)
+ public static TransactionPhase getTransactionalPhase(WeldMethod<?, ?> observer)
{
- WBParameter<?, ?> parameter = observer.getAnnotatedWBParameters(Observes.class).iterator().next();
+ WeldParameter<?, ?> parameter = observer.getAnnotatedWBParameters(Observes.class).iterator().next();
return parameter.getAnnotation(Observes.class).during();
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -41,8 +41,8 @@
import org.jboss.weld.DefinitionException;
import org.jboss.weld.bean.RIBean;
import org.jboss.weld.injection.MethodInjectionPoint;
-import org.jboss.weld.introspector.WBMethod;
-import org.jboss.weld.introspector.WBParameter;
+import org.jboss.weld.introspector.WeldMethod;
+import org.jboss.weld.introspector.WeldParameter;
import org.jboss.weld.manager.api.ExecutorServices;
/**
@@ -75,7 +75,7 @@
* @param declaringBean The observer bean
* @param manager The Bean manager
*/
- protected ObserverMethodImpl(final WBMethod<T, X> observer, final RIBean<X> declaringBean, final BeanManagerImpl manager)
+ protected ObserverMethodImpl(final WeldMethod<T, X> observer, final RIBean<X> declaringBean, final BeanManagerImpl manager)
{
this.manager = manager;
this.declaringBean = declaringBean;
@@ -95,7 +95,7 @@
private void checkObserverMethod()
{
// Make sure exactly one and only one parameter is annotated with Observes
- List<WBParameter<?, ?>> eventObjects = this.observerMethod.getAnnotatedParameters(Observes.class);
+ List<WeldParameter<?, ?>> eventObjects = this.observerMethod.getAnnotatedParameters(Observes.class);
if (this.notifyType.equals(Notify.IF_EXISTS) && declaringBean.getScope().equals(Dependent.class))
{
throw new DefinitionException(this + " is invalid because it is a conditional observer method, and is declared by a @Dependent scoped bean");
@@ -108,7 +108,7 @@
// variable or wildcard
if (eventObjects.size() > 0)
{
- WBParameter<?, ?> eventParam = eventObjects.iterator().next();
+ WeldParameter<?, ?> eventParam = eventObjects.iterator().next();
if (eventParam.isParameterizedType())
{
for (Type type : eventParam.getActualTypeArguments())
@@ -125,7 +125,7 @@
}
}
// Check for parameters annotated with @Disposes
- List<WBParameter<?, ?>> disposeParams = this.observerMethod.getAnnotatedParameters(Disposes.class);
+ List<WeldParameter<?, ?>> disposeParams = this.observerMethod.getAnnotatedParameters(Disposes.class);
if (disposeParams.size() > 0)
{
throw new DefinitionException(this + " cannot have any parameters annotated with @Disposes");
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/event/TransactionalObserverMethodImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/event/TransactionalObserverMethodImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/event/TransactionalObserverMethodImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -21,7 +21,7 @@
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.bean.RIBean;
-import org.jboss.weld.introspector.WBMethod;
+import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.transaction.spi.TransactionServices;
/**
@@ -38,7 +38,7 @@
* @param observerBean The bean declaring the observer method
* @param manager The JCDI manager in use
*/
- protected TransactionalObserverMethodImpl(WBMethod<T, X> observer, RIBean<X> observerBean, TransactionPhase transactionPhase, BeanManagerImpl manager)
+ protected TransactionalObserverMethodImpl(WeldMethod<T, X> observer, RIBean<X> observerBean, TransactionPhase transactionPhase, BeanManagerImpl manager)
{
super(observer, observerBean, manager);
this.transactionPhase = transactionPhase;
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -35,17 +35,17 @@
import javax.enterprise.inject.spi.Decorator;
import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.introspector.ForwardingWBConstructor;
-import org.jboss.weld.introspector.WBConstructor;
-import org.jboss.weld.introspector.WBParameter;
+import org.jboss.weld.introspector.ForwardingWeldConstructor;
+import org.jboss.weld.introspector.WeldConstructor;
+import org.jboss.weld.introspector.WeldParameter;
-public class ConstructorInjectionPoint<T> extends ForwardingWBConstructor<T> implements WBInjectionPoint<T, Constructor<T>>
+public class ConstructorInjectionPoint<T> extends ForwardingWeldConstructor<T> implements WeldInjectionPoint<T, Constructor<T>>
{
private abstract class ForwardingParameterInjectionPointList extends AbstractList<ParameterInjectionPoint<?, ?>>
{
- protected abstract List<? extends WBParameter<?, ?>> delegate();
+ protected abstract List<? extends WeldParameter<?, ?>> delegate();
protected abstract Bean<?> declaringBean();;
@@ -66,15 +66,15 @@
private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
private final Bean<?> declaringBean;
- private final WBConstructor<T> constructor;
+ private final WeldConstructor<T> constructor;
private final boolean delegate;
- public static <T> ConstructorInjectionPoint<T> of(Bean<?> declaringBean, WBConstructor<T> constructor)
+ public static <T> ConstructorInjectionPoint<T> of(Bean<?> declaringBean, WeldConstructor<T> constructor)
{
return new ConstructorInjectionPoint<T>(declaringBean, constructor);
}
- protected ConstructorInjectionPoint(Bean<?> declaringBean, WBConstructor<T> constructor)
+ protected ConstructorInjectionPoint(Bean<?> declaringBean, WeldConstructor<T> constructor)
{
this.declaringBean = declaringBean;
this.constructor = constructor;
@@ -82,7 +82,7 @@
}
@Override
- protected WBConstructor<T> delegate()
+ protected WeldConstructor<T> delegate()
{
return constructor;
}
@@ -125,7 +125,7 @@
@Override
public List<ParameterInjectionPoint<?, ?>> getWBParameters()
{
- final List<? extends WBParameter<?, ?>> delegate = super.getWBParameters();
+ final List<? extends WeldParameter<?, ?>> delegate = super.getWBParameters();
return new ForwardingParameterInjectionPointList()
{
@@ -136,7 +136,7 @@
}
@Override
- protected List<? extends WBParameter<?, ?>> delegate()
+ protected List<? extends WeldParameter<?, ?>> delegate()
{
return delegate;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/injection/FieldInjectionPoint.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -31,24 +31,24 @@
import javax.enterprise.inject.spi.Decorator;
import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.introspector.ForwardingWBField;
-import org.jboss.weld.introspector.WBField;
+import org.jboss.weld.introspector.ForwardingWeldField;
+import org.jboss.weld.introspector.WeldField;
-public class FieldInjectionPoint<T, X> extends ForwardingWBField<T, X> implements WBInjectionPoint<T, Field>
+public class FieldInjectionPoint<T, X> extends ForwardingWeldField<T, X> implements WeldInjectionPoint<T, Field>
{
private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
private final Bean<?> declaringBean;
- private final WBField<T, X> field;
+ private final WeldField<T, X> field;
private final boolean delegate;
- public static <T, X> FieldInjectionPoint<T, X> of(Bean<?> declaringBean, WBField<T, X> field)
+ public static <T, X> FieldInjectionPoint<T, X> of(Bean<?> declaringBean, WeldField<T, X> field)
{
return new FieldInjectionPoint<T, X>(declaringBean, field);
}
- protected FieldInjectionPoint(Bean<?> declaringBean, WBField<T, X> field)
+ protected FieldInjectionPoint(Bean<?> declaringBean, WeldField<T, X> field)
{
this.declaringBean = declaringBean;
this.field = field;
@@ -56,7 +56,7 @@
}
@Override
- protected WBField<T, X> delegate()
+ protected WeldField<T, X> delegate()
{
return field;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -35,17 +35,17 @@
import javax.enterprise.inject.spi.Decorator;
import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.introspector.ForwardingWBMethod;
-import org.jboss.weld.introspector.WBMethod;
-import org.jboss.weld.introspector.WBParameter;
+import org.jboss.weld.introspector.ForwardingWeldMethod;
+import org.jboss.weld.introspector.WeldMethod;
+import org.jboss.weld.introspector.WeldParameter;
-public class MethodInjectionPoint<T, X> extends ForwardingWBMethod<T, X> implements WBInjectionPoint<T, Method>
+public class MethodInjectionPoint<T, X> extends ForwardingWeldMethod<T, X> implements WeldInjectionPoint<T, Method>
{
private abstract class ForwardingParameterInjectionPointList extends AbstractList<ParameterInjectionPoint<?, ?>>
{
- protected abstract List<? extends WBParameter<?, ?>> delegate();
+ protected abstract List<? extends WeldParameter<?, ?>> delegate();
protected abstract Bean<?> declaringBean();;
@@ -66,15 +66,15 @@
private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
private final Bean<?> declaringBean;
- private final WBMethod<T, X> method;
+ private final WeldMethod<T, X> method;
private final boolean delegate;
- public static <T, X> MethodInjectionPoint<T, X> of(Bean<?> declaringBean, WBMethod<T, X> method)
+ public static <T, X> MethodInjectionPoint<T, X> of(Bean<?> declaringBean, WeldMethod<T, X> method)
{
return new MethodInjectionPoint<T, X>(declaringBean, method);
}
- protected MethodInjectionPoint(Bean<?> declaringBean, WBMethod<T, X> method)
+ protected MethodInjectionPoint(Bean<?> declaringBean, WeldMethod<T, X> method)
{
this.declaringBean = declaringBean;
this.method = method;
@@ -82,7 +82,7 @@
}
@Override
- protected WBMethod<T, X> delegate()
+ protected WeldMethod<T, X> delegate()
{
return method;
}
@@ -202,7 +202,7 @@
@Override
public List<ParameterInjectionPoint<?, ?>> getWBParameters()
{
- final List<? extends WBParameter<?, ?>> delegate = super.getWBParameters();
+ final List<? extends WeldParameter<?, ?>> delegate = super.getWBParameters();
return new ForwardingParameterInjectionPointList()
{
@@ -213,7 +213,7 @@
}
@Override
- protected List<? extends WBParameter<?, ?>> delegate()
+ protected List<? extends WeldParameter<?, ?>> delegate()
{
return delegate;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/injection/ParameterInjectionPoint.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -28,24 +28,24 @@
import javax.enterprise.inject.spi.Decorator;
import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.introspector.ForwardingWBParameter;
-import org.jboss.weld.introspector.WBParameter;
+import org.jboss.weld.introspector.ForwardingWeldParameter;
+import org.jboss.weld.introspector.WeldParameter;
-public class ParameterInjectionPoint<T, X> extends ForwardingWBParameter<T, X> implements WBInjectionPoint<T, Object>
+public class ParameterInjectionPoint<T, X> extends ForwardingWeldParameter<T, X> implements WeldInjectionPoint<T, Object>
{
private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
- public static <T, X> ParameterInjectionPoint<T, X> of(Bean<?> declaringBean, WBParameter<T, X> parameter)
+ public static <T, X> ParameterInjectionPoint<T, X> of(Bean<?> declaringBean, WeldParameter<T, X> parameter)
{
return new ParameterInjectionPoint<T, X>(declaringBean, parameter);
}
private final Bean<?> declaringBean;
- private final WBParameter<T, X> parameter;
+ private final WeldParameter<T, X> parameter;
private final boolean delegate;
- private ParameterInjectionPoint(Bean<?> declaringBean, WBParameter<T, X> parameter)
+ private ParameterInjectionPoint(Bean<?> declaringBean, WeldParameter<T, X> parameter)
{
this.declaringBean = declaringBean;
this.parameter = parameter;
@@ -53,7 +53,7 @@
}
@Override
- protected WBParameter<T, X> delegate()
+ protected WeldParameter<T, X> delegate()
{
return parameter;
}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/injection/WBInjectionPoint.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/injection/WBInjectionPoint.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/injection/WBInjectionPoint.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,35 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.injection;
-
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.weld.introspector.WBAnnotated;
-
-public interface WBInjectionPoint<T, S> extends InjectionPoint, WBAnnotated<T, S>
-{
-
- /**
- * Injects an instance
- *
- *
- * @param declaringInstance The instance to inject into
- * @param value The value to inject
- */
- public void inject(Object declaringInstance, Object value);
-
-}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/injection/WeldInjectionPoint.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/injection/WBInjectionPoint.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/injection/WeldInjectionPoint.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/injection/WeldInjectionPoint.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,35 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.injection;
+
+import javax.enterprise.inject.spi.InjectionPoint;
+
+import org.jboss.weld.introspector.WeldAnnotated;
+
+public interface WeldInjectionPoint<T, S> extends InjectionPoint, WeldAnnotated<T, S>
+{
+
+ /**
+ * Injects an instance
+ *
+ *
+ * @param declaringInstance The instance to inject into
+ * @param value The value to inject
+ */
+ public void inject(Object declaringInstance, Object value);
+
+}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/AnnotationStore.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/AnnotationStore.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/AnnotationStore.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -16,7 +16,7 @@
*/
package org.jboss.weld.introspector;
-import static org.jboss.weld.introspector.WBAnnotated.MAPPED_METAANNOTATIONS;
+import static org.jboss.weld.introspector.WeldAnnotated.MAPPED_METAANNOTATIONS;
import java.lang.annotation.Annotation;
import java.lang.reflect.AnnotatedElement;
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBAnnotated.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBAnnotated.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBAnnotated.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,139 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.Set;
-
-/**
- * Provides an abstraction for delegating access to an annotated item
- *
- * @author Pete Muir
- *
- * @param <T>
- * @param <S>
- */
-public abstract class ForwardingWBAnnotated<T, S> extends ForwardingAnnotated<T, S> implements WBAnnotated<T, S>
-{
-
- public Type[] getActualTypeArguments()
- {
- return delegate().getActualTypeArguments();
- }
-
- public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
- {
- return delegate().getMetaAnnotations(metaAnnotationType);
- }
-
- public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
- {
- return delegate().getMetaAnnotationsAsArray(metaAnnotationType);
- }
-
- @Deprecated
- public Set<Annotation> getQualifiers()
- {
- return delegate().getQualifiers();
- }
-
- @Deprecated
- public Annotation[] getBindingsAsArray()
- {
- return delegate().getBindingsAsArray();
- }
-
- public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
- {
- return delegate().getDeclaredMetaAnnotations(metaAnnotationType);
- }
-
- public String getName()
- {
- return delegate().getName();
- }
-
- public Class<T> getJavaClass()
- {
- return delegate().getJavaClass();
- }
-
- public boolean isAssignableFrom(WBAnnotated<?, ?> that)
- {
- return delegate().isAssignableFrom(that);
- }
-
- public boolean isAssignableFrom(Class<?> type, Type[] actualTypeArguments)
- {
- return delegate().isAssignableFrom(type, actualTypeArguments);
- }
-
- public boolean isFinal()
- {
- return delegate().isFinal();
- }
-
- public boolean isStatic()
- {
- return delegate().isStatic();
- }
-
- public boolean isProxyable()
- {
- return delegate().isProxyable();
- }
-
- public boolean isPublic()
- {
- return delegate().isPublic();
- }
-
- public boolean isPrivate()
- {
- return delegate().isPrivate();
- }
-
- public boolean isPackagePrivate()
- {
- return delegate().isPackagePrivate();
- }
-
- public Package getPackage()
- {
- return delegate().getPackage();
- }
-
- @Override
- protected abstract WBAnnotated<T, S> delegate();
-
- public boolean isDeclaredAnnotationPresent(Class<? extends Annotation> annotationType)
- {
- return delegate().isDeclaredAnnotationPresent(annotationType);
- }
-
- public Set<Type> getInterfaceOnlyFlattenedTypeHierarchy()
- {
- return delegate().getInterfaceOnlyFlattenedTypeHierarchy();
- }
-
- public boolean isParameterizedType()
- {
- return delegate().isParameterizedType();
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBAnnotation.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBAnnotation.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBAnnotation.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.annotation.Annotation;
-import java.util.Set;
-
-public abstract class ForwardingWBAnnotation<T extends Annotation> extends ForwardingWBClass<T> implements WBAnnotation<T>
-{
-
- @Override
- protected abstract WBAnnotation<T> delegate();
-
- public Set<WBMethod<?, ?>> getAnnotatedMembers(Class<? extends Annotation> annotationType)
- {
- return delegate().getAnnotatedMembers(annotationType);
- }
-
- public Set<WBMethod<?, ?>> getMembers()
- {
- return delegate().getMembers();
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBClass.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBClass.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBClass.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,172 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.Set;
-
-public abstract class ForwardingWBClass<T> extends ForwardingWBAnnotated<T, Class<T>> implements WBClass<T>
-{
-
- @Override
- protected abstract WBClass<T> delegate();
-
- public Set<WBConstructor<T>> getAnnotatedWBConstructors(Class<? extends Annotation> annotationType)
- {
- return delegate().getAnnotatedWBConstructors(annotationType);
- }
-
- public Set<WBField<?, ?>> getAnnotatedWBFields(Class<? extends Annotation> annotationType)
- {
- return delegate().getAnnotatedWBFields(annotationType);
- }
-
- public Set<WBMethod<?, ?>> getAnnotatedWBMethods(Class<? extends Annotation> annotationType)
- {
- return delegate().getAnnotatedWBMethods(annotationType);
- }
-
- public WBConstructor<T> getNoArgsWBConstructor()
- {
- return delegate().getNoArgsWBConstructor();
- }
-
- public Set<WBConstructor<T>> getWBConstructors()
- {
- return delegate().getWBConstructors();
- }
-
- public Set<WBMethod<?, ?>> getWBMethods()
- {
- return delegate().getWBMethods();
- }
-
- public Set<WBField<?, T>> getDeclaredAnnotatedWBFields(Class<? extends Annotation> annotationType)
- {
- return delegate().getDeclaredAnnotatedWBFields(annotationType);
- }
-
- public Set<WBMethod<?, T>> getDeclaredAnnotatedWBMethods(Class<? extends Annotation> annotationType)
- {
- return delegate().getDeclaredAnnotatedWBMethods(annotationType);
- }
-
- public Set<WBMethod<?, T>> getDeclaredWBMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
- {
- return delegate().getDeclaredWBMethodsWithAnnotatedParameters(annotationType);
- }
-
- public Set<WBField<?, ?>> getWBFields()
- {
- return delegate().getWBFields();
- }
-
- public Set<WBField<?, ?>> getMetaAnnotatedWBFields(Class<? extends Annotation> metaAnnotationType)
- {
- return delegate().getMetaAnnotatedWBFields(metaAnnotationType);
- }
-
- @Deprecated
- public WBMethod<?, ?> getWBMethod(Method method)
- {
- return delegate().getWBMethod(method);
- }
-
- public <M> WBMethod<M, ?> getWBMethod(MethodSignature signature)
- {
- return delegate().getWBMethod(signature);
- }
-
- public Set<WBMethod<?, ?>> getWBMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
- {
- return delegate().getWBMethodsWithAnnotatedParameters(annotationType);
- }
-
- public Set<WBConstructor<?>> getWBConstructorsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
- {
- return delegate().getWBConstructorsWithAnnotatedParameters(annotationType);
- }
-
- public WBClass<?> getWBSuperclass()
- {
- return delegate().getWBSuperclass();
- }
-
- public boolean isNonStaticMemberClass()
- {
- return delegate().isNonStaticMemberClass();
- }
-
- @Override
- public boolean isParameterizedType()
- {
- return delegate().isParameterizedType();
- }
-
- public boolean isAbstract()
- {
- return delegate().isAbstract();
- }
-
- public boolean isEnum()
- {
- return delegate().isEnum();
- }
-
- @Deprecated
- public WBMethod<?, ?> getDeclaredWBMethod(Method method)
- {
- return delegate().getDeclaredWBMethod(method);
- }
-
- public <F> WBField<F, ?> getDeclaredWBField(String fieldName, WBClass<F> expectedType)
- {
- return delegate().getDeclaredWBField(fieldName, expectedType);
- }
-
- public <M> WBMethod<M, ?> getDeclaredWBMethod(MethodSignature signature, WBClass<M> expectedReturnType)
- {
- return delegate().getDeclaredWBMethod(signature, expectedReturnType);
- }
-
- public WBConstructor<T> getDeclaredWBConstructor(ConstructorSignature signature)
- {
- return delegate().getDeclaredWBConstructor(signature);
- }
-
- public <U> WBClass<? extends U> asWBSubclass(WBClass<U> clazz)
- {
- return delegate().asWBSubclass(clazz);
- }
-
- public <S> S cast(Object object)
- {
- return delegate().<S>cast(object);
- }
-
- public boolean isEquivalent(Class<?> clazz)
- {
- return delegate().isEquivalent(clazz);
- }
-
- public String getSimpleName()
- {
- return delegate().getSimpleName();
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBConstructor.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBConstructor.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBConstructor.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,62 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.List;
-
-import javax.enterprise.inject.spi.AnnotatedParameter;
-
-public abstract class ForwardingWBConstructor<T> extends ForwardingWBMember<T, T, Constructor<T>> implements WBConstructor<T>
-{
-
- @Override
- protected abstract WBConstructor<T> delegate();
-
- public List<WBParameter<?, ?>> getAnnotatedWBParameters(Class<? extends Annotation> annotationType)
- {
- return delegate().getAnnotatedWBParameters(annotationType);
- }
-
- public WBClass<T> getDeclaringType()
- {
- return delegate().getDeclaringType();
- }
-
- public List<? extends WBParameter<?, ?>> getWBParameters()
- {
- return delegate().getWBParameters();
- }
-
- public T newInstance(Object... parameters) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
- {
- return delegate().newInstance(parameters);
- }
-
- public ConstructorSignature getSignature()
- {
- return delegate().getSignature();
- }
-
- public List<AnnotatedParameter<T>> getParameters()
- {
- return delegate().getParameters();
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBField.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBField.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBField.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.reflect.Field;
-
-public abstract class ForwardingWBField<T, X> extends ForwardingWBMember<T, X, Field> implements WBField<T, X>
-{
-
- @Override
- protected abstract WBField<T, X> delegate();
-
- public T get(Object instance)
- {
- return delegate().get(instance);
- }
-
- public WBClass<X> getDeclaringType()
- {
- return delegate().getDeclaringType();
- }
-
- public String getPropertyName()
- {
- return delegate().getPropertyName();
- }
-
- public void set(Object declaringInstance, Object value) throws IllegalArgumentException, IllegalAccessException
- {
- delegate().set(declaringInstance, value);
- }
-
- public boolean isTransient()
- {
- return delegate().isTransient();
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBMember.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBMember.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBMember.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.reflect.Member;
-
-public abstract class ForwardingWBMember<T, X, S extends Member> extends ForwardingWBAnnotated<T, S> implements WBMember<T, X, S>
-{
-
- @Override
- protected abstract WBMember<T, X, S> delegate();
-
- public S getJavaMember()
- {
- return delegate().getJavaMember();
- }
-
- public WBClass<X> getDeclaringType()
- {
- return delegate().getDeclaringType();
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBMethod.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBMethod.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBMethod.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,87 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.List;
-
-import javax.enterprise.inject.spi.AnnotatedParameter;
-
-public abstract class ForwardingWBMethod<T, X> extends ForwardingWBMember<T,X, Method> implements WBMethod<T, X>
-{
-
- @Override
- protected abstract WBMethod<T, X> delegate();
-
- public Method getAnnotatedMethod()
- {
- return delegate().getAnnotatedMethod();
- }
-
- public List<WBParameter<?, ?>> getAnnotatedParameters(Class<? extends Annotation> metaAnnotationType)
- {
- return delegate().getAnnotatedWBParameters(metaAnnotationType);
- }
-
- public Class<?>[] getParameterTypesAsArray()
- {
- return delegate().getParameterTypesAsArray();
- }
-
- public List<? extends WBParameter<?, ?>> getWBParameters()
- {
- return delegate().getWBParameters();
- }
-
- public String getPropertyName()
- {
- return delegate().getPropertyName();
- }
-
- public T invoke(Object instance, Object... parameters) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
- {
- return delegate().invoke(instance, parameters);
- }
-
- public T invokeOnInstance(Object instance, Object... parameters) throws IllegalArgumentException, SecurityException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
- {
- return delegate().invokeOnInstance(instance, parameters);
- }
-
- public boolean isEquivalent(Method method)
- {
- return delegate().isEquivalent(method);
- }
-
- public MethodSignature getSignature()
- {
- return delegate().getSignature();
- }
-
- public List<WBParameter<?, ?>> getAnnotatedWBParameters(Class<? extends Annotation> metaAnnotationType)
- {
- return delegate().getAnnotatedWBParameters(metaAnnotationType);
- }
-
- public List<AnnotatedParameter<X>> getParameters()
- {
- return delegate().getParameters();
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBParameter.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBParameter.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBParameter.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,38 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import javax.enterprise.inject.spi.AnnotatedCallable;
-
-
-public abstract class ForwardingWBParameter<T, X> extends ForwardingWBAnnotated<T, Object> implements WBParameter<T, X>
-{
-
- @Override
- protected abstract WBParameter<T, X> delegate();
-
- public AnnotatedCallable<X> getDeclaringCallable()
- {
- return delegate().getDeclaringCallable();
- }
-
- public int getPosition()
- {
- return delegate().getPosition();
- }
-
-}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldAnnotated.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBAnnotated.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldAnnotated.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldAnnotated.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,139 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Set;
+
+/**
+ * Provides an abstraction for delegating access to an annotated item
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ * @param <S>
+ */
+public abstract class ForwardingWeldAnnotated<T, S> extends ForwardingAnnotated<T, S> implements WeldAnnotated<T, S>
+{
+
+ public Type[] getActualTypeArguments()
+ {
+ return delegate().getActualTypeArguments();
+ }
+
+ public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ {
+ return delegate().getMetaAnnotations(metaAnnotationType);
+ }
+
+ public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
+ {
+ return delegate().getMetaAnnotationsAsArray(metaAnnotationType);
+ }
+
+ @Deprecated
+ public Set<Annotation> getQualifiers()
+ {
+ return delegate().getQualifiers();
+ }
+
+ @Deprecated
+ public Annotation[] getBindingsAsArray()
+ {
+ return delegate().getBindingsAsArray();
+ }
+
+ public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ {
+ return delegate().getDeclaredMetaAnnotations(metaAnnotationType);
+ }
+
+ public String getName()
+ {
+ return delegate().getName();
+ }
+
+ public Class<T> getJavaClass()
+ {
+ return delegate().getJavaClass();
+ }
+
+ public boolean isAssignableFrom(WeldAnnotated<?, ?> that)
+ {
+ return delegate().isAssignableFrom(that);
+ }
+
+ public boolean isAssignableFrom(Class<?> type, Type[] actualTypeArguments)
+ {
+ return delegate().isAssignableFrom(type, actualTypeArguments);
+ }
+
+ public boolean isFinal()
+ {
+ return delegate().isFinal();
+ }
+
+ public boolean isStatic()
+ {
+ return delegate().isStatic();
+ }
+
+ public boolean isProxyable()
+ {
+ return delegate().isProxyable();
+ }
+
+ public boolean isPublic()
+ {
+ return delegate().isPublic();
+ }
+
+ public boolean isPrivate()
+ {
+ return delegate().isPrivate();
+ }
+
+ public boolean isPackagePrivate()
+ {
+ return delegate().isPackagePrivate();
+ }
+
+ public Package getPackage()
+ {
+ return delegate().getPackage();
+ }
+
+ @Override
+ protected abstract WeldAnnotated<T, S> delegate();
+
+ public boolean isDeclaredAnnotationPresent(Class<? extends Annotation> annotationType)
+ {
+ return delegate().isDeclaredAnnotationPresent(annotationType);
+ }
+
+ public Set<Type> getInterfaceOnlyFlattenedTypeHierarchy()
+ {
+ return delegate().getInterfaceOnlyFlattenedTypeHierarchy();
+ }
+
+ public boolean isParameterizedType()
+ {
+ return delegate().isParameterizedType();
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldAnnotation.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBAnnotation.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldAnnotation.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldAnnotation.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+public abstract class ForwardingWeldAnnotation<T extends Annotation> extends ForwardingWeldClass<T> implements WeldAnnotation<T>
+{
+
+ @Override
+ protected abstract WeldAnnotation<T> delegate();
+
+ public Set<WeldMethod<?, ?>> getAnnotatedMembers(Class<? extends Annotation> annotationType)
+ {
+ return delegate().getAnnotatedMembers(annotationType);
+ }
+
+ public Set<WeldMethod<?, ?>> getMembers()
+ {
+ return delegate().getMembers();
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldClass.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBClass.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldClass.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldClass.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,172 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.Set;
+
+public abstract class ForwardingWeldClass<T> extends ForwardingWeldAnnotated<T, Class<T>> implements WeldClass<T>
+{
+
+ @Override
+ protected abstract WeldClass<T> delegate();
+
+ public Set<WeldConstructor<T>> getAnnotatedWeldConstructors(Class<? extends Annotation> annotationType)
+ {
+ return delegate().getAnnotatedWeldConstructors(annotationType);
+ }
+
+ public Set<WeldField<?, ?>> getAnnotatedWeldFields(Class<? extends Annotation> annotationType)
+ {
+ return delegate().getAnnotatedWeldFields(annotationType);
+ }
+
+ public Set<WeldMethod<?, ?>> getAnnotatedWeldMethods(Class<? extends Annotation> annotationType)
+ {
+ return delegate().getAnnotatedWeldMethods(annotationType);
+ }
+
+ public WeldConstructor<T> getNoArgsWeldConstructor()
+ {
+ return delegate().getNoArgsWeldConstructor();
+ }
+
+ public Set<WeldConstructor<T>> getWeldConstructors()
+ {
+ return delegate().getWeldConstructors();
+ }
+
+ public Set<WeldMethod<?, ?>> getWeldMethods()
+ {
+ return delegate().getWeldMethods();
+ }
+
+ public Set<WeldField<?, T>> getDeclaredAnnotatedWeldFields(Class<? extends Annotation> annotationType)
+ {
+ return delegate().getDeclaredAnnotatedWeldFields(annotationType);
+ }
+
+ public Set<WeldMethod<?, T>> getDeclaredAnnotatedWeldMethods(Class<? extends Annotation> annotationType)
+ {
+ return delegate().getDeclaredAnnotatedWeldMethods(annotationType);
+ }
+
+ public Set<WeldMethod<?, T>> getDeclaredWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
+ {
+ return delegate().getDeclaredWeldMethodsWithAnnotatedParameters(annotationType);
+ }
+
+ public Set<WeldField<?, ?>> getWeldFields()
+ {
+ return delegate().getWeldFields();
+ }
+
+ public Set<WeldField<?, ?>> getMetaAnnotatedWeldFields(Class<? extends Annotation> metaAnnotationType)
+ {
+ return delegate().getMetaAnnotatedWeldFields(metaAnnotationType);
+ }
+
+ @Deprecated
+ public WeldMethod<?, ?> getWeldMethod(Method method)
+ {
+ return delegate().getWeldMethod(method);
+ }
+
+ public <M> WeldMethod<M, ?> getWBMethod(MethodSignature signature)
+ {
+ return delegate().getWBMethod(signature);
+ }
+
+ public Set<WeldMethod<?, ?>> getWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
+ {
+ return delegate().getWeldMethodsWithAnnotatedParameters(annotationType);
+ }
+
+ public Set<WeldConstructor<?>> getWeldConstructorsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
+ {
+ return delegate().getWeldConstructorsWithAnnotatedParameters(annotationType);
+ }
+
+ public WeldClass<?> getWeldSuperclass()
+ {
+ return delegate().getWeldSuperclass();
+ }
+
+ public boolean isNonStaticMemberClass()
+ {
+ return delegate().isNonStaticMemberClass();
+ }
+
+ @Override
+ public boolean isParameterizedType()
+ {
+ return delegate().isParameterizedType();
+ }
+
+ public boolean isAbstract()
+ {
+ return delegate().isAbstract();
+ }
+
+ public boolean isEnum()
+ {
+ return delegate().isEnum();
+ }
+
+ @Deprecated
+ public WeldMethod<?, ?> getDeclaredWeldMethod(Method method)
+ {
+ return delegate().getDeclaredWeldMethod(method);
+ }
+
+ public <F> WeldField<F, ?> getDeclaredWeldField(String fieldName, WeldClass<F> expectedType)
+ {
+ return delegate().getDeclaredWeldField(fieldName, expectedType);
+ }
+
+ public <M> WeldMethod<M, ?> getDeclaredWeldMethod(MethodSignature signature, WeldClass<M> expectedReturnType)
+ {
+ return delegate().getDeclaredWeldMethod(signature, expectedReturnType);
+ }
+
+ public WeldConstructor<T> getDeclaredWeldConstructor(ConstructorSignature signature)
+ {
+ return delegate().getDeclaredWeldConstructor(signature);
+ }
+
+ public <U> WeldClass<? extends U> asWeldSubclass(WeldClass<U> clazz)
+ {
+ return delegate().asWeldSubclass(clazz);
+ }
+
+ public <S> S cast(Object object)
+ {
+ return delegate().<S>cast(object);
+ }
+
+ public boolean isEquivalent(Class<?> clazz)
+ {
+ return delegate().isEquivalent(clazz);
+ }
+
+ public String getSimpleName()
+ {
+ return delegate().getSimpleName();
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldConstructor.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBConstructor.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldConstructor.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldConstructor.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,62 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.List;
+
+import javax.enterprise.inject.spi.AnnotatedParameter;
+
+public abstract class ForwardingWeldConstructor<T> extends ForwardingWeldMember<T, T, Constructor<T>> implements WeldConstructor<T>
+{
+
+ @Override
+ protected abstract WeldConstructor<T> delegate();
+
+ public List<WeldParameter<?, ?>> getAnnotatedWBParameters(Class<? extends Annotation> annotationType)
+ {
+ return delegate().getAnnotatedWBParameters(annotationType);
+ }
+
+ public WeldClass<T> getDeclaringType()
+ {
+ return delegate().getDeclaringType();
+ }
+
+ public List<? extends WeldParameter<?, ?>> getWBParameters()
+ {
+ return delegate().getWBParameters();
+ }
+
+ public T newInstance(Object... parameters) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
+ {
+ return delegate().newInstance(parameters);
+ }
+
+ public ConstructorSignature getSignature()
+ {
+ return delegate().getSignature();
+ }
+
+ public List<AnnotatedParameter<T>> getParameters()
+ {
+ return delegate().getParameters();
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldField.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBField.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldField.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldField.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,52 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.reflect.Field;
+
+public abstract class ForwardingWeldField<T, X> extends ForwardingWeldMember<T, X, Field> implements WeldField<T, X>
+{
+
+ @Override
+ protected abstract WeldField<T, X> delegate();
+
+ public T get(Object instance)
+ {
+ return delegate().get(instance);
+ }
+
+ public WeldClass<X> getDeclaringType()
+ {
+ return delegate().getDeclaringType();
+ }
+
+ public String getPropertyName()
+ {
+ return delegate().getPropertyName();
+ }
+
+ public void set(Object declaringInstance, Object value) throws IllegalArgumentException, IllegalAccessException
+ {
+ delegate().set(declaringInstance, value);
+ }
+
+ public boolean isTransient()
+ {
+ return delegate().isTransient();
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldMember.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBMember.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldMember.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldMember.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.reflect.Member;
+
+public abstract class ForwardingWeldMember<T, X, S extends Member> extends ForwardingWeldAnnotated<T, S> implements WeldMember<T, X, S>
+{
+
+ @Override
+ protected abstract WeldMember<T, X, S> delegate();
+
+ public S getJavaMember()
+ {
+ return delegate().getJavaMember();
+ }
+
+ public WeldClass<X> getDeclaringType()
+ {
+ return delegate().getDeclaringType();
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldMethod.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBMethod.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldMethod.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldMethod.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,87 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.List;
+
+import javax.enterprise.inject.spi.AnnotatedParameter;
+
+public abstract class ForwardingWeldMethod<T, X> extends ForwardingWeldMember<T,X, Method> implements WeldMethod<T, X>
+{
+
+ @Override
+ protected abstract WeldMethod<T, X> delegate();
+
+ public Method getAnnotatedMethod()
+ {
+ return delegate().getAnnotatedMethod();
+ }
+
+ public List<WeldParameter<?, ?>> getAnnotatedParameters(Class<? extends Annotation> metaAnnotationType)
+ {
+ return delegate().getAnnotatedWBParameters(metaAnnotationType);
+ }
+
+ public Class<?>[] getParameterTypesAsArray()
+ {
+ return delegate().getParameterTypesAsArray();
+ }
+
+ public List<? extends WeldParameter<?, ?>> getWBParameters()
+ {
+ return delegate().getWBParameters();
+ }
+
+ public String getPropertyName()
+ {
+ return delegate().getPropertyName();
+ }
+
+ public T invoke(Object instance, Object... parameters) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
+ {
+ return delegate().invoke(instance, parameters);
+ }
+
+ public T invokeOnInstance(Object instance, Object... parameters) throws IllegalArgumentException, SecurityException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
+ {
+ return delegate().invokeOnInstance(instance, parameters);
+ }
+
+ public boolean isEquivalent(Method method)
+ {
+ return delegate().isEquivalent(method);
+ }
+
+ public MethodSignature getSignature()
+ {
+ return delegate().getSignature();
+ }
+
+ public List<WeldParameter<?, ?>> getAnnotatedWBParameters(Class<? extends Annotation> metaAnnotationType)
+ {
+ return delegate().getAnnotatedWBParameters(metaAnnotationType);
+ }
+
+ public List<AnnotatedParameter<X>> getParameters()
+ {
+ return delegate().getParameters();
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldParameter.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWBParameter.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldParameter.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/ForwardingWeldParameter.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import javax.enterprise.inject.spi.AnnotatedCallable;
+
+
+public abstract class ForwardingWeldParameter<T, X> extends ForwardingWeldAnnotated<T, Object> implements WeldParameter<T, X>
+{
+
+ @Override
+ protected abstract WeldParameter<T, X> delegate();
+
+ public AnnotatedCallable<X> getDeclaringCallable()
+ {
+ return delegate().getDeclaringCallable();
+ }
+
+ public int getPosition()
+ {
+ return delegate().getPosition();
+ }
+
+}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBAnnotated.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBAnnotated.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBAnnotated.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,198 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.context.NormalScope;
-import javax.enterprise.inject.spi.Annotated;
-import javax.enterprise.inject.stereotype.Stereotype;
-import javax.inject.Qualifier;
-import javax.inject.Scope;
-import javax.interceptor.InterceptorBinding;
-
-/**
- * AnnotatedItem provides a uniform access to the annotations on an annotated
- * item defined either in Java or XML
- *
- * @author Pete Muir
- *
- */
-public interface WBAnnotated<T, S> extends Annotated
-{
-
- // The set of meta-annotations to map
- @SuppressWarnings("unchecked")
- public static final Set<Class<? extends Annotation>> MAPPED_METAANNOTATIONS = new HashSet<Class<? extends Annotation>>(Arrays.asList(Qualifier.class, Stereotype.class, Scope.class, NormalScope.class, InterceptorBinding.class));
-
- /**
- * Gets all annotations which are annotated with the given meta annotation
- * type
- *
- * @param The meta annotation to match
- * @return A set of matching meta-annotations. Returns an empty set if there
- * are no matches.
- */
- public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType);
-
- /**
- * Gets all annotations which are declared on this annotated item with the
- * given meta annotation type
- *
- * @param The meta annotation to match
- * @return A set of matching meta-annotations. Returns an empty set if there
- * are no matches.
- */
- public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType);
-
- /**
- * Gets all annotations which are annotated with the given meta annotation
- * type
- *
- * @param The meta annotation to match
- * @return An array of matching meta-annotations. Returns an empty array if
- * there are no matches.
- */
- public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType);
-
- /**
- * Gets the binding types for this element
- *
- * @returns A set of binding types present on the type. Returns an empty set
- * if there are no matches.
- * @deprecated This reflection type should not know about JSR-299 binding
- * types
- */
- @Deprecated
- public Set<Annotation> getQualifiers();
-
- /**
- * Gets the binding types for this element
- *
- * @returns An array of binding types present on the type. Returns an empty
- * array if there are no matches.
- * @deprecated This reflection type should not know about JSR-299 binding
- * types
- */
- @Deprecated
- public Annotation[] getBindingsAsArray();
-
- /**
- * Get the type hierarchy of any interfaces implemented by this class.
- *
- * Interface hierarchies from super classes are not included.
- *
- * The returned types should have any type parameters resolved to their
- * actual types.
- *
- * @return the type hierarchy
- */
- public Set<Type> getInterfaceOnlyFlattenedTypeHierarchy();
-
- /**
- * Indicates if an annotation type specified is present
- *
- * @param annotationType The annotation to match
- * @return True if present, false if not
- */
- public boolean isDeclaredAnnotationPresent(Class<? extends Annotation> annotationType);
-
- /**
- * Gets the type of the element
- *
- * @return The type of the element
- */
- public Class<T> getJavaClass();
-
- /**
- * Extends Java Class assignability such that actual type parameters are also
- * considered
- *
- * @param that The other item to check assignability against
- * @return True if assignable, false otherwise.
- */
- public boolean isAssignableFrom(WBAnnotated<?, ?> that);
-
- /**
- * Extends Java Class assignability such that actual type parameters are also
- * considered
- *
- * @param type The type to compare against
- * @param actualTypeArguments The type arguments
- * @return True is assignable, false otherwise
- */
- public boolean isAssignableFrom(Class<?> type, Type[] actualTypeArguments);
-
- /**
- * Gets the actual type arguments for any parameterized types that this
- * AnnotatedItem represents.
- *
- * @return An array of type arguments
- */
- public Type[] getActualTypeArguments();
-
- /**
- * Indicates if this AnnotatedItem represents a static element
- *
- * @return True if static, false otherwise
- */
- public boolean isStatic();
-
- /**
- * Indicates if this AnnotatedItem represents a final element
- *
- * @return True if final, false otherwise
- */
- public boolean isFinal();
-
- /**
- * Indicates if this AnnotatedItem can be proxyed
- *
- * @return True if proxyable, false otherwise
- */
- public boolean isProxyable();
-
- /**
- * Indicates if this annotated item is public
- *
- * @return if public, returns true
- */
- public boolean isPublic();
-
- public boolean isPrivate();
-
- public boolean isPackagePrivate();
-
- public Package getPackage();
-
- /**
- * Gets the name of this AnnotatedItem
- *
- * If it is not possible to determine the name of the underling element, a
- * IllegalArgumentException is thrown
- *
- * @return The name
- */
- public String getName();
-
- public boolean isParameterizedType();
-
-}
\ No newline at end of file
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBAnnotation.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBAnnotation.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBAnnotation.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.annotation.Annotation;
-import java.util.Set;
-
-/**
- * Represents a meta annotation
- *
- * @author Pete Muir
- *
- */
-public interface WBAnnotation<T extends Annotation> extends WBClass<T>
-{
- /**
- * Gets all members
- *
- * @return A set of abstracted members
- */
- public Set<WBMethod<?, ?>> getMembers();
-
- /**
- * Gets all the members annotated with annotationType
- *
- * @param annotationType The annotation type to match
- * @return A set of abstracted members with the annotation type
- */
- public Set<WBMethod<?, ?>> getAnnotatedMembers(Class<? extends Annotation> annotationType);
-
- /**
- * Get an annotation member by name
- *
- * @param memberName
- * @return
- */
- public <A> WBMethod<A, ?> getMember(String memberName, WBClass<A> expectedType);
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBCallable.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBCallable.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBCallable.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,49 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Member;
-import java.util.List;
-
-import javax.enterprise.inject.spi.AnnotatedCallable;
-
-/**
- * @author pmuir
- *
- */
-public interface WBCallable<T, X, S extends Member> extends WBMember<T, X, S>, AnnotatedCallable<X>
-{
-
- /**
- * Gets the abstracted parameters of the method
- *
- * @return A list of parameters. Returns an empty list if no parameters are
- * present.
- */
- public List<? extends WBParameter<?, ?>> getWBParameters();
-
- /**
- * Gets the list of annotated parameters for a given annotation
- *
- * @param metaAnnotationType The annotation to match
- * @return A set of matching parameter abstractions. Returns an empty list if
- * there are no matches.
- */
- public List<WBParameter<?, ?>> getAnnotatedWBParameters(Class<? extends Annotation> metaAnnotationType);
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBClass.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBClass.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBClass.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,235 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.AnnotatedType;
-
-/**
- * Represents a Class
- *
- * @author Pete Muir
- *
- */
-public interface WBClass<T> extends WBAnnotated<T, Class<T>>, AnnotatedType<T>
-{
-
- /**
- * Gets all fields on the type
- *
- * @return A set of abstracted fields
- */
- public Set<WBField<?, ?>> getWBFields();
-
- /**
- * Gets all fields on the type
- *
- * @return A set of abstracted fields
- */
- public Set<WBMethod<?, ?>> getWBMethods();
-
- /**
- * Gets all fields on the type
- *
- * @return A set of abstracted fields
- */
- public Set<WBMethod<?, ?>> getDeclaredWBMethods();
-
- /**
- * Get a field by name
- *
- * @param <F> the expected type of the field
- * @param fieldName the field name
- * @param expectedType the expected type of the field
- * @return the field
- */
- public <F> WBField<F, ?> getDeclaredWBField(String fieldName, WBClass<F> expectedType);
-
- /**
- * Gets all fields which are annotated with the given annotation type on this
- * class and all super classes
- *
- * @param annotationType The annotation to match
- * @return A set of abstracted fields with the given annotation. Returns an
- * empty set if there are no matches
- */
- public Set<WBField<?, ?>> getAnnotatedWBFields(Class<? extends Annotation> annotationType);
-
- /**
- * Gets all fields which are annotated with the given annotation type on this
- * class only.
- *
- * @param annotationType The annotation to match
- * @return A set of abstracted fields with the given annotation. Returns an
- * empty set if there are no matches
- */
- public Set<WBField<?, T>> getDeclaredAnnotatedWBFields(Class<? extends Annotation> annotationType);
-
- /**
- * Gets all fields which are meta-annotated with metaAnnotationType
- *
- * @param metaAnnotationType The meta annotation to match
- * @return A set of abstracted fields with the given meta-annotation. Returns
- * an empty set if there are no matches
- */
- public Set<WBField<?, ?>> getMetaAnnotatedWBFields(Class<? extends Annotation> metaAnnotationType);
-
- /**
- * Gets all constructors which are annotated with annotationType
- *
- * @param annotationType The annotation type to match
- * @return A set of abstracted fields with the given annotation. Returns an
- * empty set if there are no matches
- */
- public Set<WBConstructor<T>> getAnnotatedWBConstructors(Class<? extends Annotation> annotationType);
-
- /**
- * Gets all constructors
- *
- * @return A set of abstracted constructors
- */
- public Set<WBConstructor<T>> getWBConstructors();
-
- /**
- * Gets the no-args constructor
- *
- * @return The no-args constructor, or null if not defined
- */
- public WBConstructor<T> getNoArgsWBConstructor();
-
- /**
- * Get the constructor which matches the argument list provided
- *
- * @param parameterTypes the parameters of the constructor
- * @return the matching constructor, or null if not defined
- */
- public WBConstructor<T> getDeclaredWBConstructor(ConstructorSignature signature);
-
- /**
- * Gets all methods annotated with annotationType
- *
- * @param annotationType The annotation to match
- * @return A set of abstracted methods with the given annotation. Returns an
- * empty set if there are no matches
- */
- public Set<WBMethod<?, ?>> getAnnotatedWBMethods(Class<? extends Annotation> annotationType);
-
- /**
- * Gets all methods annotated with annotationType
- *
- * @param annotationType The annotation to match
- * @return A set of abstracted methods with the given annotation. Returns an
- * empty set if there are no matches
- */
- public Set<WBMethod<?, T>> getDeclaredAnnotatedWBMethods(Class<? extends Annotation> annotationType);
-
- /**
- * Find the annotated method for a given methodDescriptor
- *
- * @param methodDescriptor
- * @return
- *
- */
- public WBMethod<?, ?> getWBMethod(Method method);
-
- /**
- * Get a method by name
- *
- * @param <M> the expected return type
- * @param signature the name of the method
- * @param expectedReturnType the expected return type
- * @return the method, or null if it doesn't exist
- */
- public <M> WBMethod<M, ?> getDeclaredWBMethod(MethodSignature signature, WBClass<M> expectedReturnType);
-
- /**
- * Get a method by name
- *
- * @param <M> the expected return type
- * @param signature the name of the method
- * @return the method, or null if it doesn't exist
- */
- public <M> WBMethod<M, ?> getWBMethod(MethodSignature signature);
-
- // TODO Replace with AnnotatedMethod variant
- @Deprecated
- public WBMethod<?, ?> getDeclaredWBMethod(Method method);
-
- /**
- * Gets all with parameters annotated with annotationType
- *
- * @param annotationType The annotation to match
- * @return A set of abstracted methods with the given annotation. Returns an
- * empty set if there are no matches
- */
- public Set<WBMethod<?, ?>> getWBMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType);
-
- /**
- * Gets all with constructors annotated with annotationType
- *
- * @param annotationType The annotation to match
- * @return A set of abstracted constructors with the given annotation. Returns an
- * empty set if there are no matches
- */
- public Set<WBConstructor<?>> getWBConstructorsWithAnnotatedParameters(Class<? extends Annotation> annotationType);
-
- /**
- * Gets all with parameters annotated with annotationType
- *
- * @param annotationType The annotation to match
- * @return A set of abstracted methods with the given annotation. Returns an
- * empty set if there are no matches
- */
- public Set<WBMethod<?, T>> getDeclaredWBMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType);
-
- /**
- * Gets the superclass.
- *
- * @return The abstracted superclass, null if there is no superclass
- */
- public WBClass<?> getWBSuperclass();
-
- /**
- * Determine if this is a non-static member class
- *
- * @return true if this is a non-static member
- */
- public boolean isNonStaticMemberClass();
-
- public boolean isParameterizedType();
-
- public boolean isAbstract();
-
- public boolean isEnum();
-
- public <S> S cast(Object object);
-
- public <U> WBClass<? extends U> asWBSubclass(WBClass<U> clazz);
-
- /**
- * Check if this is equivalent to a java class
- * @param clazz The Java class
- * @return true if equivalent
- */
- public boolean isEquivalent(Class<?> clazz);
-
- public String getSimpleName();
-
-}
\ No newline at end of file
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBConstructor.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBConstructor.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBConstructor.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,50 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.decorator.Decorates;
-import javax.enterprise.inject.spi.AnnotatedConstructor;
-
-/**
- * Represents a Class Constructor
- *
- * @author Pete Muir
- *
- */
-public interface WBConstructor<T> extends WBCallable<T, T, Constructor<T>>, AnnotatedConstructor<T>
-{
-
- @SuppressWarnings("unchecked")
- public static final Set<Class<? extends Annotation>> MAPPED_PARAMETER_ANNOTATIONS = new HashSet<Class<? extends Annotation>>(Arrays.asList(Decorates.class));
-
- /**
- * Creates a new instance of the class, using this constructor
- *
- * @return The created instance
- */
- public T newInstance(Object... parameters) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException;
-
- public ConstructorSignature getSignature();
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBField.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBField.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBField.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.reflect.Field;
-
-import javax.enterprise.inject.spi.AnnotatedField;
-
-/**
- * AnnotatedField provides a uniform access to the annotations on an annotated
- * field
- *
- * @author Pete Muir
- *
- */
-public interface WBField<T, X> extends WBMember<T, X, Field>, AnnotatedField<X>
-{
-
- /**
- * Injects an instance
- *
- *
- * @param declaringInstance The instance to inject into
- * @param value The value to inject
- */
- public void set(Object declaringInstance, Object value) throws IllegalArgumentException, IllegalAccessException;
-
- public T get(Object instance);
-
- /**
- * Gets the property name of the field
- *
- * @return The name
- */
- public String getPropertyName();
-
- public boolean isTransient();
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMember.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMember.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMember.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.reflect.Member;
-
-import javax.enterprise.inject.spi.AnnotatedMember;
-/**
- * AnnotedMember provides enhanced access to an annotated member
- *
- * @author Pete Muir
- *
- */
-public interface WBMember<T, X, S extends Member> extends WBAnnotated<T, S>, AnnotatedMember<X>
-{
-
- public S getJavaMember();
-
- /**
- * Gets an abstraction of the declaring class
- *
- * @return The declaring class
- */
- public WBClass<X> getDeclaringType();
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMethod.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMethod.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMethod.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,85 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.util.Arrays;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.event.Observes;
-import javax.enterprise.inject.Disposes;
-import javax.enterprise.inject.spi.AnnotatedMethod;
-
-/**
- * AnnotatedType provides a uniform access to the annotations on an annotated
- * class defined either in Java or XML
- *
- * @author Pete Muir
- *
- */
-public interface WBMethod<T, X> extends WBCallable<T, X, Method>, AnnotatedMethod<X>
-{
- @SuppressWarnings("unchecked")
- public static final Set<Class<? extends Annotation>> MAPPED_PARAMETER_ANNOTATIONS = new HashSet<Class<? extends Annotation>>(Arrays.asList(Disposes.class, Observes.class, Disposes.class));
-
- /**
- * Get the parameter types as an array
- */
- public Class<?>[] getParameterTypesAsArray();
-
- /**
- * Invokes the method
- *
- * @param instance The instance to invoke
- * @param parameters The method parameters
- * @return A reference to the instance
- */
- public T invoke(Object instance, Object... parameters) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException;
-
- /**
- * Invokes the method on the class of the passed instance, not the declaring
- * class. Useful with proxies
- *
- * @param instance The instance to invoke
- * @param manager The Bean manager
- * @return A reference to the instance
- */
- public T invokeOnInstance(Object instance, Object... parameters) throws IllegalArgumentException, SecurityException, IllegalAccessException, InvocationTargetException, NoSuchMethodException;
-
- /**
- * Gets the property name
- *
- * @return The name
- */
- public String getPropertyName();
-
- /**
- * Checks if a this is equivalent to a JLR method
- *
- * @param method The JLR method
- * @return true if equivalent
- */
- public boolean isEquivalent(Method method);
-
- public Method getAnnotatedMethod();
-
- public MethodSignature getSignature();
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBParameter.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBParameter.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBParameter.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,31 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector;
-
-import javax.enterprise.inject.spi.AnnotatedParameter;
-
-/**
- * AnnotatedParameter provides a uniform access to a method parameter defined
- * either in Java or XML
- *
- * @author Pete Muir
- * @param <T>
- */
-public interface WBParameter<T, X> extends WBAnnotated<T, Object>, AnnotatedParameter<X>
-{
-
-}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldAnnotated.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBAnnotated.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldAnnotated.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldAnnotated.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,198 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.context.NormalScope;
+import javax.enterprise.inject.spi.Annotated;
+import javax.enterprise.inject.stereotype.Stereotype;
+import javax.inject.Qualifier;
+import javax.inject.Scope;
+import javax.interceptor.InterceptorBinding;
+
+/**
+ * AnnotatedItem provides a uniform access to the annotations on an annotated
+ * item defined either in Java or XML
+ *
+ * @author Pete Muir
+ *
+ */
+public interface WeldAnnotated<T, S> extends Annotated
+{
+
+ // The set of meta-annotations to map
+ @SuppressWarnings("unchecked")
+ public static final Set<Class<? extends Annotation>> MAPPED_METAANNOTATIONS = new HashSet<Class<? extends Annotation>>(Arrays.asList(Qualifier.class, Stereotype.class, Scope.class, NormalScope.class, InterceptorBinding.class));
+
+ /**
+ * Gets all annotations which are annotated with the given meta annotation
+ * type
+ *
+ * @param The meta annotation to match
+ * @return A set of matching meta-annotations. Returns an empty set if there
+ * are no matches.
+ */
+ public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType);
+
+ /**
+ * Gets all annotations which are declared on this annotated item with the
+ * given meta annotation type
+ *
+ * @param The meta annotation to match
+ * @return A set of matching meta-annotations. Returns an empty set if there
+ * are no matches.
+ */
+ public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType);
+
+ /**
+ * Gets all annotations which are annotated with the given meta annotation
+ * type
+ *
+ * @param The meta annotation to match
+ * @return An array of matching meta-annotations. Returns an empty array if
+ * there are no matches.
+ */
+ public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType);
+
+ /**
+ * Gets the binding types for this element
+ *
+ * @returns A set of binding types present on the type. Returns an empty set
+ * if there are no matches.
+ * @deprecated This reflection type should not know about JSR-299 binding
+ * types
+ */
+ @Deprecated
+ public Set<Annotation> getQualifiers();
+
+ /**
+ * Gets the binding types for this element
+ *
+ * @returns An array of binding types present on the type. Returns an empty
+ * array if there are no matches.
+ * @deprecated This reflection type should not know about JSR-299 binding
+ * types
+ */
+ @Deprecated
+ public Annotation[] getBindingsAsArray();
+
+ /**
+ * Get the type hierarchy of any interfaces implemented by this class.
+ *
+ * Interface hierarchies from super classes are not included.
+ *
+ * The returned types should have any type parameters resolved to their
+ * actual types.
+ *
+ * @return the type hierarchy
+ */
+ public Set<Type> getInterfaceOnlyFlattenedTypeHierarchy();
+
+ /**
+ * Indicates if an annotation type specified is present
+ *
+ * @param annotationType The annotation to match
+ * @return True if present, false if not
+ */
+ public boolean isDeclaredAnnotationPresent(Class<? extends Annotation> annotationType);
+
+ /**
+ * Gets the type of the element
+ *
+ * @return The type of the element
+ */
+ public Class<T> getJavaClass();
+
+ /**
+ * Extends Java Class assignability such that actual type parameters are also
+ * considered
+ *
+ * @param that The other item to check assignability against
+ * @return True if assignable, false otherwise.
+ */
+ public boolean isAssignableFrom(WeldAnnotated<?, ?> that);
+
+ /**
+ * Extends Java Class assignability such that actual type parameters are also
+ * considered
+ *
+ * @param type The type to compare against
+ * @param actualTypeArguments The type arguments
+ * @return True is assignable, false otherwise
+ */
+ public boolean isAssignableFrom(Class<?> type, Type[] actualTypeArguments);
+
+ /**
+ * Gets the actual type arguments for any parameterized types that this
+ * AnnotatedItem represents.
+ *
+ * @return An array of type arguments
+ */
+ public Type[] getActualTypeArguments();
+
+ /**
+ * Indicates if this AnnotatedItem represents a static element
+ *
+ * @return True if static, false otherwise
+ */
+ public boolean isStatic();
+
+ /**
+ * Indicates if this AnnotatedItem represents a final element
+ *
+ * @return True if final, false otherwise
+ */
+ public boolean isFinal();
+
+ /**
+ * Indicates if this AnnotatedItem can be proxyed
+ *
+ * @return True if proxyable, false otherwise
+ */
+ public boolean isProxyable();
+
+ /**
+ * Indicates if this annotated item is public
+ *
+ * @return if public, returns true
+ */
+ public boolean isPublic();
+
+ public boolean isPrivate();
+
+ public boolean isPackagePrivate();
+
+ public Package getPackage();
+
+ /**
+ * Gets the name of this AnnotatedItem
+ *
+ * If it is not possible to determine the name of the underling element, a
+ * IllegalArgumentException is thrown
+ *
+ * @return The name
+ */
+ public String getName();
+
+ public boolean isParameterizedType();
+
+}
\ No newline at end of file
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldAnnotation.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBAnnotation.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldAnnotation.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldAnnotation.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+/**
+ * Represents a meta annotation
+ *
+ * @author Pete Muir
+ *
+ */
+public interface WeldAnnotation<T extends Annotation> extends WeldClass<T>
+{
+ /**
+ * Gets all members
+ *
+ * @return A set of abstracted members
+ */
+ public Set<WeldMethod<?, ?>> getMembers();
+
+ /**
+ * Gets all the members annotated with annotationType
+ *
+ * @param annotationType The annotation type to match
+ * @return A set of abstracted members with the annotation type
+ */
+ public Set<WeldMethod<?, ?>> getAnnotatedMembers(Class<? extends Annotation> annotationType);
+
+ /**
+ * Get an annotation member by name
+ *
+ * @param memberName
+ * @return
+ */
+ public <A> WeldMethod<A, ?> getMember(String memberName, WeldClass<A> expectedType);
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldCallable.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBCallable.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldCallable.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldCallable.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,49 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Member;
+import java.util.List;
+
+import javax.enterprise.inject.spi.AnnotatedCallable;
+
+/**
+ * @author pmuir
+ *
+ */
+public interface WeldCallable<T, X, S extends Member> extends WeldMember<T, X, S>, AnnotatedCallable<X>
+{
+
+ /**
+ * Gets the abstracted parameters of the method
+ *
+ * @return A list of parameters. Returns an empty list if no parameters are
+ * present.
+ */
+ public List<? extends WeldParameter<?, ?>> getWBParameters();
+
+ /**
+ * Gets the list of annotated parameters for a given annotation
+ *
+ * @param metaAnnotationType The annotation to match
+ * @return A set of matching parameter abstractions. Returns an empty list if
+ * there are no matches.
+ */
+ public List<WeldParameter<?, ?>> getAnnotatedWBParameters(Class<? extends Annotation> metaAnnotationType);
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldClass.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBClass.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldClass.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldClass.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,236 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.Set;
+
+import javax.enterprise.inject.spi.AnnotatedType;
+
+/**
+ * Represents a Class
+ *
+ * @author Pete Muir
+ *
+ */
+public interface WeldClass<T> extends WeldAnnotated<T, Class<T>>, AnnotatedType<T>
+{
+
+ /**
+ * Gets all fields on the type
+ *
+ * @return A set of abstracted fields
+ */
+ public Set<WeldField<?, ?>> getWeldFields();
+
+ /**
+ * Gets all fields on the type
+ *
+ * @return A set of abstracted fields
+ */
+ public Set<WeldMethod<?, ?>> getWeldMethods();
+
+ /**
+ * Gets all fields on the type
+ *
+ * @return A set of abstracted fields
+ */
+ public Set<WeldMethod<?, ?>> getDeclaredWeldMethods();
+
+ /**
+ * Get a field by name
+ *
+ * @param <F> the expected type of the field
+ * @param fieldName the field name
+ * @param expectedType the expected type of the field
+ * @return the field
+ */
+ public <F> WeldField<F, ?> getDeclaredWeldField(String fieldName, WeldClass<F> expectedType);
+
+ /**
+ * Gets all fields which are annotated with the given annotation type on this
+ * class and all super classes
+ *
+ * @param annotationType The annotation to match
+ * @return A set of abstracted fields with the given annotation. Returns an
+ * empty set if there are no matches
+ */
+ public Set<WeldField<?, ?>> getAnnotatedWeldFields(Class<? extends Annotation> annotationType);
+
+ /**
+ * Gets all fields which are annotated with the given annotation type on this
+ * class only.
+ *
+ * @param annotationType The annotation to match
+ * @return A set of abstracted fields with the given annotation. Returns an
+ * empty set if there are no matches
+ */
+ public Set<WeldField<?, T>> getDeclaredAnnotatedWeldFields(Class<? extends Annotation> annotationType);
+
+ /**
+ * Gets all fields which are meta-annotated with metaAnnotationType
+ *
+ * @param metaAnnotationType The meta annotation to match
+ * @return A set of abstracted fields with the given meta-annotation. Returns
+ * an empty set if there are no matches
+ */
+ public Set<WeldField<?, ?>> getMetaAnnotatedWeldFields(Class<? extends Annotation> metaAnnotationType);
+
+ /**
+ * Gets all constructors which are annotated with annotationType
+ *
+ * @param annotationType The annotation type to match
+ * @return A set of abstracted fields with the given annotation. Returns an
+ * empty set if there are no matches
+ */
+ public Set<WeldConstructor<T>> getAnnotatedWeldConstructors(Class<? extends Annotation> annotationType);
+
+ /**
+ * Gets all constructors
+ *
+ * @return A set of abstracted constructors
+ */
+ public Set<WeldConstructor<T>> getWeldConstructors();
+
+ /**
+ * Gets the no-args constructor
+ *
+ * @return The no-args constructor, or null if not defined
+ */
+ public WeldConstructor<T> getNoArgsWeldConstructor();
+
+ /**
+ * Get the constructor which matches the argument list provided
+ *
+ * @param parameterTypes the parameters of the constructor
+ * @return the matching constructor, or null if not defined
+ */
+ public WeldConstructor<T> getDeclaredWeldConstructor(ConstructorSignature signature);
+
+ /**
+ * Gets all methods annotated with annotationType
+ *
+ * @param annotationType The annotation to match
+ * @return A set of abstracted methods with the given annotation. Returns an
+ * empty set if there are no matches
+ */
+ public Set<WeldMethod<?, ?>> getAnnotatedWeldMethods(Class<? extends Annotation> annotationType);
+
+ /**
+ * Gets all methods annotated with annotationType
+ *
+ * @param annotationType The annotation to match
+ * @return A set of abstracted methods with the given annotation. Returns an
+ * empty set if there are no matches
+ */
+ public Set<WeldMethod<?, T>> getDeclaredAnnotatedWeldMethods(Class<? extends Annotation> annotationType);
+
+ /**
+ * Find the annotated method for a given methodDescriptor
+ *
+ * @param methodDescriptor
+ * @return
+ *
+ */
+ public WeldMethod<?, ?> getWeldMethod(Method method);
+
+ /**
+ * Get a method by name
+ *
+ * @param <M> the expected return type
+ * @param signature the name of the method
+ * @param expectedReturnType the expected return type
+ * @return the method, or null if it doesn't exist
+ */
+ public <M> WeldMethod<M, ?> getDeclaredWeldMethod(MethodSignature signature,
+ WeldClass<M> expectedReturnType);
+
+ /**
+ * Get a method by name
+ *
+ * @param <M> the expected return type
+ * @param signature the name of the method
+ * @return the method, or null if it doesn't exist
+ */
+ public <M> WeldMethod<M, ?> getWBMethod(MethodSignature signature);
+
+ // TODO Replace with AnnotatedMethod variant
+ @Deprecated
+ public WeldMethod<?, ?> getDeclaredWeldMethod(Method method);
+
+ /**
+ * Gets all with parameters annotated with annotationType
+ *
+ * @param annotationType The annotation to match
+ * @return A set of abstracted methods with the given annotation. Returns an
+ * empty set if there are no matches
+ */
+ public Set<WeldMethod<?, ?>> getWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType);
+
+ /**
+ * Gets all with constructors annotated with annotationType
+ *
+ * @param annotationType The annotation to match
+ * @return A set of abstracted constructors with the given annotation. Returns an
+ * empty set if there are no matches
+ */
+ public Set<WeldConstructor<?>> getWeldConstructorsWithAnnotatedParameters(Class<? extends Annotation> annotationType);
+
+ /**
+ * Gets all with parameters annotated with annotationType
+ *
+ * @param annotationType The annotation to match
+ * @return A set of abstracted methods with the given annotation. Returns an
+ * empty set if there are no matches
+ */
+ public Set<WeldMethod<?, T>> getDeclaredWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType);
+
+ /**
+ * Gets the superclass.
+ *
+ * @return The abstracted superclass, null if there is no superclass
+ */
+ public WeldClass<?> getWeldSuperclass();
+
+ /**
+ * Determine if this is a non-static member class
+ *
+ * @return true if this is a non-static member
+ */
+ public boolean isNonStaticMemberClass();
+
+ public boolean isParameterizedType();
+
+ public boolean isAbstract();
+
+ public boolean isEnum();
+
+ public <S> S cast(Object object);
+
+ public <U> WeldClass<? extends U> asWeldSubclass(WeldClass<U> clazz);
+
+ /**
+ * Check if this is equivalent to a java class
+ * @param clazz The Java class
+ * @return true if equivalent
+ */
+ public boolean isEquivalent(Class<?> clazz);
+
+ public String getSimpleName();
+
+}
\ No newline at end of file
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldConstructor.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBConstructor.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldConstructor.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldConstructor.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,50 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.decorator.Decorates;
+import javax.enterprise.inject.spi.AnnotatedConstructor;
+
+/**
+ * Represents a Class Constructor
+ *
+ * @author Pete Muir
+ *
+ */
+public interface WeldConstructor<T> extends WeldCallable<T, T, Constructor<T>>, AnnotatedConstructor<T>
+{
+
+ @SuppressWarnings("unchecked")
+ public static final Set<Class<? extends Annotation>> MAPPED_PARAMETER_ANNOTATIONS = new HashSet<Class<? extends Annotation>>(Arrays.asList(Decorates.class));
+
+ /**
+ * Creates a new instance of the class, using this constructor
+ *
+ * @return The created instance
+ */
+ public T newInstance(Object... parameters) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException;
+
+ public ConstructorSignature getSignature();
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldField.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBField.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldField.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldField.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.reflect.Field;
+
+import javax.enterprise.inject.spi.AnnotatedField;
+
+/**
+ * AnnotatedField provides a uniform access to the annotations on an annotated
+ * field
+ *
+ * @author Pete Muir
+ *
+ */
+public interface WeldField<T, X> extends WeldMember<T, X, Field>, AnnotatedField<X>
+{
+
+ /**
+ * Injects an instance
+ *
+ *
+ * @param declaringInstance The instance to inject into
+ * @param value The value to inject
+ */
+ public void set(Object declaringInstance, Object value) throws IllegalArgumentException, IllegalAccessException;
+
+ public T get(Object instance);
+
+ /**
+ * Gets the property name of the field
+ *
+ * @return The name
+ */
+ public String getPropertyName();
+
+ public boolean isTransient();
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldMember.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMember.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldMember.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldMember.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.reflect.Member;
+
+import javax.enterprise.inject.spi.AnnotatedMember;
+/**
+ * AnnotedMember provides enhanced access to an annotated member
+ *
+ * @author Pete Muir
+ *
+ */
+public interface WeldMember<T, X, S extends Member> extends WeldAnnotated<T, S>, AnnotatedMember<X>
+{
+
+ public S getJavaMember();
+
+ /**
+ * Gets an abstraction of the declaring class
+ *
+ * @return The declaring class
+ */
+ public WeldClass<X> getDeclaringType();
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldMethod.java (from rev 3894, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMethod.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldMethod.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldMethod.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,85 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.util.Arrays;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.event.Observes;
+import javax.enterprise.inject.Disposes;
+import javax.enterprise.inject.spi.AnnotatedMethod;
+
+/**
+ * AnnotatedType provides a uniform access to the annotations on an annotated
+ * class defined either in Java or XML
+ *
+ * @author Pete Muir
+ *
+ */
+public interface WeldMethod<T, X> extends WeldCallable<T, X, Method>, AnnotatedMethod<X>
+{
+ @SuppressWarnings("unchecked")
+ public static final Set<Class<? extends Annotation>> MAPPED_PARAMETER_ANNOTATIONS = new HashSet<Class<? extends Annotation>>(Arrays.asList(Disposes.class, Observes.class, Disposes.class));
+
+ /**
+ * Get the parameter types as an array
+ */
+ public Class<?>[] getParameterTypesAsArray();
+
+ /**
+ * Invokes the method
+ *
+ * @param instance The instance to invoke
+ * @param parameters The method parameters
+ * @return A reference to the instance
+ */
+ public T invoke(Object instance, Object... parameters) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException;
+
+ /**
+ * Invokes the method on the class of the passed instance, not the declaring
+ * class. Useful with proxies
+ *
+ * @param instance The instance to invoke
+ * @param manager The Bean manager
+ * @return A reference to the instance
+ */
+ public T invokeOnInstance(Object instance, Object... parameters) throws IllegalArgumentException, SecurityException, IllegalAccessException, InvocationTargetException, NoSuchMethodException;
+
+ /**
+ * Gets the property name
+ *
+ * @return The name
+ */
+ public String getPropertyName();
+
+ /**
+ * Checks if a this is equivalent to a JLR method
+ *
+ * @param method The JLR method
+ * @return true if equivalent
+ */
+ public boolean isEquivalent(Method method);
+
+ public Method getAnnotatedMethod();
+
+ public MethodSignature getSignature();
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldParameter.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBParameter.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldParameter.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WeldParameter.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,31 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector;
+
+import javax.enterprise.inject.spi.AnnotatedParameter;
+
+/**
+ * AnnotatedParameter provides a uniform access to a method parameter defined
+ * either in Java or XML
+ *
+ * @author Pete Muir
+ * @param <T>
+ */
+public interface WeldParameter<T, X> extends WeldAnnotated<T, Object>, AnnotatedParameter<X>
+{
+
+}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBAnnotated.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBAnnotated.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBAnnotated.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,293 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector.jlr;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import org.jboss.weld.introspector.AnnotationStore;
-import org.jboss.weld.introspector.WBAnnotated;
-import org.jboss.weld.util.Proxies;
-import org.jboss.weld.util.Reflections;
-
-/**
- * Represents functionality common for all annotated items, mainly different
- * mappings of the annotations and meta-annotations
- *
- * AbstractAnnotatedItem is an immutable class and therefore threadsafe
- *
- * @author Pete Muir
- * @author Nicklas Karlsson
- *
- * @param <T>
- * @param <S>
- *
- * @see org.jboss.weld.introspector.WBAnnotated
- */
-public abstract class AbstractWBAnnotated<T, S> implements WBAnnotated<T, S>
-{
-
- interface WrappableAnnotatedItem<T, S> extends WBAnnotated<T, S>
- {
-
- AnnotationStore getAnnotationStore();
-
- }
-
- // Cached string representation
- private String toString;
- private final AnnotationStore annotationStore;
- private final Class<T> rawType;
- private final Type[] actualTypeArguments;
- private final Type type;
- private final Set<Type> flattenedTypes;
- private final Set<Type> interfaceOnlyFlattenedTypes;
- private final boolean proxyable;
- private final boolean _parameterizedType;
-
- /**
- * Constructor
- *
- * Also builds the meta-annotation map. Throws a NullPointerException if
- * trying to register a null map
- *
- * @param annotationMap A map of annotation to register
- *
- */
- public AbstractWBAnnotated(AnnotationStore annotatedItemHelper, Class<T> rawType, Type type)
- {
- this.annotationStore = annotatedItemHelper;
- this.rawType = rawType;
- this.type = type;
- if (type instanceof ParameterizedType)
- {
- this.actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments();
- }
- else
- {
- this.actualTypeArguments = new Type[0];
- }
- this._parameterizedType = Reflections.isParameterizedType(rawType);
- this.flattenedTypes = new Reflections.HierarchyDiscovery(type).getFlattenedTypes();
- this.interfaceOnlyFlattenedTypes = new HashSet<Type>();
- for (Type t : rawType.getGenericInterfaces())
- {
- interfaceOnlyFlattenedTypes.addAll(new Reflections.HierarchyDiscovery(t).getFlattenedTypes());
- }
- this.proxyable = Proxies.isTypesProxyable(flattenedTypes);
- }
-
- public AbstractWBAnnotated(AnnotationStore annotatedItemHelper)
- {
- this.annotationStore = annotatedItemHelper;
- this.rawType = null;
- this.type = null;
- this.actualTypeArguments = new Type[0];
- this._parameterizedType = false;
- this.flattenedTypes = null;
- this.interfaceOnlyFlattenedTypes = null;
- this.proxyable = false;
- }
-
- public AnnotationStore getAnnotationStore()
- {
- return annotationStore;
- }
-
- public <A extends Annotation> A getAnnotation(Class<A> annotationType)
- {
- return getAnnotationStore().getAnnotation(annotationType);
- }
-
- public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
- {
- return getAnnotationStore().getMetaAnnotations(metaAnnotationType);
- }
-
- public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
- {
- return getAnnotationStore().getDeclaredMetaAnnotations(metaAnnotationType);
- }
-
- public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
- {
- return getMetaAnnotations(metaAnnotationType).toArray(new Annotation[0]);
- }
-
- public Set<Annotation> getAnnotations()
- {
- return getAnnotationStore().getAnnotations();
- }
-
- /**
- * Checks if an annotation is present on the item
- *
- * @param annotatedType The annotation type to check for
- * @return True if present, false otherwise.
- *
- * @see org.jboss.weld.introspector.WBAnnotated#isAnnotationPresent(Class)
- */
- public boolean isAnnotationPresent(Class<? extends Annotation> annotatedType)
- {
- return getAnnotationStore().isAnnotationPresent(annotatedType);
- }
-
- /**
- * Compares two AbstractAnnotatedItems
- *
- * @param other The other item
- * @return True if equals, false otherwise
- */
- @Override
- public boolean equals(Object other)
- {
- if (other instanceof WBAnnotated)
- {
- WBAnnotated<?, ?> that = (WBAnnotated<?, ?>) other;
- return this.getAnnotations().equals(that.getAnnotations()) && this.getJavaClass().equals(that.getJavaClass());
- }
- return false;
- }
-
- /**
- * Checks if this item is assignable from another annotated item (through
- * type and actual type arguments)
- *
- * @param that The other annotated item to check against
- * @return True if assignable, false otherwise
- *
- * @see org.jboss.weld.introspector.WBAnnotated#isAssignableFrom(WBAnnotated)
- */
- public boolean isAssignableFrom(WBAnnotated<?, ?> that)
- {
- return isAssignableFrom(that.getJavaClass(), that.getActualTypeArguments());
- }
-
- public boolean isAssignableFrom(Class<?> type, Type[] actualTypeArguments)
- {
- return Reflections.isAssignableFrom(getJavaClass(), getActualTypeArguments(), type, actualTypeArguments);
- }
-
- public boolean isAssignableFrom(Type type)
- {
- return Reflections.isAssignableFrom(getBaseType(), type);
- }
-
- /**
- * Gets the hash code of the actual type
- *
- * @return The hash code
- */
- @Override
- public int hashCode()
- {
- return getJavaClass().hashCode();
- }
-
- /**
- * Gets a string representation of the item
- *
- * @return A string representation
- */
- @Override
- public String toString()
- {
- if (toString != null)
- {
- return toString;
- }
- toString = "Abstract annotated item " + getName();
- return toString;
- }
-
- @Deprecated
- public Set<Annotation> getQualifiers()
- {
- return getAnnotationStore().getBindings();
- }
-
- /**
- * Gets (as array) the binding types of the item
- *
- * Looks at the meta-annotations map for annotations with binding type
- * meta-annotation. Returns default binding (current) if none specified.
- *
- * @return An array of (binding type) annotations
- *
- * @see org.jboss.weld.introspector.WBAnnotated#getBindingsAsArray()
- */
- @Deprecated
- public Annotation[] getBindingsAsArray()
- {
- return getAnnotationStore().getBindingsAsArray();
- }
-
- /**
- * Indicates if the type is proxyable to a set of pre-defined rules
- *
- * @return True if proxyable, false otherwise.
- *
- * @see org.jboss.weld.introspector.WBAnnotated#isProxyable()
- */
- public boolean isProxyable()
- {
- return proxyable;
- }
-
- public Class<T> getJavaClass()
- {
- return rawType;
- }
-
- public Type[] getActualTypeArguments()
- {
- return Arrays.copyOf(actualTypeArguments, actualTypeArguments.length);
- }
-
- public Set<Type> getInterfaceOnlyFlattenedTypeHierarchy()
- {
- return Collections.unmodifiableSet(interfaceOnlyFlattenedTypes);
- }
-
- public abstract S getDelegate();
-
- public boolean isDeclaredAnnotationPresent(Class<? extends Annotation> annotationType)
- {
- return getAnnotationStore().isDeclaredAnnotationPresent(annotationType);
- }
-
- public boolean isParameterizedType()
- {
- return _parameterizedType;
- }
-
- public Type getBaseType()
- {
- return type;
- }
-
- public Set<Type> getTypeClosure()
- {
- return Collections.unmodifiableSet(flattenedTypes);
- }
-
-}
\ No newline at end of file
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBCallable.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBCallable.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBCallable.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,40 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector.jlr;
-
-import java.lang.reflect.Member;
-import java.lang.reflect.Type;
-
-import org.jboss.weld.introspector.AnnotationStore;
-import org.jboss.weld.introspector.WBCallable;
-import org.jboss.weld.introspector.WBClass;
-
-/**
- * @author pmuir
- *
- */
-public abstract class AbstractWBCallable<T, X, S extends Member> extends AbstractWBMember<T, X, S> implements WBCallable<T, X, S>
-{
-
-
-
- protected AbstractWBCallable(AnnotationStore annotatedItemHelper, Member member, Class<T> rawType, Type type, WBClass<X> declaringType)
- {
- super(annotatedItemHelper, member, rawType, type, declaringType);
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBMember.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBMember.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBMember.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,172 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector.jlr;
-
-import java.lang.reflect.Member;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Type;
-
-import org.jboss.weld.introspector.AnnotationStore;
-import org.jboss.weld.introspector.ForwardingWBMember;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.WBMember;
-import org.jboss.weld.util.Reflections;
-
-/**
- * Represents an abstract annotated memeber (field, method or constructor)
- *
- * This class is immutable, and therefore threadsafe
- *
- * @author Pete Muir
- *
- * @param <T>
- * @param <S>
- */
-public abstract class AbstractWBMember<T, X, S extends Member> extends AbstractWBAnnotated<T, S> implements WBMember<T, X, S>
-{
-
- static abstract class WrappableForwardingAnnotatedMember<T, X, S extends Member> extends ForwardingWBMember<T, X, S> implements WrappableAnnotatedItem<T, S>
- {
-
- }
-
- // The name of the member
- private final String name;
-
- // Cached string representation
- private String toString;
- private final boolean _public;
- private final boolean _private;
- private final boolean _packagePrivate;
- private final Package _package;
- private final WBClass<X> declaringType;
-
- /**
- * Constructor
- *
- * @param annotationMap The annotation map
- */
- protected AbstractWBMember(AnnotationStore annotatedItemHelper, Member member, Class<T> rawType, Type type, WBClass<X> declaringType)
- {
- super(annotatedItemHelper, rawType, type);
- name = member.getName();
- this._public = Modifier.isPublic(member.getModifiers());
- this._private = Modifier.isPrivate(member.getModifiers());
- this._packagePrivate = Reflections.isPackagePrivate(member.getModifiers());
- this._package = member.getDeclaringClass().getPackage();
- this.declaringType = declaringType;
- }
-
- /**
- * Indicates if the member is static
- *
- * @return True if static, false otherwise
- *
- * @see org.jboss.weld.introspector.WBAnnotated#isStatic()
- */
- public boolean isStatic()
- {
- return Reflections.isStatic(getDelegate());
- }
-
- /**
- * Indicates if the member if final
- *
- * @return True if final, false otherwise
- *
- * @see org.jboss.weld.introspector.WBAnnotated#isFinal()
- */
- public boolean isFinal()
- {
- return Reflections.isFinal(getDelegate());
- }
-
- public boolean isTransient()
- {
- return Reflections.isTransient(getDelegate());
- }
-
- public boolean isPublic()
- {
- return _public;
- }
-
- public boolean isPrivate()
- {
- return _private;
- }
-
- public boolean isPackagePrivate()
- {
- return _packagePrivate;
- }
-
- public Package getPackage()
- {
- return _package;
- }
-
- /**
- * Gets the current value of the member
- *
- * @param beanManager The Bean manager
- * @return The current value
- *
- public T getValue(BeanManager beanManager)
- {
- return beanManager.getInstance(getRawType(), getMetaAnnotationsAsArray(BindingType.class));
- }*/
-
- /**
- * Gets the name of the member
- *
- * @returns The name
- *
- * @see org.jboss.weld.introspector.WBAnnotated#getName()
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Gets a string representation of the member
- *
- * @return A string representation
- */
- @Override
- public String toString()
- {
- if (toString != null)
- {
- return toString;
- }
- toString = "Abstract annotated member " + getName();
- return toString;
- }
-
- public S getJavaMember()
- {
- return getDelegate();
- }
-
- public WBClass<X> getDeclaringType()
- {
- return declaringType;
- }
-
-}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBAnnotated.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldAnnotated.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,293 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector.jlr;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import org.jboss.weld.introspector.AnnotationStore;
+import org.jboss.weld.introspector.WeldAnnotated;
+import org.jboss.weld.util.Proxies;
+import org.jboss.weld.util.Reflections;
+
+/**
+ * Represents functionality common for all annotated items, mainly different
+ * mappings of the annotations and meta-annotations
+ *
+ * AbstractAnnotatedItem is an immutable class and therefore threadsafe
+ *
+ * @author Pete Muir
+ * @author Nicklas Karlsson
+ *
+ * @param <T>
+ * @param <S>
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated
+ */
+public abstract class AbstractWeldAnnotated<T, S> implements WeldAnnotated<T, S>
+{
+
+ interface WrappableAnnotatedItem<T, S> extends WeldAnnotated<T, S>
+ {
+
+ AnnotationStore getAnnotationStore();
+
+ }
+
+ // Cached string representation
+ private String toString;
+ private final AnnotationStore annotationStore;
+ private final Class<T> rawType;
+ private final Type[] actualTypeArguments;
+ private final Type type;
+ private final Set<Type> flattenedTypes;
+ private final Set<Type> interfaceOnlyFlattenedTypes;
+ private final boolean proxyable;
+ private final boolean _parameterizedType;
+
+ /**
+ * Constructor
+ *
+ * Also builds the meta-annotation map. Throws a NullPointerException if
+ * trying to register a null map
+ *
+ * @param annotationMap A map of annotation to register
+ *
+ */
+ public AbstractWeldAnnotated(AnnotationStore annotatedItemHelper, Class<T> rawType, Type type)
+ {
+ this.annotationStore = annotatedItemHelper;
+ this.rawType = rawType;
+ this.type = type;
+ if (type instanceof ParameterizedType)
+ {
+ this.actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments();
+ }
+ else
+ {
+ this.actualTypeArguments = new Type[0];
+ }
+ this._parameterizedType = Reflections.isParameterizedType(rawType);
+ this.flattenedTypes = new Reflections.HierarchyDiscovery(type).getFlattenedTypes();
+ this.interfaceOnlyFlattenedTypes = new HashSet<Type>();
+ for (Type t : rawType.getGenericInterfaces())
+ {
+ interfaceOnlyFlattenedTypes.addAll(new Reflections.HierarchyDiscovery(t).getFlattenedTypes());
+ }
+ this.proxyable = Proxies.isTypesProxyable(flattenedTypes);
+ }
+
+ public AbstractWeldAnnotated(AnnotationStore annotatedItemHelper)
+ {
+ this.annotationStore = annotatedItemHelper;
+ this.rawType = null;
+ this.type = null;
+ this.actualTypeArguments = new Type[0];
+ this._parameterizedType = false;
+ this.flattenedTypes = null;
+ this.interfaceOnlyFlattenedTypes = null;
+ this.proxyable = false;
+ }
+
+ public AnnotationStore getAnnotationStore()
+ {
+ return annotationStore;
+ }
+
+ public <A extends Annotation> A getAnnotation(Class<A> annotationType)
+ {
+ return getAnnotationStore().getAnnotation(annotationType);
+ }
+
+ public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getMetaAnnotations(metaAnnotationType);
+ }
+
+ public Set<Annotation> getDeclaredMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getAnnotationStore().getDeclaredMetaAnnotations(metaAnnotationType);
+ }
+
+ public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
+ {
+ return getMetaAnnotations(metaAnnotationType).toArray(new Annotation[0]);
+ }
+
+ public Set<Annotation> getAnnotations()
+ {
+ return getAnnotationStore().getAnnotations();
+ }
+
+ /**
+ * Checks if an annotation is present on the item
+ *
+ * @param annotatedType The annotation type to check for
+ * @return True if present, false otherwise.
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated#isAnnotationPresent(Class)
+ */
+ public boolean isAnnotationPresent(Class<? extends Annotation> annotatedType)
+ {
+ return getAnnotationStore().isAnnotationPresent(annotatedType);
+ }
+
+ /**
+ * Compares two AbstractAnnotatedItems
+ *
+ * @param other The other item
+ * @return True if equals, false otherwise
+ */
+ @Override
+ public boolean equals(Object other)
+ {
+ if (other instanceof WeldAnnotated)
+ {
+ WeldAnnotated<?, ?> that = (WeldAnnotated<?, ?>) other;
+ return this.getAnnotations().equals(that.getAnnotations()) && this.getJavaClass().equals(that.getJavaClass());
+ }
+ return false;
+ }
+
+ /**
+ * Checks if this item is assignable from another annotated item (through
+ * type and actual type arguments)
+ *
+ * @param that The other annotated item to check against
+ * @return True if assignable, false otherwise
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated#isAssignableFrom(WeldAnnotated)
+ */
+ public boolean isAssignableFrom(WeldAnnotated<?, ?> that)
+ {
+ return isAssignableFrom(that.getJavaClass(), that.getActualTypeArguments());
+ }
+
+ public boolean isAssignableFrom(Class<?> type, Type[] actualTypeArguments)
+ {
+ return Reflections.isAssignableFrom(getJavaClass(), getActualTypeArguments(), type, actualTypeArguments);
+ }
+
+ public boolean isAssignableFrom(Type type)
+ {
+ return Reflections.isAssignableFrom(getBaseType(), type);
+ }
+
+ /**
+ * Gets the hash code of the actual type
+ *
+ * @return The hash code
+ */
+ @Override
+ public int hashCode()
+ {
+ return getJavaClass().hashCode();
+ }
+
+ /**
+ * Gets a string representation of the item
+ *
+ * @return A string representation
+ */
+ @Override
+ public String toString()
+ {
+ if (toString != null)
+ {
+ return toString;
+ }
+ toString = "Abstract annotated item " + getName();
+ return toString;
+ }
+
+ @Deprecated
+ public Set<Annotation> getQualifiers()
+ {
+ return getAnnotationStore().getBindings();
+ }
+
+ /**
+ * Gets (as array) the binding types of the item
+ *
+ * Looks at the meta-annotations map for annotations with binding type
+ * meta-annotation. Returns default binding (current) if none specified.
+ *
+ * @return An array of (binding type) annotations
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated#getBindingsAsArray()
+ */
+ @Deprecated
+ public Annotation[] getBindingsAsArray()
+ {
+ return getAnnotationStore().getBindingsAsArray();
+ }
+
+ /**
+ * Indicates if the type is proxyable to a set of pre-defined rules
+ *
+ * @return True if proxyable, false otherwise.
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated#isProxyable()
+ */
+ public boolean isProxyable()
+ {
+ return proxyable;
+ }
+
+ public Class<T> getJavaClass()
+ {
+ return rawType;
+ }
+
+ public Type[] getActualTypeArguments()
+ {
+ return Arrays.copyOf(actualTypeArguments, actualTypeArguments.length);
+ }
+
+ public Set<Type> getInterfaceOnlyFlattenedTypeHierarchy()
+ {
+ return Collections.unmodifiableSet(interfaceOnlyFlattenedTypes);
+ }
+
+ public abstract S getDelegate();
+
+ public boolean isDeclaredAnnotationPresent(Class<? extends Annotation> annotationType)
+ {
+ return getAnnotationStore().isDeclaredAnnotationPresent(annotationType);
+ }
+
+ public boolean isParameterizedType()
+ {
+ return _parameterizedType;
+ }
+
+ public Type getBaseType()
+ {
+ return type;
+ }
+
+ public Set<Type> getTypeClosure()
+ {
+ return Collections.unmodifiableSet(flattenedTypes);
+ }
+
+}
\ No newline at end of file
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldCallable.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBCallable.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldCallable.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldCallable.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector.jlr;
+
+import java.lang.reflect.Member;
+import java.lang.reflect.Type;
+
+import org.jboss.weld.introspector.AnnotationStore;
+import org.jboss.weld.introspector.WeldCallable;
+import org.jboss.weld.introspector.WeldClass;
+
+/**
+ * @author pmuir
+ *
+ */
+public abstract class AbstractWeldCallable<T, X, S extends Member> extends AbstractWeldMember<T, X, S> implements WeldCallable<T, X, S>
+{
+
+
+
+ protected AbstractWeldCallable(AnnotationStore annotatedItemHelper, Member member, Class<T> rawType, Type type, WeldClass<X> declaringType)
+ {
+ super(annotatedItemHelper, member, rawType, type, declaringType);
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldMember.java (from rev 3894, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBMember.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldMember.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWeldMember.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,172 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector.jlr;
+
+import java.lang.reflect.Member;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Type;
+
+import org.jboss.weld.introspector.AnnotationStore;
+import org.jboss.weld.introspector.ForwardingWeldMember;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldMember;
+import org.jboss.weld.util.Reflections;
+
+/**
+ * Represents an abstract annotated memeber (field, method or constructor)
+ *
+ * This class is immutable, and therefore threadsafe
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ * @param <S>
+ */
+public abstract class AbstractWeldMember<T, X, S extends Member> extends AbstractWeldAnnotated<T, S> implements WeldMember<T, X, S>
+{
+
+ static abstract class WrappableForwardingAnnotatedMember<T, X, S extends Member> extends ForwardingWeldMember<T, X, S> implements WrappableAnnotatedItem<T, S>
+ {
+
+ }
+
+ // The name of the member
+ private final String name;
+
+ // Cached string representation
+ private String toString;
+ private final boolean _public;
+ private final boolean _private;
+ private final boolean _packagePrivate;
+ private final Package _package;
+ private final WeldClass<X> declaringType;
+
+ /**
+ * Constructor
+ *
+ * @param annotationMap The annotation map
+ */
+ protected AbstractWeldMember(AnnotationStore annotatedItemHelper, Member member, Class<T> rawType, Type type, WeldClass<X> declaringType)
+ {
+ super(annotatedItemHelper, rawType, type);
+ name = member.getName();
+ this._public = Modifier.isPublic(member.getModifiers());
+ this._private = Modifier.isPrivate(member.getModifiers());
+ this._packagePrivate = Reflections.isPackagePrivate(member.getModifiers());
+ this._package = member.getDeclaringClass().getPackage();
+ this.declaringType = declaringType;
+ }
+
+ /**
+ * Indicates if the member is static
+ *
+ * @return True if static, false otherwise
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated#isStatic()
+ */
+ public boolean isStatic()
+ {
+ return Reflections.isStatic(getDelegate());
+ }
+
+ /**
+ * Indicates if the member if final
+ *
+ * @return True if final, false otherwise
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated#isFinal()
+ */
+ public boolean isFinal()
+ {
+ return Reflections.isFinal(getDelegate());
+ }
+
+ public boolean isTransient()
+ {
+ return Reflections.isTransient(getDelegate());
+ }
+
+ public boolean isPublic()
+ {
+ return _public;
+ }
+
+ public boolean isPrivate()
+ {
+ return _private;
+ }
+
+ public boolean isPackagePrivate()
+ {
+ return _packagePrivate;
+ }
+
+ public Package getPackage()
+ {
+ return _package;
+ }
+
+ /**
+ * Gets the current value of the member
+ *
+ * @param beanManager The Bean manager
+ * @return The current value
+ *
+ public T getValue(BeanManager beanManager)
+ {
+ return beanManager.getInstance(getRawType(), getMetaAnnotationsAsArray(BindingType.class));
+ }*/
+
+ /**
+ * Gets the name of the member
+ *
+ * @returns The name
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated#getName()
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Gets a string representation of the member
+ *
+ * @return A string representation
+ */
+ @Override
+ public String toString()
+ {
+ if (toString != null)
+ {
+ return toString;
+ }
+ toString = "Abstract annotated member " + getName();
+ return toString;
+ }
+
+ public S getJavaMember()
+ {
+ return getDelegate();
+ }
+
+ public WeldClass<X> getDeclaringType()
+ {
+ return declaringType;
+ }
+
+}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/ConstructorSignatureImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/ConstructorSignatureImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/ConstructorSignatureImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -19,7 +19,7 @@
import java.util.Arrays;
import org.jboss.weld.introspector.ConstructorSignature;
-import org.jboss.weld.introspector.WBConstructor;
+import org.jboss.weld.introspector.WeldConstructor;
public class ConstructorSignatureImpl implements ConstructorSignature
{
@@ -28,7 +28,7 @@
private final String[] parameterTypes;
- public ConstructorSignatureImpl(WBConstructor<?> method)
+ public ConstructorSignatureImpl(WeldConstructor<?> method)
{
this.parameterTypes = new String[method.getWBParameters().size()];
for (int i = 0; i < method.getWBParameters().size(); i++)
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/MethodSignatureImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/MethodSignatureImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/MethodSignatureImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -20,7 +20,7 @@
import java.util.Arrays;
import org.jboss.weld.introspector.MethodSignature;
-import org.jboss.weld.introspector.WBMethod;
+import org.jboss.weld.introspector.WeldMethod;
public class MethodSignatureImpl implements MethodSignature
{
@@ -30,7 +30,7 @@
private final String methodName;
private final String[] parameterTypes;
- public MethodSignatureImpl(WBMethod<?, ?> method)
+ public MethodSignatureImpl(WeldMethod<?, ?> method)
{
this.methodName = method.getName();
this.parameterTypes = new String[method.getWBParameters().size()];
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBAnnotationImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBAnnotationImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBAnnotationImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,154 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector.jlr;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-
-import org.jboss.weld.introspector.AnnotationStore;
-import org.jboss.weld.introspector.WBAnnotation;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.WBMethod;
-import org.jboss.weld.resources.ClassTransformer;
-import org.jboss.weld.util.Names;
-
-import com.google.common.base.Supplier;
-import com.google.common.collect.Multimaps;
-import com.google.common.collect.SetMultimap;
-
-/**
- * Represents an annotated annotation
- *
- * This class is immutable and therefore threadsafe
- *
- * @author Pete Muir
- *
- * @param <T>
- */
-public class WBAnnotationImpl<T extends Annotation> extends WBClassImpl<T> implements WBAnnotation<T>
-{
-
- // The annotated members map (annotation -> member with annotation)
- private final SetMultimap<Class<? extends Annotation>, WBMethod<?, ?>> annotatedMembers;
- // The implementation class of the annotation
- private final Class<T> clazz;
- // The set of abstracted members
- private final Set<WBMethod<?, ?>> members;
-
- private final Map<String, WBMethod<?, ?>> namedMembers;
-
- // Cached string representation
- private final String toString;
-
- public static <A extends Annotation> WBAnnotation<A> of(Class<A> annotationType, ClassTransformer classTransformer)
- {
- return new WBAnnotationImpl<A>(annotationType, classTransformer);
- }
-
- /**
- * Constructor
- *
- * Initializes the superclass with the built annotation map
- *
- * @param annotationType The annotation type
- */
- protected WBAnnotationImpl(Class<T> annotationType, ClassTransformer classTransformer)
- {
- super(annotationType, annotationType, null, AnnotationStore.of(annotationType, classTransformer.getTypeStore().get(annotationType), classTransformer.getTypeStore().get(annotationType), classTransformer.getTypeStore()), classTransformer);
- this.clazz = annotationType;
- this.toString = "class " + Names.classToString(getDelegate());
- members = new HashSet<WBMethod<?, ?>>();
- annotatedMembers = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WBMethod<?, ?>>>(), new Supplier<Set<WBMethod<?, ?>>>()
- {
-
- public Set<WBMethod<?, ?>> get()
- {
- return new HashSet<WBMethod<?, ?>>();
- }
-
- });
- this.namedMembers = new HashMap<String, WBMethod<?, ?>>();
- for (Method member : clazz.getDeclaredMethods())
- {
- WBMethod<?, ?> annotatedMethod = WBMethodImpl.of(member, this, classTransformer);
- members.add(annotatedMethod);
- for (Annotation annotation : annotatedMethod.getAnnotations())
- {
- annotatedMembers.put(annotation.annotationType(), annotatedMethod);
- }
- namedMembers.put(annotatedMethod.getName(), annotatedMethod);
- }
- }
-
- /**
- * Gets all members of the annotation
- *
- * Initializes the members first if they are null
- *
- * @return The set of abstracted members
- *
- * @see org.jboss.weld.introspector.WBAnnotation#getMembers()
- */
- public Set<WBMethod<?, ?>> getMembers()
- {
- return Collections.unmodifiableSet(members);
- }
-
- /**
- * Returns the annotated members with a given annotation type
- *
- * If the annotated members are null, they are initialized first.
- *
- * @param annotationType The annotation type to match
- * @return The set of abstracted members with the given annotation type
- * present. An empty set is returned if no matches are found
- *
- * @see org.jboss.weld.introspector.WBAnnotation#getAnnotatedMembers(Class)
- */
- public Set<WBMethod<?, ?>> getAnnotatedMembers(Class<? extends Annotation> annotationType)
- {
- return Collections.unmodifiableSet(annotatedMembers.get(annotationType));
- }
-
- public <A> WBMethod<A, ?> getMember(String memberName, WBClass<A> expectedType)
- {
- return (WBMethod<A, ?>) namedMembers.get(memberName);
- }
-
- /**
- * Gets a string representation of the annotation
- *
- * @return A string representation
- */
- @Override
- public String toString()
- {
- return toString;
- }
-
- @Override
- public Class<T> getDelegate()
- {
- return clazz;
- }
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBClassImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBClassImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBClassImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,771 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector.jlr;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.Field;
-import java.lang.reflect.Member;
-import java.lang.reflect.Method;
-import java.lang.reflect.Modifier;
-import java.lang.reflect.Type;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.List;
-import java.util.Map;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.AnnotatedConstructor;
-import javax.enterprise.inject.spi.AnnotatedField;
-import javax.enterprise.inject.spi.AnnotatedMethod;
-import javax.enterprise.inject.spi.AnnotatedType;
-
-import org.jboss.weld.introspector.AnnotationStore;
-import org.jboss.weld.introspector.ConstructorSignature;
-import org.jboss.weld.introspector.MethodSignature;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.WBConstructor;
-import org.jboss.weld.introspector.WBField;
-import org.jboss.weld.introspector.WBMethod;
-import org.jboss.weld.resources.ClassTransformer;
-import org.jboss.weld.util.Names;
-import org.jboss.weld.util.Reflections;
-
-import com.google.common.base.Supplier;
-import com.google.common.collect.Multimaps;
-import com.google.common.collect.SetMultimap;
-
-/**
- * Represents an annotated class
- *
- * This class is immutable, and therefore threadsafe
- *
- * @author Pete Muir
- *
- * @param <T>
- */
-public class WBClassImpl<T> extends AbstractWBAnnotated<T, Class<T>> implements WBClass<T>
-{
-
-// The superclass abstraction of the type
- private final WBClass<?> superclass;
- // The name of the type
- private final String name;
-
- private final String _simpleName;
- private final boolean _public;
- private final boolean _private;
- private final boolean _packagePrivate;
- private final Package _package;
-
- private static List<Class<?>> NO_ARGUMENTS = Collections.emptyList();
-
- // The set of abstracted fields
- private final Set<WBField<?, ?>> fields;
- // The map from annotation type to abstracted field with annotation
- private final SetMultimap<Class<? extends Annotation>, WBField<?, ?>> annotatedFields;
- // The map from annotation type to abstracted field with meta-annotation
- private final SetMultimap<Class<? extends Annotation>, WBField<?, ?>> metaAnnotatedFields;
-
- // The set of abstracted fields
- private final Set<WBField<?, ?>> declaredFields;
- private final Map<String, WBField<?, ?>> declaredFieldsByName;
- // The map from annotation type to abstracted field with annotation
- private final SetMultimap<Class<? extends Annotation>, WBField<?, T>> declaredAnnotatedFields;
- // The map from annotation type to abstracted field with meta-annotation
- private final SetMultimap<Class<? extends Annotation>, WBField<?, ?>> declaredMetaAnnotatedFields;
-
- // The set of abstracted methods
- private final Set<WBMethod<?, ?>> methods;
- private final Map<MethodSignature, WBMethod<?, ?>> declaredMethodsBySignature;
- private final Map<MethodSignature, WBMethod<?, ?>> methodsBySignature;
- // The map from annotation type to abstracted method with annotation
- private final SetMultimap<Class<? extends Annotation>, WBMethod<?, ?>> annotatedMethods;
- // The map from annotation type to method with a parameter with annotation
- private final SetMultimap<Class<? extends Annotation>, WBMethod<?, ?>> methodsByAnnotatedParameters;
-
- // The set of abstracted methods
- private final Set<WBMethod<?, ?>> declaredMethods;
- // The map from annotation type to abstracted method with annotation
- private final SetMultimap<Class<? extends Annotation>, WBMethod<?, T>> declaredAnnotatedMethods;
- // The map from annotation type to method with a parameter with annotation
- private final SetMultimap<Class<? extends Annotation>, WBMethod<?, T>> declaredMethodsByAnnotatedParameters;
-
- // The set of abstracted constructors
- private final Set<WBConstructor<T>> constructors;
- private final Map<ConstructorSignature, WBConstructor<?>> declaredConstructorsBySignature;
- // The map from annotation type to abstracted constructor with annotation
- private final SetMultimap<Class<? extends Annotation>, WBConstructor<T>> annotatedConstructors;
- // The map from class list to abstracted constructor
- private final Map<List<Class<?>>, WBConstructor<T>> constructorsByArgumentMap;
-
- private final SetMultimap<Class<? extends Annotation>, WBConstructor<?>> constructorsByAnnotatedParameters;
-
- // Cached string representation
- private final String toString;
-
- private final boolean _nonStaticMemberClass;
- private final boolean _abstract;
- private final boolean _enum;
-
- public static <T> WBClass<T> of(Class<T> clazz, ClassTransformer classTransformer)
- {
- AnnotationStore annotationStore = AnnotationStore.of(clazz.getAnnotations(), clazz.getDeclaredAnnotations(), classTransformer.getTypeStore());
- return new WBClassImpl<T>(clazz, clazz, null, annotationStore, classTransformer);
- }
-
- public static <T> WBClass<T> of(AnnotatedType<T> annotatedType, ClassTransformer classTransformer)
- {
- AnnotationStore annotationStore = AnnotationStore.of(annotatedType.getAnnotations(), annotatedType.getAnnotations(), classTransformer.getTypeStore());
- return new WBClassImpl<T>(annotatedType.getJavaClass(), annotatedType.getBaseType(), annotatedType, annotationStore, classTransformer);
- }
-
- protected WBClassImpl(Class<T> rawType, Type type, AnnotatedType<T> annotatedType, AnnotationStore annotationStore, ClassTransformer classTransformer)
- {
- super(annotationStore, rawType, type);
- this.toString = "class " + Names.classToString(rawType);
- this.name = rawType.getName();
- this._simpleName = rawType.getSimpleName();
- if (rawType.getSuperclass() != null)
- {
- this.superclass = classTransformer.loadClass(rawType.getSuperclass());
- }
- else
- {
- this.superclass = null;
- }
- this._public = Modifier.isFinal(rawType.getModifiers());
- this._private = Modifier.isPrivate(rawType.getModifiers());
- this._packagePrivate = Reflections.isPackagePrivate(rawType.getModifiers());
- this._package = rawType.getPackage();
- this.fields = new HashSet<WBField<?, ?>>();
- this.annotatedFields = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WBField<?, ?>>>(), new Supplier< Set<WBField<?, ?>>>()
- {
-
- public Set<WBField<?, ?>> get()
- {
- return new HashSet<WBField<?, ?>>();
- }
-
- });
- this.metaAnnotatedFields = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WBField<?, ?>>>(), new Supplier< Set<WBField<?, ?>>>()
- {
-
- public Set<WBField<?, ?>> get()
- {
- return new HashSet<WBField<?, ?>>();
- }
-
- });
- this.declaredFields = new HashSet<WBField<?, ?>>();
- this.declaredFieldsByName = new HashMap<String, WBField<?, ?>>();
- this.declaredAnnotatedFields = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WBField<?, T>>>(), new Supplier< Set<WBField<?, T>>>()
- {
-
- public Set<WBField<?, T>> get()
- {
- return new HashSet<WBField<?, T>>();
- }
-
- });
- this.declaredMetaAnnotatedFields = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WBField<?, ?>>>(), new Supplier< Set<WBField<?, ?>>>()
- {
-
- public Set<WBField<?, ?>> get()
- {
- return new HashSet<WBField<?, ?>>();
- }
-
- });
- this._nonStaticMemberClass = Reflections.isNonStaticInnerClass(rawType);
- this._abstract = Reflections.isAbstract(rawType);
- this._enum = rawType.isEnum();
-
-
- Map<Field, AnnotatedField<? super T>> annotatedTypeFields = new HashMap<Field, AnnotatedField<? super T>>();
- if (annotatedType != null)
- {
- for (AnnotatedField<? super T> annotatedField : annotatedType.getFields())
- {
- annotatedTypeFields.put(annotatedField.getJavaMember(), annotatedField);
- }
- }
-
- for (Class<?> c = rawType; c != Object.class && c != null; c = c.getSuperclass())
- {
- for (Field field : c.getDeclaredFields())
- {
- if (!field.isAccessible())
- {
- field.setAccessible(true);
- }
- WBField<?, T> annotatedField = null;
- if (annotatedTypeFields.containsKey(field))
- {
- annotatedField = WBFieldImpl.of(annotatedTypeFields.get(field), this.<T>getDeclaringWBClass(field, classTransformer), classTransformer);
- }
- else
- {
- annotatedField = WBFieldImpl.of(field, this.<T>getDeclaringWBClass(field, classTransformer), classTransformer);
- }
-
- this.fields.add(annotatedField);
- if (c == rawType)
- {
- this.declaredFields.add(annotatedField);
- this.declaredFieldsByName.put(annotatedField.getName(), annotatedField);
- }
- for (Annotation annotation : annotatedField.getAnnotations())
- {
- this.annotatedFields.put(annotation.annotationType(), annotatedField);
- if (c == rawType)
- {
- this.declaredAnnotatedFields.put(annotation.annotationType(), annotatedField);
- }
- for (Annotation metaAnnotation : annotation.annotationType().getAnnotations())
- {
- this.metaAnnotatedFields.put(metaAnnotation.annotationType(), annotatedField);
- if (c == rawType)
- {
- this.declaredMetaAnnotatedFields.put(metaAnnotation.annotationType(), annotatedField);
- }
- }
- }
-
- }
- }
-
- this.constructors = new HashSet<WBConstructor<T>>();
- this.constructorsByArgumentMap = new HashMap<List<Class<?>>, WBConstructor<T>>();
- this.annotatedConstructors = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WBConstructor<T>>>(), new Supplier< Set<WBConstructor<T>>>()
- {
-
- public Set<WBConstructor<T>> get()
- {
- return new HashSet<WBConstructor<T>>();
- }
-
- });
- this.constructorsByAnnotatedParameters = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WBConstructor<?>>>(), new Supplier< Set<WBConstructor<?>>>()
- {
-
- public Set<WBConstructor<?>> get()
- {
- return new HashSet<WBConstructor<?>>();
- }
-
- });
-
- Map<Constructor<? super T>, AnnotatedConstructor<T>> annotatedTypeConstructors = new HashMap<Constructor<? super T>, AnnotatedConstructor<T>>();
- if (annotatedType != null)
- {
- for (AnnotatedConstructor<T> annotated : annotatedType.getConstructors())
- {
- annotatedTypeConstructors.put(annotated.getJavaMember(), annotated);
- }
- }
-
- this.declaredConstructorsBySignature = new HashMap<ConstructorSignature, WBConstructor<?>>();
- for (Constructor<?> constructor : rawType.getDeclaredConstructors())
- {
- WBConstructor<T> annotatedConstructor = null;
- if (annotatedTypeConstructors.containsKey(constructor))
- {
- WBClass<T> declaringClass = this.getDeclaringWBClass(constructor, classTransformer);
- annotatedConstructor = WBConstructorImpl.of(annotatedTypeConstructors.get(constructor), declaringClass, classTransformer);
- }
- else
- {
- // TODO Fix this cast
- Constructor<T> c = (Constructor<T>) constructor;
- annotatedConstructor = WBConstructorImpl.of(c, this.<T>getDeclaringWBClass(c, classTransformer), classTransformer);
- }
-
- if (!constructor.isAccessible())
- {
- constructor.setAccessible(true);
- }
- this.constructors.add(annotatedConstructor);
- this.constructorsByArgumentMap.put(Arrays.asList(constructor.getParameterTypes()), annotatedConstructor);
-
- this.declaredConstructorsBySignature.put(annotatedConstructor.getSignature(), annotatedConstructor);
-
- for (Annotation annotation : annotatedConstructor.getAnnotations())
- {
- if (!annotatedConstructors.containsKey(annotation.annotationType()))
- {
- annotatedConstructors.putAll(annotation.annotationType(), new HashSet<WBConstructor<T>>());
- }
- annotatedConstructors.get(annotation.annotationType()).add(annotatedConstructor);
- }
-
- for (Class<? extends Annotation> annotationType : WBConstructor.MAPPED_PARAMETER_ANNOTATIONS)
- {
- if (annotatedConstructor.getAnnotatedWBParameters(annotationType).size() > 0)
- {
- constructorsByAnnotatedParameters.put(annotationType, annotatedConstructor);
- }
- }
- }
-
- this.methods = new HashSet<WBMethod<?, ?>>();
- this.annotatedMethods = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WBMethod<?, ?>>>(), new Supplier< Set<WBMethod<?, ?>>>()
- {
-
- public Set<WBMethod<?, ?>> get()
- {
- return new HashSet<WBMethod<?, ?>>();
- }
-
- });
- this.methodsByAnnotatedParameters = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WBMethod<?, ?>>>(), new Supplier< Set<WBMethod<?, ?>>>()
- {
-
- public Set<WBMethod<?, ?>> get()
- {
- return new HashSet<WBMethod<?, ?>>();
- }
-
- });
- this.declaredMethods = new HashSet<WBMethod<?, ?>>();
- this.declaredAnnotatedMethods = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WBMethod<?, T>>>(), new Supplier< Set<WBMethod<?, T>>>()
- {
-
- public Set<WBMethod<?, T>> get()
- {
- return new HashSet<WBMethod<?, T>>();
- }
-
- });
- this.declaredMethodsByAnnotatedParameters = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WBMethod<?, T>>>(), new Supplier< Set<WBMethod<?, T>>>()
- {
-
- public Set<WBMethod<?, T>> get()
- {
- return new HashSet<WBMethod<?, T>>();
- }
-
- });
- this.declaredMethodsBySignature = new HashMap<MethodSignature, WBMethod<?, ?>>();
- this.methodsBySignature = new HashMap<MethodSignature, WBMethod<?, ?>>();
-
- Map<Method, AnnotatedMethod<?>> annotatedTypeMethods = new HashMap<Method, AnnotatedMethod<?>>();
- if (annotatedType != null)
- {
- for (AnnotatedMethod<?> annotated : annotatedType.getMethods())
- {
- annotatedTypeMethods.put(annotated.getJavaMember(), annotated);
- }
- }
-
- for (Class<?> c = rawType; c != Object.class && c != null; c = c.getSuperclass())
- {
- for (Method method : c.getDeclaredMethods())
- {
- if (!method.isAccessible())
- {
- method.setAccessible(true);
- }
-
- WBMethod<?, T> annotatedMethod = null;
- if (annotatedTypeMethods.containsKey(method))
- {
- annotatedMethod = WBMethodImpl.of(annotatedTypeMethods.get(method), this, classTransformer);
- }
- else
- {
- annotatedMethod = WBMethodImpl.of(method, this.<T>getDeclaringWBClass(method, classTransformer), classTransformer);
- }
- this.methods.add(annotatedMethod);
- this.methodsBySignature.put(annotatedMethod.getSignature(), annotatedMethod);
- if (c == rawType)
- {
- this.declaredMethods.add(annotatedMethod);
- this.declaredMethodsBySignature.put(annotatedMethod.getSignature(), annotatedMethod);
- }
- for (Annotation annotation : annotatedMethod.getAnnotations())
- {
- annotatedMethods.put(annotation.annotationType(), annotatedMethod);
- if (c == rawType)
- {
- this.declaredAnnotatedMethods.put(annotation.annotationType(), annotatedMethod);
- }
- }
- for (Class<? extends Annotation> annotationType : WBMethod.MAPPED_PARAMETER_ANNOTATIONS)
- {
- if (annotatedMethod.getAnnotatedWBParameters(annotationType).size() > 0)
- {
- methodsByAnnotatedParameters.put(annotationType, annotatedMethod);
- if (c == rawType)
- {
- this.declaredMethodsByAnnotatedParameters.put(annotationType, annotatedMethod);
- }
- }
- }
- }
- }
- }
-
- @SuppressWarnings("unchecked")
- private <X> WBClass<X> getDeclaringWBClass(Member member, ClassTransformer transformer)
- {
- if (member.getDeclaringClass().equals(getJavaClass()))
- {
- return (WBClass<X>) this;
- }
- else
- {
- return transformer.loadClass((Class<X>) member.getDeclaringClass());
- }
- }
-
- /**
- * Gets the implementing class
- *
- * @return The class
- */
- public Class<? extends T> getAnnotatedClass()
- {
- return getJavaClass();
- }
-
- /**
- * Gets the delegate (class)
- *
- * @return The class
- */
- @Override
- public Class<T> getDelegate()
- {
- return getJavaClass();
- }
-
- /**
- * Gets the abstracted fields of the class
- *
- * Initializes the fields if they are null
- *
- * @return The set of abstracted fields
- */
- public Set<WBField<?, ?>> getWBFields()
- {
- return Collections.unmodifiableSet(fields);
- }
-
- public Set<WBField<?, ?>> getDeclaredFields()
- {
- return Collections.unmodifiableSet(declaredFields);
- }
-
- public <F> WBField<F, ?> getDeclaredWBField(String fieldName, WBClass<F> expectedType)
- {
- return (WBField<F, ?>) declaredFieldsByName.get(fieldName);
- }
-
- public Set<WBField<?, T>> getDeclaredAnnotatedWBFields(Class<? extends Annotation> annotationType)
- {
- return Collections.unmodifiableSet(declaredAnnotatedFields.get(annotationType));
- }
-
- /**
- * Gets the abstracted constructors of the class
- *
- * Initializes the constructors if they are null
- *
- * @return The set of abstracted constructors
- */
- public Set<WBConstructor<T>> getWBConstructors()
- {
- return Collections.unmodifiableSet(constructors);
- }
-
- public WBConstructor<T> getDeclaredWBConstructor(ConstructorSignature signature)
- {
- return (WBConstructor<T>) declaredConstructorsBySignature.get(signature);
- }
-
- /**
- * Gets abstracted fields with requested meta-annotation type present
- *
- * If the meta-annotations map is null, it is initializes. If the annotated
- * fields are null, it is initialized The meta-annotated field map is then
- * populated for the requested meta-annotation type and the result is
- * returned
- *
- * @param metaAnnotationType The meta-annotation type to match
- * @return The set of abstracted fields with meta-annotation present. Returns
- * an empty set if no matches are found.
- */
- public Set<WBField<?, ?>> getMetaAnnotatedWBFields(Class<? extends Annotation> metaAnnotationType)
- {
- return Collections.unmodifiableSet(metaAnnotatedFields.get(metaAnnotationType));
- }
-
- /**
- * Gets the abstracted field annotated with a specific annotation type
- *
- * If the fields map is null, initialize it first
- *
- * @param annotationType The annotation type to match
- * @return A set of matching abstracted fields, null if none are found.
- *
- */
- public Set<WBField<?, ?>> getAnnotatedWBFields(Class<? extends Annotation> annotationType)
- {
- return Collections.unmodifiableSet(annotatedFields.get(annotationType));
- }
-
- public boolean isNonStaticMemberClass()
- {
- return _nonStaticMemberClass;
- }
-
- public boolean isAbstract()
- {
- return _abstract;
- }
-
- public boolean isEnum()
- {
- return _enum;
- }
-
- /**
- * Gets the abstracted methods that have a certain annotation type present
- *
- * If the annotated methods map is null, initialize it first
- *
- * @param annotationType The annotation type to match
- * @return A set of matching method abstractions. Returns an empty set if no
- * matches are found.
- *
- * @see org.jboss.weld.introspector.WBClass#getAnnotatedWBMethods(Class)
- */
- public Set<WBMethod<?, ?>> getAnnotatedWBMethods(Class<? extends Annotation> annotationType)
- {
- return Collections.unmodifiableSet(annotatedMethods.get(annotationType));
- }
-
- public Set<WBMethod<?, T>> getDeclaredAnnotatedWBMethods(Class<? extends Annotation> annotationType)
- {
- return Collections.unmodifiableSet(declaredAnnotatedMethods.get(annotationType));
- }
-
- /**
- * Gets constructors with given annotation type
- *
- * @param annotationType The annotation type to match
- * @return A set of abstracted constructors with given annotation type. If
- * the constructors set is empty, initialize it first. Returns an
- * empty set if there are no matches.
- *
- * @see org.jboss.weld.introspector.WBClass#getAnnotatedWBConstructors(Class)
- */
- public Set<WBConstructor<T>> getAnnotatedWBConstructors(Class<? extends Annotation> annotationType)
- {
- return Collections.unmodifiableSet(annotatedConstructors.get(annotationType));
- }
-
- public WBConstructor<T> getNoArgsWBConstructor()
- {
- return constructorsByArgumentMap.get(NO_ARGUMENTS);
- }
-
- public Set<WBMethod<?, ?>> getWBMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
- {
- return Collections.unmodifiableSet(methodsByAnnotatedParameters.get(annotationType));
- }
-
- public Set<WBConstructor<?>> getWBConstructorsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
- {
- return Collections.unmodifiableSet(constructorsByAnnotatedParameters.get(annotationType));
- }
-
- public Set<WBMethod<?, T>> getDeclaredWBMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
- {
- return Collections.unmodifiableSet(declaredMethodsByAnnotatedParameters.get(annotationType));
- }
-
- public WBMethod<?, ?> getWBMethod(Method methodDescriptor)
- {
- // TODO Should be cached
- for (WBMethod<?, ?> annotatedMethod : methods)
- {
- if (annotatedMethod.getName().equals(methodDescriptor.getName()) && Arrays.equals(annotatedMethod.getParameterTypesAsArray(), methodDescriptor.getParameterTypes()))
- {
- return annotatedMethod;
- }
- }
- return null;
- }
-
- public Set<WBMethod<?, ?>> getWBMethods()
- {
- return Collections.unmodifiableSet(methods);
- }
-
- public WBMethod<?, ?> getDeclaredWBMethod(Method method)
- {
- // TODO Should be cached
- for (WBMethod<?, ?> annotatedMethod : declaredMethods)
- {
- if (annotatedMethod.getName().equals(method.getName()) && Arrays.equals(annotatedMethod.getParameterTypesAsArray(), method.getParameterTypes()))
- {
- return annotatedMethod;
- }
- }
- return null;
- }
-
- public Set<WBMethod<?, ?>> getDeclaredWBMethods()
- {
- return declaredMethods;
- }
-
- @SuppressWarnings("unchecked")
- public <M> WBMethod<M, ?> getDeclaredWBMethod(MethodSignature signature, WBClass<M> expectedReturnType)
- {
- return (WBMethod<M, ?>) declaredMethodsBySignature.get(signature);
- }
-
- @SuppressWarnings("unchecked")
- public <M> WBMethod<M, ?> getWBMethod(MethodSignature signature)
- {
- return (WBMethod<M, ?>) methodsBySignature.get(signature);
- }
-
- /**
- * Gets a string representation of the class
- *
- * @return A string representation
- */
- @Override
- public String toString()
- {
- return toString;
- }
-
- public String getSimpleName()
- {
- return _simpleName;
- }
-
- /**
- * Indicates if the type is static
- *
- * @return True if static, false otherwise
- *
- * @see org.jboss.weld.introspector.WBAnnotated#isStatic()
- */
- public boolean isStatic()
- {
- return Reflections.isStatic(getDelegate());
- }
-
- /**
- * Indicates if the type if final
- *
- * @return True if final, false otherwise
- *
- * @see org.jboss.weld.introspector.WBAnnotated#isFinal()
- */
- public boolean isFinal()
- {
- return Reflections.isFinal(getDelegate());
- }
-
- public boolean isPublic()
- {
- return _public;
- }
-
- /**
- * Gets the name of the type
- *
- * @returns The name
- *
- * @see org.jboss.weld.introspector.WBAnnotated#getName()
- */
- public String getName()
- {
- return name;
- }
-
- /**
- * Gets the superclass abstraction of the type
- *
- * @return The superclass abstraction
- */
- public WBClass<?> getWBSuperclass()
- {
- return superclass;
- }
-
- public boolean isEquivalent(Class<?> clazz)
- {
- return getDelegate().equals(clazz);
- }
-
- public boolean isPrivate()
- {
- return _private;
- }
-
- public boolean isPackagePrivate()
- {
- return _packagePrivate;
- }
-
- public Package getPackage()
- {
- return _package;
- }
-
- @SuppressWarnings("unchecked")
- public <U> WBClass<? extends U> asWBSubclass(WBClass<U> clazz)
- {
- return (WBClass<? extends U>) this;
- }
-
- @SuppressWarnings("unchecked")
- public <S> S cast(Object object)
- {
- return (S) object;
- }
-
- @SuppressWarnings("unchecked")
- public Set<AnnotatedConstructor<T>> getConstructors()
- {
- return (Set) constructors;
- }
-
- @SuppressWarnings("unchecked")
- public Set<AnnotatedField<? super T>> getFields()
- {
- return (Set) fields;
- }
-
- @SuppressWarnings("unchecked")
- public Set<AnnotatedMethod<? super T>> getMethods()
- {
- return (Set) methods;
- }
-
-}
\ No newline at end of file
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBConstructorImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBConstructorImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBConstructorImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,287 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector.jlr;
-
-import static org.jboss.weld.util.Reflections.ensureAccessible;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Constructor;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.enterprise.inject.spi.AnnotatedConstructor;
-import javax.enterprise.inject.spi.AnnotatedParameter;
-
-import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.introspector.AnnotationStore;
-import org.jboss.weld.introspector.ConstructorSignature;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.WBConstructor;
-import org.jboss.weld.introspector.WBParameter;
-import org.jboss.weld.resources.ClassTransformer;
-
-import com.google.common.base.Supplier;
-import com.google.common.collect.ListMultimap;
-import com.google.common.collect.Multimaps;
-
-/**
- * Represents an annotated constructor
- *
- * This class is immutable, and therefore threadsafe
- *
- * @author Pete Muir
- *
- * @param <T>
- */
-public class WBConstructorImpl<T> extends AbstractWBCallable<T, T, Constructor<T>> implements WBConstructor<T>
-{
-
- // The underlying constructor
- private final Constructor<T> constructor;
-
- // The list of parameter abstractions
- private final List<WBParameter<?, ?>> parameters;
- // The mapping of annotation -> parameter abstraction
- private final ListMultimap<Class<? extends Annotation>, WBParameter<?, ?>> annotatedParameters;
-
- private final ConstructorSignature signature;
-
- // Cached string representation
- private final String toString;
-
- public static <T> WBConstructor<T> of(Constructor<T> constructor, WBClass<T> declaringClass, ClassTransformer classTransformer)
- {
- AnnotationStore annotationStore = AnnotationStore.of(constructor, classTransformer.getTypeStore());
- return new WBConstructorImpl<T>(ensureAccessible(constructor), null, annotationStore, declaringClass, classTransformer);
- }
-
- public static <T> WBConstructor<T> of(AnnotatedConstructor<T> annotatedConstructor, WBClass<T> declaringClass, ClassTransformer classTransformer)
- {
- AnnotationStore annotationStore = AnnotationStore.of(annotatedConstructor.getAnnotations(), annotatedConstructor.getAnnotations(), classTransformer.getTypeStore());
- return new WBConstructorImpl<T>(ensureAccessible(annotatedConstructor.getJavaMember()), annotatedConstructor, annotationStore, declaringClass, classTransformer);
- }
-
- /**
- * Constructor
- *
- * Initializes the superclass with the build annotations map
- *
- * @param constructor The constructor method
- * @param declaringClass The declaring class
- */
- private WBConstructorImpl(Constructor<T> constructor, AnnotatedConstructor<T> annotatedConstructor, AnnotationStore annotationStore, WBClass<T> declaringClass, ClassTransformer classTransformer)
- {
- super(annotationStore, constructor, constructor.getDeclaringClass(), constructor.getDeclaringClass(), declaringClass);
- this.toString = new StringBuilder().append("constructor ").append(constructor.toString()).toString();
- this.constructor = constructor;
-
- this.parameters = new ArrayList<WBParameter<?, ?>>();
- annotatedParameters = Multimaps.newListMultimap(new HashMap<Class<? extends Annotation>, Collection<WBParameter<?, ?>>>(), new Supplier< List<WBParameter<?, ?>>>()
- {
-
- public List<WBParameter<?, ?>> get()
- {
- return new ArrayList<WBParameter<?, ?>>();
- }
-
- });
-
- Map<Integer, AnnotatedParameter<?>> annotatedTypeParameters = new HashMap<Integer, AnnotatedParameter<?>>();
-
- if (annotatedConstructor != null)
- {
- for (AnnotatedParameter<?> annotated : annotatedConstructor.getParameters())
- {
- annotatedTypeParameters.put(annotated.getPosition(), annotated);
- }
- }
-
- for (int i = 0; i < constructor.getParameterTypes().length; i++)
- {
- if (constructor.getParameterAnnotations()[i].length > 0 || annotatedTypeParameters.containsKey(i))
- {
- Class<?> clazz = constructor.getParameterTypes()[i];
- Type type = constructor.getGenericParameterTypes()[i];
- WBParameter<?, ?> parameter = null;
- if (annotatedTypeParameters.containsKey(i))
- {
- AnnotatedParameter<?> annotatedParameter = annotatedTypeParameters.get(i);
- parameter = WBParameterImpl.of(annotatedParameter.getAnnotations(), clazz, type, this, i, classTransformer);
- }
- else
- {
- parameter = WBParameterImpl.of(constructor.getParameterAnnotations()[i], clazz, type, this, i, classTransformer);
- }
-
- parameters.add(parameter);
-
- for (Annotation annotation : parameter.getAnnotations())
- {
- annotatedParameters.put(annotation.annotationType(), parameter);
- }
- }
- else
- {
- Class<?> clazz = constructor.getParameterTypes()[i];
- Type type;
- if (constructor.getGenericParameterTypes().length > i)
- {
- type = constructor.getGenericParameterTypes()[i];
- }
- else
- {
- type = clazz;
- }
- WBParameter<?, ?> parameter = WBParameterImpl.of(new Annotation[0], clazz, type, this, i, classTransformer);
- parameters.add(parameter);
-
- for (Annotation annotation : parameter.getAnnotations())
- {
- annotatedParameters.put(annotation.annotationType(), parameter);
- }
- }
- }
- this.signature = new ConstructorSignatureImpl(this);
- }
-
- /**
- * Gets the constructor
- *
- * @return The constructor
- */
- public Constructor<T> getAnnotatedConstructor()
- {
- return constructor;
- }
-
- /**
- * Gets the delegate (constructor)
- *
- * @return The delegate
- */
- @Override
-public Constructor<T> getDelegate()
- {
- return constructor;
- }
-
- /**
- * Gets the abstracted parameters
- *
- * If the parameters are null, initalize them first
- *
- * @return A list of annotated parameter abstractions
- *
- * @see org.jboss.weld.introspector.WBConstructor#getWBParameters()
- */
- public List<WBParameter<?, ?>> getWBParameters()
- {
- return Collections.unmodifiableList(parameters);
- }
-
- /**
- * Gets parameter abstractions with a given annotation type.
- *
- * If the parameters are null, they are initializes first.
- *
- * @param annotationType The annotation type to match
- * @return A list of matching parameter abstractions. An empty list is
- * returned if there are no matches.
- *
- * @see org.jboss.weld.introspector.WBConstructor#getAnnotatedWBParameters(Class)
- */
- public List<WBParameter<?, ?>> getAnnotatedWBParameters(Class<? extends Annotation> annotationType)
- {
- return Collections.unmodifiableList(annotatedParameters.get(annotationType));
- }
-
- /**
- * Creates a new instance
- *
- * @param manager The Bean manager
- * @return An instance
- * @throws InvocationTargetException
- * @throws IllegalAccessException
- * @throws InstantiationException
- * @throws IllegalArgumentException
- *
- * @see org.jboss.weld.introspector.WBConstructor#newInstance(BeanManagerImpl)
- */
- public T newInstance(Object... parameters) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
- {
- return getDelegate().newInstance(parameters);
- }
-
- /**
- * The overridden equals operation
- *
- * @param other The instance to compare to
- * @return True if equal, false otherwise
- */
- @Override
- public boolean equals(Object other)
- {
-
- if (super.equals(other) && other instanceof WBConstructor)
- {
- WBConstructor<?> that = (WBConstructor<?>) other;
- return this.getDeclaringType().equals(that.getDeclaringType()) && this.getWBParameters().equals(that.getWBParameters());
- }
- return false;
- }
-
- /**
- * The overridden hashcode
- *
- * Gets the hash code from the delegate
- *
- * @return The hash code
- */
- @Override
- public int hashCode()
- {
- return getDelegate().hashCode();
- }
-
- /**
- * Gets a string representation of the constructor
- *
- * @return A string representation
- */
- @Override
- public String toString()
- {
- return toString;
- }
-
- public ConstructorSignature getSignature()
- {
- return signature;
- }
-
- public List<AnnotatedParameter<T>> getParameters()
- {
- return Collections.unmodifiableList((List) parameters);
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBFieldImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBFieldImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBFieldImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,153 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector.jlr;
-
-import static org.jboss.weld.util.Reflections.ensureAccessible;
-
-import java.lang.reflect.Field;
-
-import javax.enterprise.inject.spi.AnnotatedField;
-
-import org.jboss.weld.introspector.AnnotationStore;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.WBField;
-import org.jboss.weld.resources.ClassTransformer;
-import org.jboss.weld.util.Reflections;
-
-/**
- * Represents an annotated field
- *
- * This class is immutable, and therefore threadsafe
- *
- * @author Pete Muir
- *
- * @param <T>
- */
-public class WBFieldImpl<T, X> extends AbstractWBMember<T, X, Field> implements WBField<T, X>
-{
-
- // The underlying field
- private final Field field;
-
- // Cached string representation
- private final String toString;
-
- public static <T, X> WBFieldImpl<T, X> of(Field field, WBClass<X> declaringClass, ClassTransformer classTransformer)
- {
- AnnotationStore annotationStore = AnnotationStore.of(field, classTransformer.getTypeStore());
- return new WBFieldImpl<T, X>(ensureAccessible(field), annotationStore, declaringClass, classTransformer);
- }
-
- public static <T, X> WBFieldImpl<T, X> of(AnnotatedField<? super X> annotatedField, WBClass<X> declaringClass, ClassTransformer classTransformer)
- {
- AnnotationStore annotationStore = AnnotationStore.of(annotatedField.getAnnotations(), annotatedField.getAnnotations(), classTransformer.getTypeStore());
- return new WBFieldImpl<T, X>(ensureAccessible(annotatedField.getJavaMember()), annotationStore, declaringClass, classTransformer);
- }
-
- /**
- * Constructor
- *
- * Initializes the superclass with the built annotation map and detects the
- * type arguments
- *
- * @param field The actual field
- * @param declaringClass The abstraction of the declaring class
- */
- private WBFieldImpl(Field field, AnnotationStore annotationStore, WBClass<X> declaringClass, ClassTransformer classTransformer)
- {
- super(annotationStore, field, (Class<T>) field.getType(), field.getGenericType(), declaringClass);
- this.field = field;
- this.toString = new StringBuilder().append("field ").append(declaringClass.getName()).append(".").append(field.getName()).toString();
- }
-
- /**
- * Gets the underlying field
- *
- * @return The fields
- */
- public Field getAnnotatedField()
- {
- return field;
- }
-
- @Override
- public Field getDelegate()
- {
- return field;
- }
-
- public void set(Object instance, Object value) throws IllegalArgumentException, IllegalAccessException
- {
- field.set(instance, value);
- }
-
- public void setOnInstance(Object instance, Object value) throws IllegalArgumentException, SecurityException, IllegalAccessException, NoSuchFieldException
- {
- instance.getClass().getField(getName()).set(instance, value);
- }
-
- @SuppressWarnings("unchecked")
- public T get(Object instance)
- {
- return (T) Reflections.getAndWrap(getDelegate(), instance);
- }
-
- /**
- * Gets the property name
- *
- * @return The property name
- *
- * @see org.jboss.weld.introspector.WBField#getName()
- */
- public String getPropertyName()
- {
- return getName();
- }
-
- /**
- * Gets a string representation of the field
- *
- * @return A string representation
- */
- @Override
- public String toString()
- {
- return this.toString;
- }
-
- @Override
- public boolean equals(Object other)
- {
- if (other instanceof WBField<?, ?>)
- {
- WBField<?, ?> that = (WBField<?, ?>) other;
- return this.getDeclaringType().equals(that.getDeclaringType()) && this.getName().equals(that.getName());
- }
- else
- {
- return false;
- }
- }
-
-
- @Override
- public int hashCode()
- {
- return getDelegate().hashCode();
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBMethodImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBMethodImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBMethodImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,259 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector.jlr;
-
-import static org.jboss.weld.util.Reflections.ensureAccessible;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationTargetException;
-import java.lang.reflect.Method;
-import java.lang.reflect.Type;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.Collection;
-import java.util.Collections;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-import javax.enterprise.inject.spi.AnnotatedMethod;
-import javax.enterprise.inject.spi.AnnotatedParameter;
-
-import org.jboss.weld.introspector.AnnotationStore;
-import org.jboss.weld.introspector.MethodSignature;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.WBMethod;
-import org.jboss.weld.introspector.WBParameter;
-import org.jboss.weld.resources.ClassTransformer;
-import org.jboss.weld.util.Reflections;
-
-import com.google.common.base.Supplier;
-import com.google.common.collect.ListMultimap;
-import com.google.common.collect.Multimaps;
-
-/**
- * Represents an annotated method
- *
- * This class is immutable and therefore threadsafe
- *
- * @author Pete Muir
- *
- * @param <T>
- */
-public class WBMethodImpl<T, X> extends AbstractWBCallable<T, X, Method> implements WBMethod<T, X>
-{
-
- // The underlying method
- private final Method method;
-
- // The abstracted parameters
- private final List<WBParameter<?, ?>> parameters;
- // A mapping from annotation type to parameter abstraction with that
- // annotation present
- private final ListMultimap<Class<? extends Annotation>, WBParameter<?, ?>> annotatedParameters;
-
- // The property name
- private final String propertyName;
-
- // Cached string representation
- private final String toString;
-
- private final MethodSignature signature;
-
- public static <T, X> WBMethodImpl<T, X> of(Method method, WBClass<X> declaringClass, ClassTransformer classTransformer)
- {
- AnnotationStore annotationStore = AnnotationStore.of(method, classTransformer.getTypeStore());
- return new WBMethodImpl<T, X>(ensureAccessible(method), null, annotationStore, declaringClass, classTransformer);
- }
-
- public static <T, X> WBMethodImpl<T, X> of(AnnotatedMethod<T> method, WBClass<X> declaringClass, ClassTransformer classTransformer)
- {
- AnnotationStore annotationStore = AnnotationStore.of(method.getAnnotations(), method.getAnnotations(), classTransformer.getTypeStore());
- return new WBMethodImpl<T, X>(ensureAccessible(method.getJavaMember()), method, annotationStore, declaringClass, classTransformer);
- }
-
- /**
- * Constructor
- *
- * Initializes the superclass with the built annotation map, sets the method
- * and declaring class abstraction and detects the actual type arguments
- *
- * @param method The underlying method
- * @param declaringClass The declaring class abstraction
- */
- @SuppressWarnings("unchecked")
- private WBMethodImpl(Method method, AnnotatedMethod<T> annotatedMethod, AnnotationStore annotationStore, WBClass<X> declaringClass, ClassTransformer classTransformer)
- {
- super(annotationStore, method, (Class<T>) method.getReturnType(), method.getGenericReturnType(), declaringClass);
- this.method = method;
- this.toString = new StringBuilder().append("method ").append(method.toString()).toString();
- this.parameters = new ArrayList<WBParameter<?, ?>>();
- this.annotatedParameters = Multimaps.newListMultimap(new HashMap<Class<? extends Annotation>, Collection<WBParameter<?, ?>>>(), new Supplier< List<WBParameter<?, ?>>>()
- {
-
- public List<WBParameter<?, ?>> get()
- {
- return new ArrayList<WBParameter<?, ?>>();
- }
-
- });
-
- Map<Integer, AnnotatedParameter<?>> annotatedTypeParameters = new HashMap<Integer, AnnotatedParameter<?>>();
-
- if (annotatedMethod != null)
- {
- for (AnnotatedParameter<?> annotated : annotatedMethod.getParameters())
- {
- annotatedTypeParameters.put(annotated.getPosition(), annotated);
- }
- }
-
- for (int i = 0; i < method.getParameterTypes().length; i++)
- {
- if (method.getParameterAnnotations()[i].length > 0 || annotatedTypeParameters.containsKey(i))
- {
- Class<? extends Object> clazz = method.getParameterTypes()[i];
- Type type = method.getGenericParameterTypes()[i];
- WBParameter<?, ?> parameter = null;
- if (annotatedTypeParameters.containsKey(i))
- {
- AnnotatedParameter<?> annotatedParameter = annotatedTypeParameters.get(i);
- parameter = WBParameterImpl.of(annotatedParameter.getAnnotations(), clazz, type, this, i, classTransformer);
- }
- else
- {
- parameter = WBParameterImpl.of(method.getParameterAnnotations()[i], clazz, type, this, i, classTransformer);
- }
- this.parameters.add(parameter);
- for (Annotation annotation : parameter.getAnnotations())
- {
- if (MAPPED_PARAMETER_ANNOTATIONS.contains(annotation.annotationType()))
- {
- annotatedParameters.put(annotation.annotationType(), parameter);
- }
- }
- }
- else
- {
- Class<? extends Object> clazz = method.getParameterTypes()[i];
- Type type = method.getGenericParameterTypes()[i];
- WBParameter<?, ?> parameter = WBParameterImpl.of(new Annotation[0], (Class<Object>) clazz, type, this, i, classTransformer);
- this.parameters.add(parameter);
- }
- }
-
- String propertyName = Reflections.getPropertyName(getDelegate());
- if (propertyName == null)
- {
- this.propertyName = getName();
- }
- else
- {
- this.propertyName = propertyName;
- }
- this.signature = new MethodSignatureImpl(this);
-
- }
-
- public Method getAnnotatedMethod()
- {
- return method;
- }
-
- @Override
- public Method getDelegate()
- {
- return method;
- }
-
- public List<WBParameter<?, ?>> getWBParameters()
- {
- return Collections.unmodifiableList(parameters);
- }
-
- public Class<?>[] getParameterTypesAsArray()
- {
- return method.getParameterTypes();
- }
-
- public List<WBParameter<?, ?>> getAnnotatedWBParameters(Class<? extends Annotation> annotationType)
- {
- return Collections.unmodifiableList(annotatedParameters.get(annotationType));
- }
-
- @Override
- public boolean equals(Object other)
- {
- if (other instanceof WBMethod)
- {
- WBMethod<?, ?> that = (WBMethod<?, ?>) other;
- return this.getDeclaringType().equals(that.getDeclaringType()) && this.getName().equals(that.getName()) && this.getWBParameters().equals(that.getWBParameters());
- }
- else
- {
- return false;
- }
- }
-
- public boolean isEquivalent(Method method)
- {
- return this.getDeclaringType().isEquivalent(method.getDeclaringClass()) && this.getName().equals(method.getName()) && Arrays.equals(this.getParameterTypesAsArray(), method.getParameterTypes());
- }
-
- @Override
- public int hashCode()
- {
- return getDelegate().hashCode();
- }
-
- public T invokeOnInstance(Object instance, Object...parameters) throws IllegalArgumentException, SecurityException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
- {
- Method method = Reflections.lookupMethod(getName(), getParameterTypesAsArray(), instance);
- @SuppressWarnings("unchecked")
- T result = (T) method.invoke(instance, parameters);
- return result;
- }
-
- public T invoke(Object instance, Object... parameters) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
- {
- @SuppressWarnings("unchecked")
- T result = (T) method.invoke(instance, parameters);
- return result;
- }
-
- public String getPropertyName()
- {
- return propertyName;
- }
-
- @Override
- public String toString()
- {
- return this.toString;
- }
-
- public MethodSignature getSignature()
- {
- return signature;
- }
-
- public List<AnnotatedParameter<X>> getParameters()
- {
- return Collections.unmodifiableList((List) parameters);
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBParameterImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBParameterImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBParameterImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,165 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.introspector.jlr;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.util.Set;
-
-import javax.enterprise.inject.spi.AnnotatedCallable;
-
-import org.jboss.weld.introspector.AnnotationStore;
-import org.jboss.weld.introspector.WBCallable;
-import org.jboss.weld.introspector.WBParameter;
-import org.jboss.weld.resources.ClassTransformer;
-
-/**
- * Represents a parameter
- *
- * This class is immutable and therefore threadsafe
- *
- * @author Pete Muir
- *
- * @param <T>
- */
-public class WBParameterImpl<T, X> extends AbstractWBAnnotated<T, Object> implements WBParameter<T, X>
-{
-
- private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
-
- // The final state
- private final boolean _final = false;
- // The static state
- private final boolean _static = false;
- private final boolean _public = false;
- private final boolean _private = false;
- private final boolean _packagePrivate = false;
- private final Package _package;
- private final int position;
- private final WBCallable<?, X, ?> declaringMember;
-
- private final String toString;
-
- public static <T, X> WBParameter<T, X> of(Annotation[] annotations, Class<T> rawType, Type type, WBCallable<?, X, ?> declaringMember, int position, ClassTransformer classTransformer)
- {
- return new WBParameterImpl<T, X>(annotations, rawType, type, declaringMember, position, classTransformer);
- }
-
- public static <T, X> WBParameter<T, X> of(Set<Annotation> annotations, Class<T> rawType, Type type, WBCallable<?, X, ?> declaringMember, int position, ClassTransformer classTransformer)
- {
- return new WBParameterImpl<T, X>(annotations.toArray(EMPTY_ANNOTATION_ARRAY), rawType, type, declaringMember, position, classTransformer);
- }
-
- /**
- * Constructor
- *
- * @param annotations The annotations array
- * @param type The type of the parameter
- */
- protected WBParameterImpl(Annotation[] annotations, Class<T> rawType, Type type, WBCallable<?, X, ?> declaringMember, int position, ClassTransformer classTransformer)
- {
- super(AnnotationStore.of(annotations, annotations, classTransformer.getTypeStore()), rawType, type);
- this.declaringMember = declaringMember;
- this._package = declaringMember.getPackage();
- this.position = position;
- this.toString = new StringBuilder().append("parameter ").append(position).append(" of ").append(declaringMember.toString()).toString();
- }
-
- /**
- * Indicates if the parameter is final
- *
- * @return True if final, false otherwise
- *
- * @see org.jboss.weld.introspector.WBAnnotated#isFinal()
- */
- public boolean isFinal()
- {
- return _final;
- }
-
- /**
- * Indicates if the parameter is static
- *
- * @return True if static, false otherwise
- *
- * @see org.jboss.weld.introspector.WBAnnotated#isStatic()
- */
- public boolean isStatic()
- {
- return _static;
- }
-
- public boolean isPublic()
- {
- return _public;
- }
-
- public boolean isPrivate()
- {
- return _private;
- }
-
- public boolean isPackagePrivate()
- {
- return _packagePrivate;
- }
-
- public Package getPackage()
- {
- return _package;
- }
-
- /**
- * Gets the name of the parameter
- *
- * @throws IllegalArgumentException (not supported)
- *
- * @see org.jboss.weld.introspector.WBAnnotated#getName()
- */
- public String getName()
- {
- throw new IllegalArgumentException("Unable to determine name of parameter");
- }
-
- /**
- * Gets a string representation of the parameter
- *
- * @return A string representation
- */
- @Override
- public String toString()
- {
- return toString;
- }
-
- public AnnotatedCallable<X> getDeclaringCallable()
- {
- return declaringMember;
- }
-
- public int getPosition()
- {
- return position;
- }
-
- @Override
- public Object getDelegate()
- {
- return null;
- }
-
-}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldAnnotationImpl.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBAnnotationImpl.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldAnnotationImpl.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldAnnotationImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,154 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector.jlr;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.weld.introspector.AnnotationStore;
+import org.jboss.weld.introspector.WeldAnnotation;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldMethod;
+import org.jboss.weld.resources.ClassTransformer;
+import org.jboss.weld.util.Names;
+
+import com.google.common.base.Supplier;
+import com.google.common.collect.Multimaps;
+import com.google.common.collect.SetMultimap;
+
+/**
+ * Represents an annotated annotation
+ *
+ * This class is immutable and therefore threadsafe
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public class WeldAnnotationImpl<T extends Annotation> extends WeldClassImpl<T> implements WeldAnnotation<T>
+{
+
+ // The annotated members map (annotation -> member with annotation)
+ private final SetMultimap<Class<? extends Annotation>, WeldMethod<?, ?>> annotatedMembers;
+ // The implementation class of the annotation
+ private final Class<T> clazz;
+ // The set of abstracted members
+ private final Set<WeldMethod<?, ?>> members;
+
+ private final Map<String, WeldMethod<?, ?>> namedMembers;
+
+ // Cached string representation
+ private final String toString;
+
+ public static <A extends Annotation> WeldAnnotation<A> of(Class<A> annotationType, ClassTransformer classTransformer)
+ {
+ return new WeldAnnotationImpl<A>(annotationType, classTransformer);
+ }
+
+ /**
+ * Constructor
+ *
+ * Initializes the superclass with the built annotation map
+ *
+ * @param annotationType The annotation type
+ */
+ protected WeldAnnotationImpl(Class<T> annotationType, ClassTransformer classTransformer)
+ {
+ super(annotationType, annotationType, null, AnnotationStore.of(annotationType, classTransformer.getTypeStore().get(annotationType), classTransformer.getTypeStore().get(annotationType), classTransformer.getTypeStore()), classTransformer);
+ this.clazz = annotationType;
+ this.toString = "class " + Names.classToString(getDelegate());
+ members = new HashSet<WeldMethod<?, ?>>();
+ annotatedMembers = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldMethod<?, ?>>>(), new Supplier<Set<WeldMethod<?, ?>>>()
+ {
+
+ public Set<WeldMethod<?, ?>> get()
+ {
+ return new HashSet<WeldMethod<?, ?>>();
+ }
+
+ });
+ this.namedMembers = new HashMap<String, WeldMethod<?, ?>>();
+ for (Method member : clazz.getDeclaredMethods())
+ {
+ WeldMethod<?, ?> annotatedMethod = WeldMethodImpl.of(member, this, classTransformer);
+ members.add(annotatedMethod);
+ for (Annotation annotation : annotatedMethod.getAnnotations())
+ {
+ annotatedMembers.put(annotation.annotationType(), annotatedMethod);
+ }
+ namedMembers.put(annotatedMethod.getName(), annotatedMethod);
+ }
+ }
+
+ /**
+ * Gets all members of the annotation
+ *
+ * Initializes the members first if they are null
+ *
+ * @return The set of abstracted members
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotation#getMembers()
+ */
+ public Set<WeldMethod<?, ?>> getMembers()
+ {
+ return Collections.unmodifiableSet(members);
+ }
+
+ /**
+ * Returns the annotated members with a given annotation type
+ *
+ * If the annotated members are null, they are initialized first.
+ *
+ * @param annotationType The annotation type to match
+ * @return The set of abstracted members with the given annotation type
+ * present. An empty set is returned if no matches are found
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotation#getAnnotatedMembers(Class)
+ */
+ public Set<WeldMethod<?, ?>> getAnnotatedMembers(Class<? extends Annotation> annotationType)
+ {
+ return Collections.unmodifiableSet(annotatedMembers.get(annotationType));
+ }
+
+ public <A> WeldMethod<A, ?> getMember(String memberName, WeldClass<A> expectedType)
+ {
+ return (WeldMethod<A, ?>) namedMembers.get(memberName);
+ }
+
+ /**
+ * Gets a string representation of the annotation
+ *
+ * @return A string representation
+ */
+ @Override
+ public String toString()
+ {
+ return toString;
+ }
+
+ @Override
+ public Class<T> getDelegate()
+ {
+ return clazz;
+ }
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldClassImpl.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBClassImpl.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldClassImpl.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldClassImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,771 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector.jlr;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.Field;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.lang.reflect.Modifier;
+import java.lang.reflect.Type;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.List;
+import java.util.Map;
+import java.util.Set;
+
+import javax.enterprise.inject.spi.AnnotatedConstructor;
+import javax.enterprise.inject.spi.AnnotatedField;
+import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.enterprise.inject.spi.AnnotatedType;
+
+import org.jboss.weld.introspector.AnnotationStore;
+import org.jboss.weld.introspector.ConstructorSignature;
+import org.jboss.weld.introspector.MethodSignature;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldConstructor;
+import org.jboss.weld.introspector.WeldField;
+import org.jboss.weld.introspector.WeldMethod;
+import org.jboss.weld.resources.ClassTransformer;
+import org.jboss.weld.util.Names;
+import org.jboss.weld.util.Reflections;
+
+import com.google.common.base.Supplier;
+import com.google.common.collect.Multimaps;
+import com.google.common.collect.SetMultimap;
+
+/**
+ * Represents an annotated class
+ *
+ * This class is immutable, and therefore threadsafe
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public class WeldClassImpl<T> extends AbstractWeldAnnotated<T, Class<T>> implements WeldClass<T>
+{
+
+// The superclass abstraction of the type
+ private final WeldClass<?> superclass;
+ // The name of the type
+ private final String name;
+
+ private final String _simpleName;
+ private final boolean _public;
+ private final boolean _private;
+ private final boolean _packagePrivate;
+ private final Package _package;
+
+ private static List<Class<?>> NO_ARGUMENTS = Collections.emptyList();
+
+ // The set of abstracted fields
+ private final Set<WeldField<?, ?>> fields;
+ // The map from annotation type to abstracted field with annotation
+ private final SetMultimap<Class<? extends Annotation>, WeldField<?, ?>> annotatedFields;
+ // The map from annotation type to abstracted field with meta-annotation
+ private final SetMultimap<Class<? extends Annotation>, WeldField<?, ?>> metaAnnotatedFields;
+
+ // The set of abstracted fields
+ private final Set<WeldField<?, ?>> declaredFields;
+ private final Map<String, WeldField<?, ?>> declaredFieldsByName;
+ // The map from annotation type to abstracted field with annotation
+ private final SetMultimap<Class<? extends Annotation>, WeldField<?, T>> declaredAnnotatedFields;
+ // The map from annotation type to abstracted field with meta-annotation
+ private final SetMultimap<Class<? extends Annotation>, WeldField<?, ?>> declaredMetaAnnotatedFields;
+
+ // The set of abstracted methods
+ private final Set<WeldMethod<?, ?>> methods;
+ private final Map<MethodSignature, WeldMethod<?, ?>> declaredMethodsBySignature;
+ private final Map<MethodSignature, WeldMethod<?, ?>> methodsBySignature;
+ // The map from annotation type to abstracted method with annotation
+ private final SetMultimap<Class<? extends Annotation>, WeldMethod<?, ?>> annotatedMethods;
+ // The map from annotation type to method with a parameter with annotation
+ private final SetMultimap<Class<? extends Annotation>, WeldMethod<?, ?>> methodsByAnnotatedParameters;
+
+ // The set of abstracted methods
+ private final Set<WeldMethod<?, ?>> declaredMethods;
+ // The map from annotation type to abstracted method with annotation
+ private final SetMultimap<Class<? extends Annotation>, WeldMethod<?, T>> declaredAnnotatedMethods;
+ // The map from annotation type to method with a parameter with annotation
+ private final SetMultimap<Class<? extends Annotation>, WeldMethod<?, T>> declaredMethodsByAnnotatedParameters;
+
+ // The set of abstracted constructors
+ private final Set<WeldConstructor<T>> constructors;
+ private final Map<ConstructorSignature, WeldConstructor<?>> declaredConstructorsBySignature;
+ // The map from annotation type to abstracted constructor with annotation
+ private final SetMultimap<Class<? extends Annotation>, WeldConstructor<T>> annotatedConstructors;
+ // The map from class list to abstracted constructor
+ private final Map<List<Class<?>>, WeldConstructor<T>> constructorsByArgumentMap;
+
+ private final SetMultimap<Class<? extends Annotation>, WeldConstructor<?>> constructorsByAnnotatedParameters;
+
+ // Cached string representation
+ private final String toString;
+
+ private final boolean _nonStaticMemberClass;
+ private final boolean _abstract;
+ private final boolean _enum;
+
+ public static <T> WeldClass<T> of(Class<T> clazz, ClassTransformer classTransformer)
+ {
+ AnnotationStore annotationStore = AnnotationStore.of(clazz.getAnnotations(), clazz.getDeclaredAnnotations(), classTransformer.getTypeStore());
+ return new WeldClassImpl<T>(clazz, clazz, null, annotationStore, classTransformer);
+ }
+
+ public static <T> WeldClass<T> of(AnnotatedType<T> annotatedType, ClassTransformer classTransformer)
+ {
+ AnnotationStore annotationStore = AnnotationStore.of(annotatedType.getAnnotations(), annotatedType.getAnnotations(), classTransformer.getTypeStore());
+ return new WeldClassImpl<T>(annotatedType.getJavaClass(), annotatedType.getBaseType(), annotatedType, annotationStore, classTransformer);
+ }
+
+ protected WeldClassImpl(Class<T> rawType, Type type, AnnotatedType<T> annotatedType, AnnotationStore annotationStore, ClassTransformer classTransformer)
+ {
+ super(annotationStore, rawType, type);
+ this.toString = "class " + Names.classToString(rawType);
+ this.name = rawType.getName();
+ this._simpleName = rawType.getSimpleName();
+ if (rawType.getSuperclass() != null)
+ {
+ this.superclass = classTransformer.loadClass(rawType.getSuperclass());
+ }
+ else
+ {
+ this.superclass = null;
+ }
+ this._public = Modifier.isFinal(rawType.getModifiers());
+ this._private = Modifier.isPrivate(rawType.getModifiers());
+ this._packagePrivate = Reflections.isPackagePrivate(rawType.getModifiers());
+ this._package = rawType.getPackage();
+ this.fields = new HashSet<WeldField<?, ?>>();
+ this.annotatedFields = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldField<?, ?>>>(), new Supplier< Set<WeldField<?, ?>>>()
+ {
+
+ public Set<WeldField<?, ?>> get()
+ {
+ return new HashSet<WeldField<?, ?>>();
+ }
+
+ });
+ this.metaAnnotatedFields = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldField<?, ?>>>(), new Supplier< Set<WeldField<?, ?>>>()
+ {
+
+ public Set<WeldField<?, ?>> get()
+ {
+ return new HashSet<WeldField<?, ?>>();
+ }
+
+ });
+ this.declaredFields = new HashSet<WeldField<?, ?>>();
+ this.declaredFieldsByName = new HashMap<String, WeldField<?, ?>>();
+ this.declaredAnnotatedFields = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldField<?, T>>>(), new Supplier< Set<WeldField<?, T>>>()
+ {
+
+ public Set<WeldField<?, T>> get()
+ {
+ return new HashSet<WeldField<?, T>>();
+ }
+
+ });
+ this.declaredMetaAnnotatedFields = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldField<?, ?>>>(), new Supplier< Set<WeldField<?, ?>>>()
+ {
+
+ public Set<WeldField<?, ?>> get()
+ {
+ return new HashSet<WeldField<?, ?>>();
+ }
+
+ });
+ this._nonStaticMemberClass = Reflections.isNonStaticInnerClass(rawType);
+ this._abstract = Reflections.isAbstract(rawType);
+ this._enum = rawType.isEnum();
+
+
+ Map<Field, AnnotatedField<? super T>> annotatedTypeFields = new HashMap<Field, AnnotatedField<? super T>>();
+ if (annotatedType != null)
+ {
+ for (AnnotatedField<? super T> annotatedField : annotatedType.getFields())
+ {
+ annotatedTypeFields.put(annotatedField.getJavaMember(), annotatedField);
+ }
+ }
+
+ for (Class<?> c = rawType; c != Object.class && c != null; c = c.getSuperclass())
+ {
+ for (Field field : c.getDeclaredFields())
+ {
+ if (!field.isAccessible())
+ {
+ field.setAccessible(true);
+ }
+ WeldField<?, T> annotatedField = null;
+ if (annotatedTypeFields.containsKey(field))
+ {
+ annotatedField = WeldFieldImpl.of(annotatedTypeFields.get(field), this.<T>getDeclaringWBClass(field, classTransformer), classTransformer);
+ }
+ else
+ {
+ annotatedField = WeldFieldImpl.of(field, this.<T>getDeclaringWBClass(field, classTransformer), classTransformer);
+ }
+
+ this.fields.add(annotatedField);
+ if (c == rawType)
+ {
+ this.declaredFields.add(annotatedField);
+ this.declaredFieldsByName.put(annotatedField.getName(), annotatedField);
+ }
+ for (Annotation annotation : annotatedField.getAnnotations())
+ {
+ this.annotatedFields.put(annotation.annotationType(), annotatedField);
+ if (c == rawType)
+ {
+ this.declaredAnnotatedFields.put(annotation.annotationType(), annotatedField);
+ }
+ for (Annotation metaAnnotation : annotation.annotationType().getAnnotations())
+ {
+ this.metaAnnotatedFields.put(metaAnnotation.annotationType(), annotatedField);
+ if (c == rawType)
+ {
+ this.declaredMetaAnnotatedFields.put(metaAnnotation.annotationType(), annotatedField);
+ }
+ }
+ }
+
+ }
+ }
+
+ this.constructors = new HashSet<WeldConstructor<T>>();
+ this.constructorsByArgumentMap = new HashMap<List<Class<?>>, WeldConstructor<T>>();
+ this.annotatedConstructors = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldConstructor<T>>>(), new Supplier< Set<WeldConstructor<T>>>()
+ {
+
+ public Set<WeldConstructor<T>> get()
+ {
+ return new HashSet<WeldConstructor<T>>();
+ }
+
+ });
+ this.constructorsByAnnotatedParameters = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldConstructor<?>>>(), new Supplier< Set<WeldConstructor<?>>>()
+ {
+
+ public Set<WeldConstructor<?>> get()
+ {
+ return new HashSet<WeldConstructor<?>>();
+ }
+
+ });
+
+ Map<Constructor<? super T>, AnnotatedConstructor<T>> annotatedTypeConstructors = new HashMap<Constructor<? super T>, AnnotatedConstructor<T>>();
+ if (annotatedType != null)
+ {
+ for (AnnotatedConstructor<T> annotated : annotatedType.getConstructors())
+ {
+ annotatedTypeConstructors.put(annotated.getJavaMember(), annotated);
+ }
+ }
+
+ this.declaredConstructorsBySignature = new HashMap<ConstructorSignature, WeldConstructor<?>>();
+ for (Constructor<?> constructor : rawType.getDeclaredConstructors())
+ {
+ WeldConstructor<T> annotatedConstructor = null;
+ if (annotatedTypeConstructors.containsKey(constructor))
+ {
+ WeldClass<T> declaringClass = this.getDeclaringWBClass(constructor, classTransformer);
+ annotatedConstructor = WeldConstructorImpl.of(annotatedTypeConstructors.get(constructor), declaringClass, classTransformer);
+ }
+ else
+ {
+ // TODO Fix this cast
+ Constructor<T> c = (Constructor<T>) constructor;
+ annotatedConstructor = WeldConstructorImpl.of(c, this.<T>getDeclaringWBClass(c, classTransformer), classTransformer);
+ }
+
+ if (!constructor.isAccessible())
+ {
+ constructor.setAccessible(true);
+ }
+ this.constructors.add(annotatedConstructor);
+ this.constructorsByArgumentMap.put(Arrays.asList(constructor.getParameterTypes()), annotatedConstructor);
+
+ this.declaredConstructorsBySignature.put(annotatedConstructor.getSignature(), annotatedConstructor);
+
+ for (Annotation annotation : annotatedConstructor.getAnnotations())
+ {
+ if (!annotatedConstructors.containsKey(annotation.annotationType()))
+ {
+ annotatedConstructors.putAll(annotation.annotationType(), new HashSet<WeldConstructor<T>>());
+ }
+ annotatedConstructors.get(annotation.annotationType()).add(annotatedConstructor);
+ }
+
+ for (Class<? extends Annotation> annotationType : WeldConstructor.MAPPED_PARAMETER_ANNOTATIONS)
+ {
+ if (annotatedConstructor.getAnnotatedWBParameters(annotationType).size() > 0)
+ {
+ constructorsByAnnotatedParameters.put(annotationType, annotatedConstructor);
+ }
+ }
+ }
+
+ this.methods = new HashSet<WeldMethod<?, ?>>();
+ this.annotatedMethods = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldMethod<?, ?>>>(), new Supplier< Set<WeldMethod<?, ?>>>()
+ {
+
+ public Set<WeldMethod<?, ?>> get()
+ {
+ return new HashSet<WeldMethod<?, ?>>();
+ }
+
+ });
+ this.methodsByAnnotatedParameters = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldMethod<?, ?>>>(), new Supplier< Set<WeldMethod<?, ?>>>()
+ {
+
+ public Set<WeldMethod<?, ?>> get()
+ {
+ return new HashSet<WeldMethod<?, ?>>();
+ }
+
+ });
+ this.declaredMethods = new HashSet<WeldMethod<?, ?>>();
+ this.declaredAnnotatedMethods = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldMethod<?, T>>>(), new Supplier< Set<WeldMethod<?, T>>>()
+ {
+
+ public Set<WeldMethod<?, T>> get()
+ {
+ return new HashSet<WeldMethod<?, T>>();
+ }
+
+ });
+ this.declaredMethodsByAnnotatedParameters = Multimaps.newSetMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldMethod<?, T>>>(), new Supplier< Set<WeldMethod<?, T>>>()
+ {
+
+ public Set<WeldMethod<?, T>> get()
+ {
+ return new HashSet<WeldMethod<?, T>>();
+ }
+
+ });
+ this.declaredMethodsBySignature = new HashMap<MethodSignature, WeldMethod<?, ?>>();
+ this.methodsBySignature = new HashMap<MethodSignature, WeldMethod<?, ?>>();
+
+ Map<Method, AnnotatedMethod<?>> annotatedTypeMethods = new HashMap<Method, AnnotatedMethod<?>>();
+ if (annotatedType != null)
+ {
+ for (AnnotatedMethod<?> annotated : annotatedType.getMethods())
+ {
+ annotatedTypeMethods.put(annotated.getJavaMember(), annotated);
+ }
+ }
+
+ for (Class<?> c = rawType; c != Object.class && c != null; c = c.getSuperclass())
+ {
+ for (Method method : c.getDeclaredMethods())
+ {
+ if (!method.isAccessible())
+ {
+ method.setAccessible(true);
+ }
+
+ WeldMethod<?, T> annotatedMethod = null;
+ if (annotatedTypeMethods.containsKey(method))
+ {
+ annotatedMethod = WeldMethodImpl.of(annotatedTypeMethods.get(method), this, classTransformer);
+ }
+ else
+ {
+ annotatedMethod = WeldMethodImpl.of(method, this.<T>getDeclaringWBClass(method, classTransformer), classTransformer);
+ }
+ this.methods.add(annotatedMethod);
+ this.methodsBySignature.put(annotatedMethod.getSignature(), annotatedMethod);
+ if (c == rawType)
+ {
+ this.declaredMethods.add(annotatedMethod);
+ this.declaredMethodsBySignature.put(annotatedMethod.getSignature(), annotatedMethod);
+ }
+ for (Annotation annotation : annotatedMethod.getAnnotations())
+ {
+ annotatedMethods.put(annotation.annotationType(), annotatedMethod);
+ if (c == rawType)
+ {
+ this.declaredAnnotatedMethods.put(annotation.annotationType(), annotatedMethod);
+ }
+ }
+ for (Class<? extends Annotation> annotationType : WeldMethod.MAPPED_PARAMETER_ANNOTATIONS)
+ {
+ if (annotatedMethod.getAnnotatedWBParameters(annotationType).size() > 0)
+ {
+ methodsByAnnotatedParameters.put(annotationType, annotatedMethod);
+ if (c == rawType)
+ {
+ this.declaredMethodsByAnnotatedParameters.put(annotationType, annotatedMethod);
+ }
+ }
+ }
+ }
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ private <X> WeldClass<X> getDeclaringWBClass(Member member, ClassTransformer transformer)
+ {
+ if (member.getDeclaringClass().equals(getJavaClass()))
+ {
+ return (WeldClass<X>) this;
+ }
+ else
+ {
+ return transformer.loadClass((Class<X>) member.getDeclaringClass());
+ }
+ }
+
+ /**
+ * Gets the implementing class
+ *
+ * @return The class
+ */
+ public Class<? extends T> getAnnotatedClass()
+ {
+ return getJavaClass();
+ }
+
+ /**
+ * Gets the delegate (class)
+ *
+ * @return The class
+ */
+ @Override
+ public Class<T> getDelegate()
+ {
+ return getJavaClass();
+ }
+
+ /**
+ * Gets the abstracted fields of the class
+ *
+ * Initializes the fields if they are null
+ *
+ * @return The set of abstracted fields
+ */
+ public Set<WeldField<?, ?>> getWeldFields()
+ {
+ return Collections.unmodifiableSet(fields);
+ }
+
+ public Set<WeldField<?, ?>> getDeclaredFields()
+ {
+ return Collections.unmodifiableSet(declaredFields);
+ }
+
+ public <F> WeldField<F, ?> getDeclaredWeldField(String fieldName, WeldClass<F> expectedType)
+ {
+ return (WeldField<F, ?>) declaredFieldsByName.get(fieldName);
+ }
+
+ public Set<WeldField<?, T>> getDeclaredAnnotatedWeldFields(Class<? extends Annotation> annotationType)
+ {
+ return Collections.unmodifiableSet(declaredAnnotatedFields.get(annotationType));
+ }
+
+ /**
+ * Gets the abstracted constructors of the class
+ *
+ * Initializes the constructors if they are null
+ *
+ * @return The set of abstracted constructors
+ */
+ public Set<WeldConstructor<T>> getWeldConstructors()
+ {
+ return Collections.unmodifiableSet(constructors);
+ }
+
+ public WeldConstructor<T> getDeclaredWeldConstructor(ConstructorSignature signature)
+ {
+ return (WeldConstructor<T>) declaredConstructorsBySignature.get(signature);
+ }
+
+ /**
+ * Gets abstracted fields with requested meta-annotation type present
+ *
+ * If the meta-annotations map is null, it is initializes. If the annotated
+ * fields are null, it is initialized The meta-annotated field map is then
+ * populated for the requested meta-annotation type and the result is
+ * returned
+ *
+ * @param metaAnnotationType The meta-annotation type to match
+ * @return The set of abstracted fields with meta-annotation present. Returns
+ * an empty set if no matches are found.
+ */
+ public Set<WeldField<?, ?>> getMetaAnnotatedWeldFields(Class<? extends Annotation> metaAnnotationType)
+ {
+ return Collections.unmodifiableSet(metaAnnotatedFields.get(metaAnnotationType));
+ }
+
+ /**
+ * Gets the abstracted field annotated with a specific annotation type
+ *
+ * If the fields map is null, initialize it first
+ *
+ * @param annotationType The annotation type to match
+ * @return A set of matching abstracted fields, null if none are found.
+ *
+ */
+ public Set<WeldField<?, ?>> getAnnotatedWeldFields(Class<? extends Annotation> annotationType)
+ {
+ return Collections.unmodifiableSet(annotatedFields.get(annotationType));
+ }
+
+ public boolean isNonStaticMemberClass()
+ {
+ return _nonStaticMemberClass;
+ }
+
+ public boolean isAbstract()
+ {
+ return _abstract;
+ }
+
+ public boolean isEnum()
+ {
+ return _enum;
+ }
+
+ /**
+ * Gets the abstracted methods that have a certain annotation type present
+ *
+ * If the annotated methods map is null, initialize it first
+ *
+ * @param annotationType The annotation type to match
+ * @return A set of matching method abstractions. Returns an empty set if no
+ * matches are found.
+ *
+ * @see org.jboss.weld.introspector.WeldClass#getAnnotatedWeldMethods(Class)
+ */
+ public Set<WeldMethod<?, ?>> getAnnotatedWeldMethods(Class<? extends Annotation> annotationType)
+ {
+ return Collections.unmodifiableSet(annotatedMethods.get(annotationType));
+ }
+
+ public Set<WeldMethod<?, T>> getDeclaredAnnotatedWeldMethods(Class<? extends Annotation> annotationType)
+ {
+ return Collections.unmodifiableSet(declaredAnnotatedMethods.get(annotationType));
+ }
+
+ /**
+ * Gets constructors with given annotation type
+ *
+ * @param annotationType The annotation type to match
+ * @return A set of abstracted constructors with given annotation type. If
+ * the constructors set is empty, initialize it first. Returns an
+ * empty set if there are no matches.
+ *
+ * @see org.jboss.weld.introspector.WeldClass#getAnnotatedWeldConstructors(Class)
+ */
+ public Set<WeldConstructor<T>> getAnnotatedWeldConstructors(Class<? extends Annotation> annotationType)
+ {
+ return Collections.unmodifiableSet(annotatedConstructors.get(annotationType));
+ }
+
+ public WeldConstructor<T> getNoArgsWeldConstructor()
+ {
+ return constructorsByArgumentMap.get(NO_ARGUMENTS);
+ }
+
+ public Set<WeldMethod<?, ?>> getWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
+ {
+ return Collections.unmodifiableSet(methodsByAnnotatedParameters.get(annotationType));
+ }
+
+ public Set<WeldConstructor<?>> getWeldConstructorsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
+ {
+ return Collections.unmodifiableSet(constructorsByAnnotatedParameters.get(annotationType));
+ }
+
+ public Set<WeldMethod<?, T>> getDeclaredWeldMethodsWithAnnotatedParameters(Class<? extends Annotation> annotationType)
+ {
+ return Collections.unmodifiableSet(declaredMethodsByAnnotatedParameters.get(annotationType));
+ }
+
+ public WeldMethod<?, ?> getWeldMethod(Method methodDescriptor)
+ {
+ // TODO Should be cached
+ for (WeldMethod<?, ?> annotatedMethod : methods)
+ {
+ if (annotatedMethod.getName().equals(methodDescriptor.getName()) && Arrays.equals(annotatedMethod.getParameterTypesAsArray(), methodDescriptor.getParameterTypes()))
+ {
+ return annotatedMethod;
+ }
+ }
+ return null;
+ }
+
+ public Set<WeldMethod<?, ?>> getWeldMethods()
+ {
+ return Collections.unmodifiableSet(methods);
+ }
+
+ public WeldMethod<?, ?> getDeclaredWeldMethod(Method method)
+ {
+ // TODO Should be cached
+ for (WeldMethod<?, ?> annotatedMethod : declaredMethods)
+ {
+ if (annotatedMethod.getName().equals(method.getName()) && Arrays.equals(annotatedMethod.getParameterTypesAsArray(), method.getParameterTypes()))
+ {
+ return annotatedMethod;
+ }
+ }
+ return null;
+ }
+
+ public Set<WeldMethod<?, ?>> getDeclaredWeldMethods()
+ {
+ return declaredMethods;
+ }
+
+ @SuppressWarnings("unchecked")
+ public <M> WeldMethod<M, ?> getDeclaredWeldMethod(MethodSignature signature, WeldClass<M> expectedReturnType)
+ {
+ return (WeldMethod<M, ?>) declaredMethodsBySignature.get(signature);
+ }
+
+ @SuppressWarnings("unchecked")
+ public <M> WeldMethod<M, ?> getWBMethod(MethodSignature signature)
+ {
+ return (WeldMethod<M, ?>) methodsBySignature.get(signature);
+ }
+
+ /**
+ * Gets a string representation of the class
+ *
+ * @return A string representation
+ */
+ @Override
+ public String toString()
+ {
+ return toString;
+ }
+
+ public String getSimpleName()
+ {
+ return _simpleName;
+ }
+
+ /**
+ * Indicates if the type is static
+ *
+ * @return True if static, false otherwise
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated#isStatic()
+ */
+ public boolean isStatic()
+ {
+ return Reflections.isStatic(getDelegate());
+ }
+
+ /**
+ * Indicates if the type if final
+ *
+ * @return True if final, false otherwise
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated#isFinal()
+ */
+ public boolean isFinal()
+ {
+ return Reflections.isFinal(getDelegate());
+ }
+
+ public boolean isPublic()
+ {
+ return _public;
+ }
+
+ /**
+ * Gets the name of the type
+ *
+ * @returns The name
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated#getName()
+ */
+ public String getName()
+ {
+ return name;
+ }
+
+ /**
+ * Gets the superclass abstraction of the type
+ *
+ * @return The superclass abstraction
+ */
+ public WeldClass<?> getWeldSuperclass()
+ {
+ return superclass;
+ }
+
+ public boolean isEquivalent(Class<?> clazz)
+ {
+ return getDelegate().equals(clazz);
+ }
+
+ public boolean isPrivate()
+ {
+ return _private;
+ }
+
+ public boolean isPackagePrivate()
+ {
+ return _packagePrivate;
+ }
+
+ public Package getPackage()
+ {
+ return _package;
+ }
+
+ @SuppressWarnings("unchecked")
+ public <U> WeldClass<? extends U> asWeldSubclass(WeldClass<U> clazz)
+ {
+ return (WeldClass<? extends U>) this;
+ }
+
+ @SuppressWarnings("unchecked")
+ public <S> S cast(Object object)
+ {
+ return (S) object;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Set<AnnotatedConstructor<T>> getConstructors()
+ {
+ return (Set) constructors;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Set<AnnotatedField<? super T>> getFields()
+ {
+ return (Set) fields;
+ }
+
+ @SuppressWarnings("unchecked")
+ public Set<AnnotatedMethod<? super T>> getMethods()
+ {
+ return (Set) methods;
+ }
+
+}
\ No newline at end of file
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldConstructorImpl.java (from rev 3894, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBConstructorImpl.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldConstructorImpl.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldConstructorImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,287 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector.jlr;
+
+import static org.jboss.weld.util.Reflections.ensureAccessible;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Constructor;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.enterprise.inject.spi.AnnotatedConstructor;
+import javax.enterprise.inject.spi.AnnotatedParameter;
+
+import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.introspector.AnnotationStore;
+import org.jboss.weld.introspector.ConstructorSignature;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldConstructor;
+import org.jboss.weld.introspector.WeldParameter;
+import org.jboss.weld.resources.ClassTransformer;
+
+import com.google.common.base.Supplier;
+import com.google.common.collect.ListMultimap;
+import com.google.common.collect.Multimaps;
+
+/**
+ * Represents an annotated constructor
+ *
+ * This class is immutable, and therefore threadsafe
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public class WeldConstructorImpl<T> extends AbstractWeldCallable<T, T, Constructor<T>> implements WeldConstructor<T>
+{
+
+ // The underlying constructor
+ private final Constructor<T> constructor;
+
+ // The list of parameter abstractions
+ private final List<WeldParameter<?, ?>> parameters;
+ // The mapping of annotation -> parameter abstraction
+ private final ListMultimap<Class<? extends Annotation>, WeldParameter<?, ?>> annotatedParameters;
+
+ private final ConstructorSignature signature;
+
+ // Cached string representation
+ private final String toString;
+
+ public static <T> WeldConstructor<T> of(Constructor<T> constructor, WeldClass<T> declaringClass, ClassTransformer classTransformer)
+ {
+ AnnotationStore annotationStore = AnnotationStore.of(constructor, classTransformer.getTypeStore());
+ return new WeldConstructorImpl<T>(ensureAccessible(constructor), null, annotationStore, declaringClass, classTransformer);
+ }
+
+ public static <T> WeldConstructor<T> of(AnnotatedConstructor<T> annotatedConstructor, WeldClass<T> declaringClass, ClassTransformer classTransformer)
+ {
+ AnnotationStore annotationStore = AnnotationStore.of(annotatedConstructor.getAnnotations(), annotatedConstructor.getAnnotations(), classTransformer.getTypeStore());
+ return new WeldConstructorImpl<T>(ensureAccessible(annotatedConstructor.getJavaMember()), annotatedConstructor, annotationStore, declaringClass, classTransformer);
+ }
+
+ /**
+ * Constructor
+ *
+ * Initializes the superclass with the build annotations map
+ *
+ * @param constructor The constructor method
+ * @param declaringClass The declaring class
+ */
+ private WeldConstructorImpl(Constructor<T> constructor, AnnotatedConstructor<T> annotatedConstructor, AnnotationStore annotationStore, WeldClass<T> declaringClass, ClassTransformer classTransformer)
+ {
+ super(annotationStore, constructor, constructor.getDeclaringClass(), constructor.getDeclaringClass(), declaringClass);
+ this.toString = new StringBuilder().append("constructor ").append(constructor.toString()).toString();
+ this.constructor = constructor;
+
+ this.parameters = new ArrayList<WeldParameter<?, ?>>();
+ annotatedParameters = Multimaps.newListMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldParameter<?, ?>>>(), new Supplier< List<WeldParameter<?, ?>>>()
+ {
+
+ public List<WeldParameter<?, ?>> get()
+ {
+ return new ArrayList<WeldParameter<?, ?>>();
+ }
+
+ });
+
+ Map<Integer, AnnotatedParameter<?>> annotatedTypeParameters = new HashMap<Integer, AnnotatedParameter<?>>();
+
+ if (annotatedConstructor != null)
+ {
+ for (AnnotatedParameter<?> annotated : annotatedConstructor.getParameters())
+ {
+ annotatedTypeParameters.put(annotated.getPosition(), annotated);
+ }
+ }
+
+ for (int i = 0; i < constructor.getParameterTypes().length; i++)
+ {
+ if (constructor.getParameterAnnotations()[i].length > 0 || annotatedTypeParameters.containsKey(i))
+ {
+ Class<?> clazz = constructor.getParameterTypes()[i];
+ Type type = constructor.getGenericParameterTypes()[i];
+ WeldParameter<?, ?> parameter = null;
+ if (annotatedTypeParameters.containsKey(i))
+ {
+ AnnotatedParameter<?> annotatedParameter = annotatedTypeParameters.get(i);
+ parameter = WeldParameterImpl.of(annotatedParameter.getAnnotations(), clazz, type, this, i, classTransformer);
+ }
+ else
+ {
+ parameter = WeldParameterImpl.of(constructor.getParameterAnnotations()[i], clazz, type, this, i, classTransformer);
+ }
+
+ parameters.add(parameter);
+
+ for (Annotation annotation : parameter.getAnnotations())
+ {
+ annotatedParameters.put(annotation.annotationType(), parameter);
+ }
+ }
+ else
+ {
+ Class<?> clazz = constructor.getParameterTypes()[i];
+ Type type;
+ if (constructor.getGenericParameterTypes().length > i)
+ {
+ type = constructor.getGenericParameterTypes()[i];
+ }
+ else
+ {
+ type = clazz;
+ }
+ WeldParameter<?, ?> parameter = WeldParameterImpl.of(new Annotation[0], clazz, type, this, i, classTransformer);
+ parameters.add(parameter);
+
+ for (Annotation annotation : parameter.getAnnotations())
+ {
+ annotatedParameters.put(annotation.annotationType(), parameter);
+ }
+ }
+ }
+ this.signature = new ConstructorSignatureImpl(this);
+ }
+
+ /**
+ * Gets the constructor
+ *
+ * @return The constructor
+ */
+ public Constructor<T> getAnnotatedConstructor()
+ {
+ return constructor;
+ }
+
+ /**
+ * Gets the delegate (constructor)
+ *
+ * @return The delegate
+ */
+ @Override
+public Constructor<T> getDelegate()
+ {
+ return constructor;
+ }
+
+ /**
+ * Gets the abstracted parameters
+ *
+ * If the parameters are null, initalize them first
+ *
+ * @return A list of annotated parameter abstractions
+ *
+ * @see org.jboss.weld.introspector.WeldConstructor#getWBParameters()
+ */
+ public List<WeldParameter<?, ?>> getWBParameters()
+ {
+ return Collections.unmodifiableList(parameters);
+ }
+
+ /**
+ * Gets parameter abstractions with a given annotation type.
+ *
+ * If the parameters are null, they are initializes first.
+ *
+ * @param annotationType The annotation type to match
+ * @return A list of matching parameter abstractions. An empty list is
+ * returned if there are no matches.
+ *
+ * @see org.jboss.weld.introspector.WeldConstructor#getAnnotatedWBParameters(Class)
+ */
+ public List<WeldParameter<?, ?>> getAnnotatedWBParameters(Class<? extends Annotation> annotationType)
+ {
+ return Collections.unmodifiableList(annotatedParameters.get(annotationType));
+ }
+
+ /**
+ * Creates a new instance
+ *
+ * @param manager The Bean manager
+ * @return An instance
+ * @throws InvocationTargetException
+ * @throws IllegalAccessException
+ * @throws InstantiationException
+ * @throws IllegalArgumentException
+ *
+ * @see org.jboss.weld.introspector.WeldConstructor#newInstance(BeanManagerImpl)
+ */
+ public T newInstance(Object... parameters) throws IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException
+ {
+ return getDelegate().newInstance(parameters);
+ }
+
+ /**
+ * The overridden equals operation
+ *
+ * @param other The instance to compare to
+ * @return True if equal, false otherwise
+ */
+ @Override
+ public boolean equals(Object other)
+ {
+
+ if (super.equals(other) && other instanceof WeldConstructor)
+ {
+ WeldConstructor<?> that = (WeldConstructor<?>) other;
+ return this.getDeclaringType().equals(that.getDeclaringType()) && this.getWBParameters().equals(that.getWBParameters());
+ }
+ return false;
+ }
+
+ /**
+ * The overridden hashcode
+ *
+ * Gets the hash code from the delegate
+ *
+ * @return The hash code
+ */
+ @Override
+ public int hashCode()
+ {
+ return getDelegate().hashCode();
+ }
+
+ /**
+ * Gets a string representation of the constructor
+ *
+ * @return A string representation
+ */
+ @Override
+ public String toString()
+ {
+ return toString;
+ }
+
+ public ConstructorSignature getSignature()
+ {
+ return signature;
+ }
+
+ public List<AnnotatedParameter<T>> getParameters()
+ {
+ return Collections.unmodifiableList((List) parameters);
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldFieldImpl.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBFieldImpl.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldFieldImpl.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldFieldImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,153 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector.jlr;
+
+import static org.jboss.weld.util.Reflections.ensureAccessible;
+
+import java.lang.reflect.Field;
+
+import javax.enterprise.inject.spi.AnnotatedField;
+
+import org.jboss.weld.introspector.AnnotationStore;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldField;
+import org.jboss.weld.resources.ClassTransformer;
+import org.jboss.weld.util.Reflections;
+
+/**
+ * Represents an annotated field
+ *
+ * This class is immutable, and therefore threadsafe
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public class WeldFieldImpl<T, X> extends AbstractWeldMember<T, X, Field> implements WeldField<T, X>
+{
+
+ // The underlying field
+ private final Field field;
+
+ // Cached string representation
+ private final String toString;
+
+ public static <T, X> WeldFieldImpl<T, X> of(Field field, WeldClass<X> declaringClass, ClassTransformer classTransformer)
+ {
+ AnnotationStore annotationStore = AnnotationStore.of(field, classTransformer.getTypeStore());
+ return new WeldFieldImpl<T, X>(ensureAccessible(field), annotationStore, declaringClass, classTransformer);
+ }
+
+ public static <T, X> WeldFieldImpl<T, X> of(AnnotatedField<? super X> annotatedField, WeldClass<X> declaringClass, ClassTransformer classTransformer)
+ {
+ AnnotationStore annotationStore = AnnotationStore.of(annotatedField.getAnnotations(), annotatedField.getAnnotations(), classTransformer.getTypeStore());
+ return new WeldFieldImpl<T, X>(ensureAccessible(annotatedField.getJavaMember()), annotationStore, declaringClass, classTransformer);
+ }
+
+ /**
+ * Constructor
+ *
+ * Initializes the superclass with the built annotation map and detects the
+ * type arguments
+ *
+ * @param field The actual field
+ * @param declaringClass The abstraction of the declaring class
+ */
+ private WeldFieldImpl(Field field, AnnotationStore annotationStore, WeldClass<X> declaringClass, ClassTransformer classTransformer)
+ {
+ super(annotationStore, field, (Class<T>) field.getType(), field.getGenericType(), declaringClass);
+ this.field = field;
+ this.toString = new StringBuilder().append("field ").append(declaringClass.getName()).append(".").append(field.getName()).toString();
+ }
+
+ /**
+ * Gets the underlying field
+ *
+ * @return The fields
+ */
+ public Field getAnnotatedField()
+ {
+ return field;
+ }
+
+ @Override
+ public Field getDelegate()
+ {
+ return field;
+ }
+
+ public void set(Object instance, Object value) throws IllegalArgumentException, IllegalAccessException
+ {
+ field.set(instance, value);
+ }
+
+ public void setOnInstance(Object instance, Object value) throws IllegalArgumentException, SecurityException, IllegalAccessException, NoSuchFieldException
+ {
+ instance.getClass().getField(getName()).set(instance, value);
+ }
+
+ @SuppressWarnings("unchecked")
+ public T get(Object instance)
+ {
+ return (T) Reflections.getAndWrap(getDelegate(), instance);
+ }
+
+ /**
+ * Gets the property name
+ *
+ * @return The property name
+ *
+ * @see org.jboss.weld.introspector.WeldField#getName()
+ */
+ public String getPropertyName()
+ {
+ return getName();
+ }
+
+ /**
+ * Gets a string representation of the field
+ *
+ * @return A string representation
+ */
+ @Override
+ public String toString()
+ {
+ return this.toString;
+ }
+
+ @Override
+ public boolean equals(Object other)
+ {
+ if (other instanceof WeldField<?, ?>)
+ {
+ WeldField<?, ?> that = (WeldField<?, ?>) other;
+ return this.getDeclaringType().equals(that.getDeclaringType()) && this.getName().equals(that.getName());
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+
+ @Override
+ public int hashCode()
+ {
+ return getDelegate().hashCode();
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBMethodImpl.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldMethodImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,259 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector.jlr;
+
+import static org.jboss.weld.util.Reflections.ensureAccessible;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.InvocationTargetException;
+import java.lang.reflect.Method;
+import java.lang.reflect.Type;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.enterprise.inject.spi.AnnotatedMethod;
+import javax.enterprise.inject.spi.AnnotatedParameter;
+
+import org.jboss.weld.introspector.AnnotationStore;
+import org.jboss.weld.introspector.MethodSignature;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.WeldMethod;
+import org.jboss.weld.introspector.WeldParameter;
+import org.jboss.weld.resources.ClassTransformer;
+import org.jboss.weld.util.Reflections;
+
+import com.google.common.base.Supplier;
+import com.google.common.collect.ListMultimap;
+import com.google.common.collect.Multimaps;
+
+/**
+ * Represents an annotated method
+ *
+ * This class is immutable and therefore threadsafe
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public class WeldMethodImpl<T, X> extends AbstractWeldCallable<T, X, Method> implements WeldMethod<T, X>
+{
+
+ // The underlying method
+ private final Method method;
+
+ // The abstracted parameters
+ private final List<WeldParameter<?, ?>> parameters;
+ // A mapping from annotation type to parameter abstraction with that
+ // annotation present
+ private final ListMultimap<Class<? extends Annotation>, WeldParameter<?, ?>> annotatedParameters;
+
+ // The property name
+ private final String propertyName;
+
+ // Cached string representation
+ private final String toString;
+
+ private final MethodSignature signature;
+
+ public static <T, X> WeldMethodImpl<T, X> of(Method method, WeldClass<X> declaringClass, ClassTransformer classTransformer)
+ {
+ AnnotationStore annotationStore = AnnotationStore.of(method, classTransformer.getTypeStore());
+ return new WeldMethodImpl<T, X>(ensureAccessible(method), null, annotationStore, declaringClass, classTransformer);
+ }
+
+ public static <T, X> WeldMethodImpl<T, X> of(AnnotatedMethod<T> method, WeldClass<X> declaringClass, ClassTransformer classTransformer)
+ {
+ AnnotationStore annotationStore = AnnotationStore.of(method.getAnnotations(), method.getAnnotations(), classTransformer.getTypeStore());
+ return new WeldMethodImpl<T, X>(ensureAccessible(method.getJavaMember()), method, annotationStore, declaringClass, classTransformer);
+ }
+
+ /**
+ * Constructor
+ *
+ * Initializes the superclass with the built annotation map, sets the method
+ * and declaring class abstraction and detects the actual type arguments
+ *
+ * @param method The underlying method
+ * @param declaringClass The declaring class abstraction
+ */
+ @SuppressWarnings("unchecked")
+ private WeldMethodImpl(Method method, AnnotatedMethod<T> annotatedMethod, AnnotationStore annotationStore, WeldClass<X> declaringClass, ClassTransformer classTransformer)
+ {
+ super(annotationStore, method, (Class<T>) method.getReturnType(), method.getGenericReturnType(), declaringClass);
+ this.method = method;
+ this.toString = new StringBuilder().append("method ").append(method.toString()).toString();
+ this.parameters = new ArrayList<WeldParameter<?, ?>>();
+ this.annotatedParameters = Multimaps.newListMultimap(new HashMap<Class<? extends Annotation>, Collection<WeldParameter<?, ?>>>(), new Supplier< List<WeldParameter<?, ?>>>()
+ {
+
+ public List<WeldParameter<?, ?>> get()
+ {
+ return new ArrayList<WeldParameter<?, ?>>();
+ }
+
+ });
+
+ Map<Integer, AnnotatedParameter<?>> annotatedTypeParameters = new HashMap<Integer, AnnotatedParameter<?>>();
+
+ if (annotatedMethod != null)
+ {
+ for (AnnotatedParameter<?> annotated : annotatedMethod.getParameters())
+ {
+ annotatedTypeParameters.put(annotated.getPosition(), annotated);
+ }
+ }
+
+ for (int i = 0; i < method.getParameterTypes().length; i++)
+ {
+ if (method.getParameterAnnotations()[i].length > 0 || annotatedTypeParameters.containsKey(i))
+ {
+ Class<? extends Object> clazz = method.getParameterTypes()[i];
+ Type type = method.getGenericParameterTypes()[i];
+ WeldParameter<?, ?> parameter = null;
+ if (annotatedTypeParameters.containsKey(i))
+ {
+ AnnotatedParameter<?> annotatedParameter = annotatedTypeParameters.get(i);
+ parameter = WeldParameterImpl.of(annotatedParameter.getAnnotations(), clazz, type, this, i, classTransformer);
+ }
+ else
+ {
+ parameter = WeldParameterImpl.of(method.getParameterAnnotations()[i], clazz, type, this, i, classTransformer);
+ }
+ this.parameters.add(parameter);
+ for (Annotation annotation : parameter.getAnnotations())
+ {
+ if (MAPPED_PARAMETER_ANNOTATIONS.contains(annotation.annotationType()))
+ {
+ annotatedParameters.put(annotation.annotationType(), parameter);
+ }
+ }
+ }
+ else
+ {
+ Class<? extends Object> clazz = method.getParameterTypes()[i];
+ Type type = method.getGenericParameterTypes()[i];
+ WeldParameter<?, ?> parameter = WeldParameterImpl.of(new Annotation[0], (Class<Object>) clazz, type, this, i, classTransformer);
+ this.parameters.add(parameter);
+ }
+ }
+
+ String propertyName = Reflections.getPropertyName(getDelegate());
+ if (propertyName == null)
+ {
+ this.propertyName = getName();
+ }
+ else
+ {
+ this.propertyName = propertyName;
+ }
+ this.signature = new MethodSignatureImpl(this);
+
+ }
+
+ public Method getAnnotatedMethod()
+ {
+ return method;
+ }
+
+ @Override
+ public Method getDelegate()
+ {
+ return method;
+ }
+
+ public List<WeldParameter<?, ?>> getWBParameters()
+ {
+ return Collections.unmodifiableList(parameters);
+ }
+
+ public Class<?>[] getParameterTypesAsArray()
+ {
+ return method.getParameterTypes();
+ }
+
+ public List<WeldParameter<?, ?>> getAnnotatedWBParameters(Class<? extends Annotation> annotationType)
+ {
+ return Collections.unmodifiableList(annotatedParameters.get(annotationType));
+ }
+
+ @Override
+ public boolean equals(Object other)
+ {
+ if (other instanceof WeldMethod)
+ {
+ WeldMethod<?, ?> that = (WeldMethod<?, ?>) other;
+ return this.getDeclaringType().equals(that.getDeclaringType()) && this.getName().equals(that.getName()) && this.getWBParameters().equals(that.getWBParameters());
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ public boolean isEquivalent(Method method)
+ {
+ return this.getDeclaringType().isEquivalent(method.getDeclaringClass()) && this.getName().equals(method.getName()) && Arrays.equals(this.getParameterTypesAsArray(), method.getParameterTypes());
+ }
+
+ @Override
+ public int hashCode()
+ {
+ return getDelegate().hashCode();
+ }
+
+ public T invokeOnInstance(Object instance, Object...parameters) throws IllegalArgumentException, SecurityException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
+ {
+ Method method = Reflections.lookupMethod(getName(), getParameterTypesAsArray(), instance);
+ @SuppressWarnings("unchecked")
+ T result = (T) method.invoke(instance, parameters);
+ return result;
+ }
+
+ public T invoke(Object instance, Object... parameters) throws IllegalArgumentException, IllegalAccessException, InvocationTargetException
+ {
+ @SuppressWarnings("unchecked")
+ T result = (T) method.invoke(instance, parameters);
+ return result;
+ }
+
+ public String getPropertyName()
+ {
+ return propertyName;
+ }
+
+ @Override
+ public String toString()
+ {
+ return this.toString;
+ }
+
+ public MethodSignature getSignature()
+ {
+ return signature;
+ }
+
+ public List<AnnotatedParameter<X>> getParameters()
+ {
+ return Collections.unmodifiableList((List) parameters);
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBParameterImpl.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WeldParameterImpl.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,165 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.introspector.jlr;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.util.Set;
+
+import javax.enterprise.inject.spi.AnnotatedCallable;
+
+import org.jboss.weld.introspector.AnnotationStore;
+import org.jboss.weld.introspector.WeldCallable;
+import org.jboss.weld.introspector.WeldParameter;
+import org.jboss.weld.resources.ClassTransformer;
+
+/**
+ * Represents a parameter
+ *
+ * This class is immutable and therefore threadsafe
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ */
+public class WeldParameterImpl<T, X> extends AbstractWeldAnnotated<T, Object> implements WeldParameter<T, X>
+{
+
+ private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
+
+ // The final state
+ private final boolean _final = false;
+ // The static state
+ private final boolean _static = false;
+ private final boolean _public = false;
+ private final boolean _private = false;
+ private final boolean _packagePrivate = false;
+ private final Package _package;
+ private final int position;
+ private final WeldCallable<?, X, ?> declaringMember;
+
+ private final String toString;
+
+ public static <T, X> WeldParameter<T, X> of(Annotation[] annotations, Class<T> rawType, Type type, WeldCallable<?, X, ?> declaringMember, int position, ClassTransformer classTransformer)
+ {
+ return new WeldParameterImpl<T, X>(annotations, rawType, type, declaringMember, position, classTransformer);
+ }
+
+ public static <T, X> WeldParameter<T, X> of(Set<Annotation> annotations, Class<T> rawType, Type type, WeldCallable<?, X, ?> declaringMember, int position, ClassTransformer classTransformer)
+ {
+ return new WeldParameterImpl<T, X>(annotations.toArray(EMPTY_ANNOTATION_ARRAY), rawType, type, declaringMember, position, classTransformer);
+ }
+
+ /**
+ * Constructor
+ *
+ * @param annotations The annotations array
+ * @param type The type of the parameter
+ */
+ protected WeldParameterImpl(Annotation[] annotations, Class<T> rawType, Type type, WeldCallable<?, X, ?> declaringMember, int position, ClassTransformer classTransformer)
+ {
+ super(AnnotationStore.of(annotations, annotations, classTransformer.getTypeStore()), rawType, type);
+ this.declaringMember = declaringMember;
+ this._package = declaringMember.getPackage();
+ this.position = position;
+ this.toString = new StringBuilder().append("parameter ").append(position).append(" of ").append(declaringMember.toString()).toString();
+ }
+
+ /**
+ * Indicates if the parameter is final
+ *
+ * @return True if final, false otherwise
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated#isFinal()
+ */
+ public boolean isFinal()
+ {
+ return _final;
+ }
+
+ /**
+ * Indicates if the parameter is static
+ *
+ * @return True if static, false otherwise
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated#isStatic()
+ */
+ public boolean isStatic()
+ {
+ return _static;
+ }
+
+ public boolean isPublic()
+ {
+ return _public;
+ }
+
+ public boolean isPrivate()
+ {
+ return _private;
+ }
+
+ public boolean isPackagePrivate()
+ {
+ return _packagePrivate;
+ }
+
+ public Package getPackage()
+ {
+ return _package;
+ }
+
+ /**
+ * Gets the name of the parameter
+ *
+ * @throws IllegalArgumentException (not supported)
+ *
+ * @see org.jboss.weld.introspector.WeldAnnotated#getName()
+ */
+ public String getName()
+ {
+ throw new IllegalArgumentException("Unable to determine name of parameter");
+ }
+
+ /**
+ * Gets a string representation of the parameter
+ *
+ * @return A string representation
+ */
+ @Override
+ public String toString()
+ {
+ return toString;
+ }
+
+ public AnnotatedCallable<X> getDeclaringCallable()
+ {
+ return declaringMember;
+ }
+
+ public int getPosition()
+ {
+ return position;
+ }
+
+ @Override
+ public Object getDelegate()
+ {
+ return null;
+ }
+
+}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/AnnotationModel.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/AnnotationModel.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/AnnotationModel.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -22,7 +22,7 @@
import java.util.Set;
import org.jboss.weld.DefinitionException;
-import org.jboss.weld.introspector.WBAnnotation;
+import org.jboss.weld.introspector.WeldAnnotation;
import org.jboss.weld.log.Log;
import org.jboss.weld.log.Logging;
import org.jboss.weld.resources.ClassTransformer;
@@ -37,7 +37,7 @@
private static final Log log = Logging.getLog(AnnotationModel.class);
// The underlying annotation
- private WBAnnotation<T> annotatedAnnotation;
+ private WeldAnnotation<T> annotatedAnnotation;
// Is the data valid?
protected boolean valid;
@@ -125,7 +125,7 @@
*
* @return The annotation
*/
- protected WBAnnotation<T> getAnnotatedAnnotation()
+ protected WeldAnnotation<T> getAnnotatedAnnotation()
{
return annotatedAnnotation;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/BindingTypeModel.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/BindingTypeModel.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/BindingTypeModel.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -24,7 +24,7 @@
import javax.inject.Qualifier;
import org.jboss.weld.DefinitionException;
-import org.jboss.weld.introspector.WBMethod;
+import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.log.Log;
import org.jboss.weld.log.Logging;
import org.jboss.weld.resources.ClassTransformer;
@@ -46,7 +46,7 @@
private static final Log log = Logging.getLog(BindingTypeModel.class);
// The non-binding types
- private Set<WBMethod<?, ?>> nonBindingTypes;
+ private Set<WeldMethod<?, ?>> nonBindingTypes;
/**
@@ -75,7 +75,7 @@
*/
private void checkArrayAndAnnotationValuedMembers()
{
- for (WBMethod<?, ?> annotatedMethod : getAnnotatedAnnotation().getMembers())
+ for (WeldMethod<?, ?> annotatedMethod : getAnnotatedAnnotation().getMembers())
{
if ((Reflections.isArrayType(annotatedMethod.getJavaClass()) || Annotation.class.isAssignableFrom(annotatedMethod.getJavaClass())) && !nonBindingTypes.contains(annotatedMethod))
{
@@ -112,7 +112,7 @@
* @return A set of non-binding types, or an empty set if there are none
* present
*/
- public Set<WBMethod<?, ?>> getNonBindingTypes()
+ public Set<WeldMethod<?, ?>> getNonBindingTypes()
{
return nonBindingTypes;
}
@@ -136,7 +136,7 @@
{
if (instance.annotationType().equals(getRawType()) && other.annotationType().equals(getRawType()))
{
- for (WBMethod<?, ?> annotatedMethod : getAnnotatedAnnotation().getMembers())
+ for (WeldMethod<?, ?> annotatedMethod : getAnnotatedAnnotation().getMembers())
{
if (!nonBindingTypes.contains(annotatedMethod))
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/InterceptorBindingModel.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/InterceptorBindingModel.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/metadata/cache/InterceptorBindingModel.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -17,7 +17,7 @@
package org.jboss.weld.metadata.cache;
-import org.jboss.weld.introspector.WBMethod;
+import org.jboss.weld.introspector.WeldMethod;
import org.jboss.weld.log.Log;
import org.jboss.weld.log.Logging;
import org.jboss.weld.resources.ClassTransformer;
@@ -36,7 +36,7 @@
{
private static final Set<Class<? extends Annotation>> META_ANNOTATIONS = Arrays2.<Class<? extends Annotation>>asSet(InterceptorBinding.class);
private static final Log log = Logging.getLog(BindingTypeModel.class);
- private Set<WBMethod<?,?>> nonBindingTypes;
+ private Set<WeldMethod<?,?>> nonBindingTypes;
private Set<Annotation> inheritedInterceptionBindingTypes;
private Set<Annotation> metaAnnotations;
@@ -77,7 +77,7 @@
{
if (instance.annotationType().equals(getRawType()) && other.annotationType().equals(getRawType()))
{
- for (WBMethod<?, ?> annotatedMethod : getAnnotatedAnnotation().getMembers())
+ for (WeldMethod<?, ?> annotatedMethod : getAnnotatedAnnotation().getMembers())
{
if (!nonBindingTypes.contains(annotatedMethod))
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableFactory.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableFactory.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableFactory.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -26,7 +26,7 @@
import java.util.Collections;
import org.jboss.weld.bean.AbstractClassBean;
-import org.jboss.weld.introspector.WBAnnotated;
+import org.jboss.weld.introspector.WeldAnnotated;
import org.jboss.weld.literal.DefaultLiteral;
import org.jboss.weld.util.Reflections;
@@ -35,7 +35,7 @@
public class ResolvableFactory
{
- public static Resolvable of(WBAnnotated<?, ?> element)
+ public static Resolvable of(WeldAnnotated<?, ?> element)
{
if (element instanceof Resolvable)
{
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableWBClass.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableWBClass.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableWBClass.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,228 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.resolution;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Field;
-import java.lang.reflect.Member;
-import java.lang.reflect.Method;
-import java.lang.reflect.ParameterizedType;
-import java.lang.reflect.Type;
-import java.util.Arrays;
-import java.util.Collections;
-import java.util.HashSet;
-import java.util.Set;
-
-import javax.enterprise.inject.TypeLiteral;
-import javax.enterprise.inject.spi.InjectionPoint;
-
-import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.bean.AbstractClassBean;
-import org.jboss.weld.injection.WBInjectionPoint;
-import org.jboss.weld.introspector.AnnotationStore;
-import org.jboss.weld.introspector.WBAnnotated;
-import org.jboss.weld.introspector.jlr.AbstractWBAnnotated;
-import org.jboss.weld.metadata.TypeStore;
-import org.jboss.weld.util.Names;
-import org.jboss.weld.util.Reflections;
-
-public class ResolvableWBClass<T> extends AbstractWBAnnotated<T, Class<T>> implements Resolvable
-{
-
- private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
- private static final Set<Annotation> EMPTY_ANNOTATION_SET = Collections.emptySet();
-
- private final Class<T> rawType;
- private final Set<Type> typeClosure;
- private final Type[] actualTypeArguments;
-
- private final String _string;
-
- private final BeanManagerImpl manager;
-
- public static <T> WBAnnotated<T, Class<T>> of(TypeLiteral<T> typeLiteral, Annotation[] annotations, BeanManagerImpl manager)
- {
- return new ResolvableWBClass<T>(typeLiteral.getType(), annotations, manager);
- }
-
- public static <T> WBAnnotated<T, Class<T>> of(Type type, Annotation[] annotations, BeanManagerImpl manager)
- {
- return new ResolvableWBClass<T>(type, annotations, manager);
- }
-
- public static <T> WBAnnotated<T, Class<T>> of(InjectionPoint injectionPoint, BeanManagerImpl manager)
- {
- if (injectionPoint instanceof WBInjectionPoint)
- {
- @SuppressWarnings("unchecked")
- WBAnnotated<T, Class<T>> ip = (WBAnnotated<T, Class<T>>) injectionPoint;
- return ip;
- }
- else
- {
- return new ResolvableWBClass<T>(injectionPoint.getType(), injectionPoint.getAnnotated().getAnnotations(), manager);
- }
- }
-
- public static <T> WBAnnotated<T, Class<T>> of(Member member, Annotation[] annotations, BeanManagerImpl manager)
- {
- if (member instanceof Field)
- {
- return new ResolvableWBClass<T>(((Field) member).getGenericType(), annotations, manager);
- }
- else if (member instanceof Method)
- {
- return new ResolvableWBClass<T>(((Method) member).getGenericReturnType(), annotations, manager);
- }
- else
- {
- throw new IllegalStateException();
- }
- }
-
- private ResolvableWBClass(Type type, AnnotationStore annotationStore, BeanManagerImpl manager)
- {
- super(annotationStore);
-
- this.manager = manager;
-
- if (type instanceof ParameterizedType)
- {
- ParameterizedType parameterizedType = (ParameterizedType) type;
- if (parameterizedType.getRawType() instanceof Class)
- {
- this.rawType = (Class<T>) parameterizedType.getRawType();
- }
- else
- {
- throw new IllegalArgumentException("Cannot extract rawType from " + type);
- }
- this.actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments();
- this._string = rawType.toString() + "<" + Arrays.asList(actualTypeArguments).toString() + ">; binding types = " + Names.annotationsToString(annotationStore.getBindings());
- }
- else if (type instanceof Class)
- {
- this.rawType = (Class<T>) type;
- this.actualTypeArguments = new Type[0];
- this._string = rawType.toString() +"; binding types = " + Names.annotationsToString(annotationStore.getBindings());
- }
- else
- {
- throw new IllegalArgumentException("Unable to extract type information from " + type);
- }
- this.typeClosure = new HashSet<Type>();
- typeClosure.add(type);
- }
-
- private ResolvableWBClass(Type type, Annotation[] annotations, BeanManagerImpl manager)
- {
- this(type, AnnotationStore.of(annotations, EMPTY_ANNOTATION_ARRAY, manager.getServices().get(TypeStore.class)), manager);
- }
-
- private ResolvableWBClass(Type type, Set<Annotation>annotations, BeanManagerImpl manager)
- {
- this(type, AnnotationStore.of(annotations, EMPTY_ANNOTATION_SET, manager.getServices().get(TypeStore.class)), manager);
- }
-
- @Override
- public String toString()
- {
- return _string;
- }
-
- @Override
- public Class<T> getDelegate()
- {
- return rawType;
- }
-
- @Override
- public Type[] getActualTypeArguments()
- {
- return actualTypeArguments;
- }
-
- public String getName()
- {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Class<T> getJavaClass()
- {
- return rawType;
- }
-
- public boolean isFinal()
- {
- throw new UnsupportedOperationException();
- }
-
- public boolean isPublic()
- {
- throw new UnsupportedOperationException();
- }
-
- public boolean isPrivate()
- {
- throw new UnsupportedOperationException();
- }
-
- public boolean isPackagePrivate()
- {
- throw new UnsupportedOperationException();
- }
-
- public Package getPackage()
- {
- throw new UnsupportedOperationException();
- }
-
- public boolean isStatic()
- {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public boolean isProxyable()
- {
- throw new UnsupportedOperationException();
- }
-
- @Override
- public Set<Type> getTypeClosure()
- {
- return typeClosure;
- }
-
- public AbstractClassBean<?> getDeclaringBean()
- {
- return null;
- }
-
- @Override
- public Type getBaseType()
- {
- return getJavaClass();
- }
-
- public boolean isAssignableTo(Class<?> clazz)
- {
- return Reflections.isAssignableFrom(clazz, getBaseType());
- }
-
-}
\ No newline at end of file
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableWeldClass.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableWBClass.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableWeldClass.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/resolution/ResolvableWeldClass.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,228 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.resolution;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Field;
+import java.lang.reflect.Member;
+import java.lang.reflect.Method;
+import java.lang.reflect.ParameterizedType;
+import java.lang.reflect.Type;
+import java.util.Arrays;
+import java.util.Collections;
+import java.util.HashSet;
+import java.util.Set;
+
+import javax.enterprise.inject.TypeLiteral;
+import javax.enterprise.inject.spi.InjectionPoint;
+
+import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.bean.AbstractClassBean;
+import org.jboss.weld.injection.WeldInjectionPoint;
+import org.jboss.weld.introspector.AnnotationStore;
+import org.jboss.weld.introspector.WeldAnnotated;
+import org.jboss.weld.introspector.jlr.AbstractWeldAnnotated;
+import org.jboss.weld.metadata.TypeStore;
+import org.jboss.weld.util.Names;
+import org.jboss.weld.util.Reflections;
+
+public class ResolvableWeldClass<T> extends AbstractWeldAnnotated<T, Class<T>> implements Resolvable
+{
+
+ private static final Annotation[] EMPTY_ANNOTATION_ARRAY = new Annotation[0];
+ private static final Set<Annotation> EMPTY_ANNOTATION_SET = Collections.emptySet();
+
+ private final Class<T> rawType;
+ private final Set<Type> typeClosure;
+ private final Type[] actualTypeArguments;
+
+ private final String _string;
+
+ private final BeanManagerImpl manager;
+
+ public static <T> WeldAnnotated<T, Class<T>> of(TypeLiteral<T> typeLiteral, Annotation[] annotations, BeanManagerImpl manager)
+ {
+ return new ResolvableWeldClass<T>(typeLiteral.getType(), annotations, manager);
+ }
+
+ public static <T> WeldAnnotated<T, Class<T>> of(Type type, Annotation[] annotations, BeanManagerImpl manager)
+ {
+ return new ResolvableWeldClass<T>(type, annotations, manager);
+ }
+
+ public static <T> WeldAnnotated<T, Class<T>> of(InjectionPoint injectionPoint, BeanManagerImpl manager)
+ {
+ if (injectionPoint instanceof WeldInjectionPoint)
+ {
+ @SuppressWarnings("unchecked")
+ WeldAnnotated<T, Class<T>> ip = (WeldAnnotated<T, Class<T>>) injectionPoint;
+ return ip;
+ }
+ else
+ {
+ return new ResolvableWeldClass<T>(injectionPoint.getType(), injectionPoint.getAnnotated().getAnnotations(), manager);
+ }
+ }
+
+ public static <T> WeldAnnotated<T, Class<T>> of(Member member, Annotation[] annotations, BeanManagerImpl manager)
+ {
+ if (member instanceof Field)
+ {
+ return new ResolvableWeldClass<T>(((Field) member).getGenericType(), annotations, manager);
+ }
+ else if (member instanceof Method)
+ {
+ return new ResolvableWeldClass<T>(((Method) member).getGenericReturnType(), annotations, manager);
+ }
+ else
+ {
+ throw new IllegalStateException();
+ }
+ }
+
+ private ResolvableWeldClass(Type type, AnnotationStore annotationStore, BeanManagerImpl manager)
+ {
+ super(annotationStore);
+
+ this.manager = manager;
+
+ if (type instanceof ParameterizedType)
+ {
+ ParameterizedType parameterizedType = (ParameterizedType) type;
+ if (parameterizedType.getRawType() instanceof Class)
+ {
+ this.rawType = (Class<T>) parameterizedType.getRawType();
+ }
+ else
+ {
+ throw new IllegalArgumentException("Cannot extract rawType from " + type);
+ }
+ this.actualTypeArguments = ((ParameterizedType) type).getActualTypeArguments();
+ this._string = rawType.toString() + "<" + Arrays.asList(actualTypeArguments).toString() + ">; binding types = " + Names.annotationsToString(annotationStore.getBindings());
+ }
+ else if (type instanceof Class)
+ {
+ this.rawType = (Class<T>) type;
+ this.actualTypeArguments = new Type[0];
+ this._string = rawType.toString() +"; binding types = " + Names.annotationsToString(annotationStore.getBindings());
+ }
+ else
+ {
+ throw new IllegalArgumentException("Unable to extract type information from " + type);
+ }
+ this.typeClosure = new HashSet<Type>();
+ typeClosure.add(type);
+ }
+
+ private ResolvableWeldClass(Type type, Annotation[] annotations, BeanManagerImpl manager)
+ {
+ this(type, AnnotationStore.of(annotations, EMPTY_ANNOTATION_ARRAY, manager.getServices().get(TypeStore.class)), manager);
+ }
+
+ private ResolvableWeldClass(Type type, Set<Annotation>annotations, BeanManagerImpl manager)
+ {
+ this(type, AnnotationStore.of(annotations, EMPTY_ANNOTATION_SET, manager.getServices().get(TypeStore.class)), manager);
+ }
+
+ @Override
+ public String toString()
+ {
+ return _string;
+ }
+
+ @Override
+ public Class<T> getDelegate()
+ {
+ return rawType;
+ }
+
+ @Override
+ public Type[] getActualTypeArguments()
+ {
+ return actualTypeArguments;
+ }
+
+ public String getName()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Class<T> getJavaClass()
+ {
+ return rawType;
+ }
+
+ public boolean isFinal()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isPublic()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isPrivate()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isPackagePrivate()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public Package getPackage()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ public boolean isStatic()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public boolean isProxyable()
+ {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public Set<Type> getTypeClosure()
+ {
+ return typeClosure;
+ }
+
+ public AbstractClassBean<?> getDeclaringBean()
+ {
+ return null;
+ }
+
+ @Override
+ public Type getBaseType()
+ {
+ return getJavaClass();
+ }
+
+ public boolean isAssignableTo(Class<?> clazz)
+ {
+ return Reflections.isAssignableFrom(clazz, getBaseType());
+ }
+
+}
\ No newline at end of file
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/resources/ClassTransformer.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/resources/ClassTransformer.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/resources/ClassTransformer.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -22,19 +22,19 @@
import javax.enterprise.inject.spi.AnnotatedType;
import org.jboss.weld.bootstrap.api.Service;
-import org.jboss.weld.introspector.WBAnnotation;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.jlr.WBAnnotationImpl;
-import org.jboss.weld.introspector.jlr.WBClassImpl;
+import org.jboss.weld.introspector.WeldAnnotation;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.jlr.WeldAnnotationImpl;
+import org.jboss.weld.introspector.jlr.WeldClassImpl;
import org.jboss.weld.metadata.TypeStore;
import org.jboss.weld.util.collections.ConcurrentCache;
public class ClassTransformer implements Service
{
- private final ConcurrentCache<Class<?>, WBClass<?>> classes;
- private final ConcurrentCache<AnnotatedType<?>, WBClass<?>> annotatedTypes;
- private final ConcurrentCache<Class<?>, WBAnnotation<?>> annotations;
+ private final ConcurrentCache<Class<?>, WeldClass<?>> classes;
+ private final ConcurrentCache<AnnotatedType<?>, WeldClass<?>> annotatedTypes;
+ private final ConcurrentCache<Class<?>, WeldAnnotation<?>> annotations;
private final ClassTransformer transformer = this;
private final TypeStore typeStore;
@@ -43,45 +43,45 @@
*/
public ClassTransformer(TypeStore typeStore)
{
- classes = new ConcurrentCache<Class<?>, WBClass<?>>();
- this.annotatedTypes = new ConcurrentCache<AnnotatedType<?>, WBClass<?>>();
- annotations = new ConcurrentCache<Class<?>, WBAnnotation<?>>();
+ classes = new ConcurrentCache<Class<?>, WeldClass<?>>();
+ this.annotatedTypes = new ConcurrentCache<AnnotatedType<?>, WeldClass<?>>();
+ annotations = new ConcurrentCache<Class<?>, WeldAnnotation<?>>();
this.typeStore = typeStore;
}
- public <T> WBClass<T> loadClass(final Class<T> clazz)
+ public <T> WeldClass<T> loadClass(final Class<T> clazz)
{
- return classes.putIfAbsent(clazz, new Callable<WBClass<T>>()
+ return classes.putIfAbsent(clazz, new Callable<WeldClass<T>>()
{
- public WBClass<T> call() throws Exception
+ public WeldClass<T> call() throws Exception
{
- return WBClassImpl.of(clazz, transformer);
+ return WeldClassImpl.of(clazz, transformer);
}
});
}
- public <T> WBClass<T> loadClass(final AnnotatedType<T> clazz)
+ public <T> WeldClass<T> loadClass(final AnnotatedType<T> clazz)
{
- return annotatedTypes.putIfAbsent(clazz, new Callable<WBClass<T>>()
+ return annotatedTypes.putIfAbsent(clazz, new Callable<WeldClass<T>>()
{
- public WBClass<T> call() throws Exception
+ public WeldClass<T> call() throws Exception
{
- return WBClassImpl.of(clazz, transformer);
+ return WeldClassImpl.of(clazz, transformer);
}
});
}
- public <T extends Annotation> WBAnnotation<T> loadAnnotation(final Class<T> clazz)
+ public <T extends Annotation> WeldAnnotation<T> loadAnnotation(final Class<T> clazz)
{
- return annotations.putIfAbsent(clazz, new Callable<WBAnnotation<T>>()
+ return annotations.putIfAbsent(clazz, new Callable<WeldAnnotation<T>>()
{
- public WBAnnotation<T> call() throws Exception
+ public WeldAnnotation<T> call() throws Exception
{
- return WBAnnotationImpl.of(clazz, transformer);
+ return WeldAnnotationImpl.of(clazz, transformer);
}
});
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -55,7 +55,7 @@
import org.jboss.weld.injection.FieldInjectionPoint;
import org.jboss.weld.injection.MethodInjectionPoint;
import org.jboss.weld.injection.ParameterInjectionPoint;
-import org.jboss.weld.injection.WBInjectionPoint;
+import org.jboss.weld.injection.WeldInjectionPoint;
import org.jboss.weld.injection.spi.EjbInjectionServices;
import org.jboss.weld.injection.spi.JpaInjectionServices;
import org.jboss.weld.injection.spi.ResourceInjectionServices;
@@ -144,29 +144,29 @@
}
}
- public static List<Set<FieldInjectionPoint<?, ?>>> getFieldInjectionPoints(Bean<?> declaringBean, WBClass<?> type)
+ public static List<Set<FieldInjectionPoint<?, ?>>> getFieldInjectionPoints(Bean<?> declaringBean, WeldClass<?> type)
{
List<Set<FieldInjectionPoint<?, ?>>> injectableFieldsList = new ArrayList<Set<FieldInjectionPoint<?, ?>>>();
- WBClass<?> t = type;
+ WeldClass<?> t = type;
while (!t.getJavaClass().equals(Object.class))
{
Set<FieldInjectionPoint<?, ?>> fields = new HashSet<FieldInjectionPoint<?,?>>();
injectableFieldsList.add(0, fields);
- for (WBField<?, ?> annotatedField : t.getDeclaredAnnotatedWBFields(Inject.class))
+ for (WeldField<?, ?> annotatedField : t.getDeclaredAnnotatedWeldFields(Inject.class))
{
if (!annotatedField.isStatic())
{
addFieldInjectionPoint(annotatedField, fields, declaringBean);
}
}
- for (WBField<?, ?> annotatedField : t.getAnnotatedWBFields(Decorates.class))
+ for (WeldField<?, ?> annotatedField : t.getAnnotatedWeldFields(Decorates.class))
{
if (!annotatedField.isStatic())
{
addFieldInjectionPoint(annotatedField, fields, declaringBean);
}
}
- t = t.getWBSuperclass();
+ t = t.getWeldSuperclass();
}
return injectableFieldsList;
}
@@ -181,9 +181,9 @@
return injectionPoints;
}
- public static WBMethod<?, ?> getPostConstruct(WBClass<?> type)
+ public static WeldMethod<?, ?> getPostConstruct(WeldClass<?> type)
{
- Set<WBMethod<?, ?>> postConstructMethods = type.getAnnotatedWBMethods(PostConstruct.class);
+ Set<WeldMethod<?, ?>> postConstructMethods = type.getAnnotatedWeldMethods(PostConstruct.class);
log.trace("Found " + postConstructMethods + " constructors annotated with @Initializer for " + type);
if (postConstructMethods.size() > 1)
{
@@ -191,7 +191,7 @@
}
else if (postConstructMethods.size() == 1)
{
- WBMethod<?, ?> postConstruct = postConstructMethods.iterator().next();
+ WeldMethod<?, ?> postConstruct = postConstructMethods.iterator().next();
log.trace("Exactly one post construct method (" + postConstruct + ") for " + type);
return postConstruct;
}
@@ -201,9 +201,9 @@
}
}
- public static WBMethod<?, ?> getPreDestroy(WBClass<?> type)
+ public static WeldMethod<?, ?> getPreDestroy(WeldClass<?> type)
{
- Set<WBMethod<?, ?>> preDestroyMethods = type.getAnnotatedWBMethods(PreDestroy.class);
+ Set<WeldMethod<?, ?>> preDestroyMethods = type.getAnnotatedWeldMethods(PreDestroy.class);
log.trace("Found " + preDestroyMethods + " constructors annotated with @Initializer for " + type);
if (preDestroyMethods.size() > 1)
{
@@ -213,7 +213,7 @@
}
else if (preDestroyMethods.size() == 1)
{
- WBMethod<?, ?> preDestroy = preDestroyMethods.iterator().next();
+ WeldMethod<?, ?> preDestroy = preDestroyMethods.iterator().next();
log.trace("Exactly one post construct method (" + preDestroy + ") for " + type);
return preDestroy;
}
@@ -223,12 +223,12 @@
}
}
- public static List<WBMethod<?,?>> getInterceptableBusinessMethods(WBClass<?> type)
+ public static List<WeldMethod<?,?>> getInterceptableBusinessMethods(WeldClass<?> type)
{
- List<WBMethod<?, ?>> annotatedMethods = new ArrayList<WBMethod<?, ?>>();
- for (WBMethod<?, ?> annotatedMethod : type.getWBMethods())
+ List<WeldMethod<?, ?>> annotatedMethods = new ArrayList<WeldMethod<?, ?>>();
+ for (WeldMethod<?, ?> annotatedMethod : type.getWeldMethods())
{
- int modifiers = ((WBMember) annotatedMethod).getJavaMember().getModifiers();
+ int modifiers = ((WeldMember) annotatedMethod).getJavaMember().getModifiers();
boolean businessMethod = !annotatedMethod.isStatic()
&& (Modifier.isPublic(modifiers)
|| Modifier.isProtected(modifiers))
@@ -253,13 +253,13 @@
}
- public static Set<WBInjectionPoint<?, ?>> getEjbInjectionPoints(Bean<?> declaringBean, WBClass<?> type, BeanManagerImpl manager)
+ public static Set<WeldInjectionPoint<?, ?>> getEjbInjectionPoints(Bean<?> declaringBean, WeldClass<?> type, BeanManagerImpl manager)
{
if (manager.getServices().contains(EjbInjectionServices.class))
{
Class<? extends Annotation> ejbAnnotationType = manager.getServices().get(EJBApiAbstraction.class).EJB_ANNOTATION_CLASS;
- Set<WBInjectionPoint<?, ?>> ejbInjectionPoints = new HashSet<WBInjectionPoint<?, ?>>();
- for (WBField<?, ?> field : type.getAnnotatedWBFields(ejbAnnotationType))
+ Set<WeldInjectionPoint<?, ?>> ejbInjectionPoints = new HashSet<WeldInjectionPoint<?, ?>>();
+ for (WeldField<?, ?> field : type.getAnnotatedWeldFields(ejbAnnotationType))
{
ejbInjectionPoints.add(FieldInjectionPoint.of(declaringBean, field));
}
@@ -271,13 +271,13 @@
}
}
- public static Set<WBInjectionPoint<?, ?>> getPersistenceContextInjectionPoints(Bean<?> declaringBean, WBClass<?> type, BeanManagerImpl manager)
+ public static Set<WeldInjectionPoint<?, ?>> getPersistenceContextInjectionPoints(Bean<?> declaringBean, WeldClass<?> type, BeanManagerImpl manager)
{
if (manager.getServices().contains(JpaInjectionServices.class))
{
- Set<WBInjectionPoint<?, ?>> jpaInjectionPoints = new HashSet<WBInjectionPoint<?, ?>>();
+ Set<WeldInjectionPoint<?, ?>> jpaInjectionPoints = new HashSet<WeldInjectionPoint<?, ?>>();
Class<? extends Annotation> persistenceContextAnnotationType = manager.getServices().get(PersistenceApiAbstraction.class).PERSISTENCE_CONTEXT_ANNOTATION_CLASS;
- for (WBField<?, ?> field : type.getAnnotatedWBFields(persistenceContextAnnotationType))
+ for (WeldField<?, ?> field : type.getAnnotatedWeldFields(persistenceContextAnnotationType))
{
jpaInjectionPoints.add(FieldInjectionPoint.of(declaringBean, field));
}
@@ -289,13 +289,13 @@
}
}
- public static Set<WBInjectionPoint<?, ?>> getPersistenceUnitInjectionPoints(Bean<?> declaringBean, WBClass<?> type, BeanManagerImpl manager)
+ public static Set<WeldInjectionPoint<?, ?>> getPersistenceUnitInjectionPoints(Bean<?> declaringBean, WeldClass<?> type, BeanManagerImpl manager)
{
if (manager.getServices().contains(JpaInjectionServices.class))
{
- Set<WBInjectionPoint<?, ?>> jpaInjectionPoints = new HashSet<WBInjectionPoint<?, ?>>();
+ Set<WeldInjectionPoint<?, ?>> jpaInjectionPoints = new HashSet<WeldInjectionPoint<?, ?>>();
Class<? extends Annotation> persistenceUnitAnnotationType = manager.getServices().get(PersistenceApiAbstraction.class).PERSISTENCE_UNIT_ANNOTATION_CLASS;
- for (WBField<?, ?> field : type.getAnnotatedWBFields(persistenceUnitAnnotationType))
+ for (WeldField<?, ?> field : type.getAnnotatedWeldFields(persistenceUnitAnnotationType))
{
jpaInjectionPoints.add(FieldInjectionPoint.of(declaringBean, field));
}
@@ -307,13 +307,13 @@
}
}
- public static Set<WBInjectionPoint<?, ?>> getResourceInjectionPoints(Bean<?> declaringBean, WBClass<?> type, BeanManagerImpl manager)
+ public static Set<WeldInjectionPoint<?, ?>> getResourceInjectionPoints(Bean<?> declaringBean, WeldClass<?> type, BeanManagerImpl manager)
{
if (manager.getServices().contains(ResourceInjectionServices.class))
{
Class<? extends Annotation> resourceAnnotationType = manager.getServices().get(EJBApiAbstraction.class).RESOURCE_ANNOTATION_CLASS;
- Set<WBInjectionPoint<?, ?>> resourceInjectionPoints = new HashSet<WBInjectionPoint<?, ?>>();
- for (WBField<?, ?> field : type.getAnnotatedWBFields(resourceAnnotationType))
+ Set<WeldInjectionPoint<?, ?>> resourceInjectionPoints = new HashSet<WeldInjectionPoint<?, ?>>();
+ for (WeldField<?, ?> field : type.getAnnotatedWeldFields(resourceAnnotationType))
{
resourceInjectionPoints.add(FieldInjectionPoint.of(declaringBean, field));
}
@@ -325,7 +325,7 @@
}
}
- public static List<Set<MethodInjectionPoint<?, ?>>> getInitializerMethods(Bean<?> declaringBean, WBClass<?> type)
+ public static List<Set<MethodInjectionPoint<?, ?>>> getInitializerMethods(Bean<?> declaringBean, WeldClass<?> type)
{
List<Set<MethodInjectionPoint<?, ?>>> initializerMethodsList = new ArrayList<Set<MethodInjectionPoint<?, ?>>>();
// Keep track of all seen methods so we can ignore overridden methods
@@ -338,12 +338,12 @@
}
});
- WBClass<?> t = type;
+ WeldClass<?> t = type;
while (!t.getJavaClass().equals(Object.class))
{
Set<MethodInjectionPoint<?, ?>> initializerMethods = new HashSet<MethodInjectionPoint<?,?>>();
initializerMethodsList.add(0, initializerMethods);
- for (WBMethod<?, ?> method : t.getDeclaredWBMethods())
+ for (WeldMethod<?, ?> method : t.getDeclaredWeldMethods())
{
if (method.isAnnotationPresent(Inject.class) && !method.isStatic())
{
@@ -370,12 +370,12 @@
}
seenMethods.put(method.getSignature(), method.getPackage());
}
- t = t.getWBSuperclass();
+ t = t.getWeldSuperclass();
}
return initializerMethodsList;
}
- private static boolean isOverridden(WBMethod<?, ?> method, Multimap<MethodSignature, Package> seenMethods)
+ private static boolean isOverridden(WeldMethod<?, ?> method, Multimap<MethodSignature, Package> seenMethods)
{
if (method.isPrivate())
{
@@ -391,10 +391,10 @@
}
}
- public static Set<ParameterInjectionPoint<?, ?>> getParameterInjectionPoints(Bean<?> declaringBean, WBConstructor<?> constructor)
+ public static Set<ParameterInjectionPoint<?, ?>> getParameterInjectionPoints(Bean<?> declaringBean, WeldConstructor<?> constructor)
{
Set<ParameterInjectionPoint<?,?>> injectionPoints = new HashSet<ParameterInjectionPoint<?,?>>();
- for (WBParameter<?, ?> parameter : constructor.getWBParameters())
+ for (WeldParameter<?, ?> parameter : constructor.getWBParameters())
{
injectionPoints.add(ParameterInjectionPoint.of(declaringBean, parameter));
}
@@ -408,7 +408,7 @@
{
for (MethodInjectionPoint<?, ?> method : i)
{
- for (WBParameter<?, ?> parameter : method.getWBParameters())
+ for (WeldParameter<?, ?> parameter : method.getWBParameters())
{
injectionPoints.add(ParameterInjectionPoint.of(declaringBean, parameter));
}
@@ -417,7 +417,7 @@
return injectionPoints;
}
- private static void addFieldInjectionPoint(WBField<?, ?> annotatedField, Set<FieldInjectionPoint<?, ?>> injectableFields, Bean<?> declaringBean)
+ private static void addFieldInjectionPoint(WeldField<?, ?> annotatedField, Set<FieldInjectionPoint<?, ?>> injectableFields, Bean<?> declaringBean)
{
if (!annotatedField.isAnnotationPresent(Produces.class))
{
@@ -576,10 +576,10 @@
return false;
}
- public static <T> ConstructorInjectionPoint<T> getBeanConstructor(Bean<?> declaringBean, WBClass<T> type)
+ public static <T> ConstructorInjectionPoint<T> getBeanConstructor(Bean<?> declaringBean, WeldClass<T> type)
{
ConstructorInjectionPoint<T> constructor = null;
- Set<WBConstructor<T>> initializerAnnotatedConstructors = type.getAnnotatedWBConstructors(Inject.class);
+ Set<WeldConstructor<T>> initializerAnnotatedConstructors = type.getAnnotatedWeldConstructors(Inject.class);
log.trace("Found " + initializerAnnotatedConstructors + " constructors annotated with @Initializer for " + type);
if (initializerAnnotatedConstructors.size() > 1)
{
@@ -593,10 +593,10 @@
constructor = ConstructorInjectionPoint.of(declaringBean, initializerAnnotatedConstructors.iterator().next());
log.trace("Exactly one constructor (" + constructor + ") annotated with @Initializer defined, using it as the bean constructor for " + type);
}
- else if (type.getNoArgsWBConstructor() != null)
+ else if (type.getNoArgsWeldConstructor() != null)
{
- constructor = ConstructorInjectionPoint.of(declaringBean, type.getNoArgsWBConstructor());
+ constructor = ConstructorInjectionPoint.of(declaringBean, type.getNoArgsWeldConstructor());
log.trace("Exactly one constructor (" + constructor + ") defined, using it as the bean constructor for " + type);
}
@@ -613,7 +613,7 @@
/**
* Injects EJBs and common fields
*/
- public static <T> void injectEEFields(T beanInstance, BeanManagerImpl manager, Iterable<WBInjectionPoint<?, ?>> ejbInjectionPoints, Iterable<WBInjectionPoint<?, ?>> persistenceContextInjectionPoints, Iterable<WBInjectionPoint<?, ?>> persistenceUnitInjectionPoints, Iterable<WBInjectionPoint<?, ?>> resourceInjectionPoints)
+ public static <T> void injectEEFields(T beanInstance, BeanManagerImpl manager, Iterable<WeldInjectionPoint<?, ?>> ejbInjectionPoints, Iterable<WeldInjectionPoint<?, ?>> persistenceContextInjectionPoints, Iterable<WeldInjectionPoint<?, ?>> persistenceUnitInjectionPoints, Iterable<WeldInjectionPoint<?, ?>> resourceInjectionPoints)
{
EjbInjectionServices ejbServices = manager.getServices().get(EjbInjectionServices.class);
JpaInjectionServices jpaServices = manager.getServices().get(JpaInjectionServices.class);
@@ -621,7 +621,7 @@
if (ejbServices != null)
{
- for (WBInjectionPoint<?, ?> injectionPoint : ejbInjectionPoints)
+ for (WeldInjectionPoint<?, ?> injectionPoint : ejbInjectionPoints)
{
Object ejbInstance = ejbServices.resolveEjb(injectionPoint);
injectionPoint.inject(beanInstance, ejbInstance);
@@ -630,12 +630,12 @@
if (jpaServices != null)
{
- for (WBInjectionPoint<?, ?> injectionPoint : persistenceContextInjectionPoints)
+ for (WeldInjectionPoint<?, ?> injectionPoint : persistenceContextInjectionPoints)
{
Object pcInstance = jpaServices.resolvePersistenceContext(injectionPoint);
injectionPoint.inject(beanInstance, pcInstance);
}
- for (WBInjectionPoint<?, ?> injectionPoint : persistenceUnitInjectionPoints)
+ for (WeldInjectionPoint<?, ?> injectionPoint : persistenceUnitInjectionPoints)
{
Object puInstance = jpaServices.resolvePersistenceUnit(injectionPoint);
injectionPoint.inject(beanInstance, puInstance);
@@ -644,7 +644,7 @@
if (resourceServices != null)
{
- for (WBInjectionPoint<?, ?> injectionPoint : resourceInjectionPoints)
+ for (WeldInjectionPoint<?, ?> injectionPoint : resourceInjectionPoints)
{
Object resourceInstance = resourceServices.resolveResource(injectionPoint);
injectionPoint.inject(beanInstance, resourceInstance);
@@ -711,12 +711,12 @@
}
}
- public static <T> boolean isInterceptor(WBClass<T> annotatedItem)
+ public static <T> boolean isInterceptor(WeldClass<T> annotatedItem)
{
return annotatedItem.isAnnotationPresent(javax.interceptor.Interceptor.class);
}
- public static <T> boolean isDecorator(WBClass<T> annotatedItem)
+ public static <T> boolean isDecorator(WeldClass<T> annotatedItem)
{
return annotatedItem.isAnnotationPresent(Decorator.class);
}
Deleted: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/WBStartupTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/WBStartupTest.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/WBStartupTest.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,53 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.test.unit.bootstrap;
-
-import java.util.Arrays;
-
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.BeanManager;
-
-import org.jboss.weld.mock.MockEELifecycle;
-import org.jboss.weld.mock.TestContainer;
-import org.testng.annotations.Test;
-
-/**
- * @author pmuir
- *
- */
-public class WBStartupTest
-{
-
- @Test
- public void test()
- {
- TestContainer container = new TestContainer(new MockEELifecycle(), Arrays.asList(Foo.class, Bar.class), null);
- container.startContainer();
- container.ensureRequestActive();
-
- BeanManager manager = container.getBeanManager();
-
- Bean<? extends Object> bean = manager.resolve(manager.getBeans(Foo.class));
- Foo foo = (Foo) manager.getReference(bean, Foo.class, manager.createCreationalContext(bean));
-
- assert foo != null;
- assert foo.getBar() != null;
-
- container.stopContainer();
- }
-
-}
Copied: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/WeldStartupTest.java (from rev 3883, ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/WBStartupTest.java)
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/WeldStartupTest.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/WeldStartupTest.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,53 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.test.unit.bootstrap;
+
+import java.util.Arrays;
+
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanManager;
+
+import org.jboss.weld.mock.MockEELifecycle;
+import org.jboss.weld.mock.TestContainer;
+import org.testng.annotations.Test;
+
+/**
+ * @author pmuir
+ *
+ */
+public class WeldStartupTest
+{
+
+ @Test
+ public void test()
+ {
+ TestContainer container = new TestContainer(new MockEELifecycle(), Arrays.asList(Foo.class, Bar.class), null);
+ container.startContainer();
+ container.ensureRequestActive();
+
+ BeanManager manager = container.getBeanManager();
+
+ Bean<? extends Object> bean = manager.resolve(manager.getBeans(Foo.class));
+ Foo foo = (Foo) manager.getReference(bean, Foo.class, manager.createCreationalContext(bean));
+
+ assert foo != null;
+ assert foo.getBar() != null;
+
+ container.stopContainer();
+ }
+
+}
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/deployment/structure/AccessibleManagerResolutionTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/deployment/structure/AccessibleManagerResolutionTest.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/deployment/structure/AccessibleManagerResolutionTest.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -12,8 +12,8 @@
import org.jboss.weld.bootstrap.api.ServiceRegistry;
import org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry;
import org.jboss.weld.ejb.EjbDescriptors;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.jlr.WBClassImpl;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.jlr.WeldClassImpl;
import org.jboss.weld.metadata.TypeStore;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
import org.jboss.weld.resources.ClassTransformer;
@@ -37,7 +37,7 @@
private void addBean(BeanManagerImpl manager, Class<?> c)
{
- WBClass<?> clazz = WBClassImpl.of(c, classTransformer);
+ WeldClass<?> clazz = WeldClassImpl.of(c, classTransformer);
RIBean<?> bean = ManagedBean.of(clazz, manager);
manager.addBean(bean);
BeanDeployerEnvironment environment = new BeanDeployerEnvironment(new EjbDescriptors(), manager);
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/NewEnterpriseBeanTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/NewEnterpriseBeanTest.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/NewEnterpriseBeanTest.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -10,7 +10,7 @@
import org.jboss.testharness.impl.packaging.PackagingType;
import org.jboss.weld.bean.NewSessionBean;
import org.jboss.weld.bean.SessionBean;
-import org.jboss.weld.introspector.WBAnnotated;
+import org.jboss.weld.introspector.WeldAnnotated;
import org.jboss.weld.literal.NewLiteral;
import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@@ -64,8 +64,8 @@
public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
{
initNewBean();
- Set<? extends WBAnnotated<?, ?>> wrappedBeanInjectionPoints = wrappedEnterpriseBean.getAnnotatedInjectionPoints();
- Set<? extends WBAnnotated<?, ?>> newBeanInjectionPoints = newEnterpriseBean.getAnnotatedInjectionPoints();
+ Set<? extends WeldAnnotated<?, ?>> wrappedBeanInjectionPoints = wrappedEnterpriseBean.getAnnotatedInjectionPoints();
+ Set<? extends WeldAnnotated<?, ?>> newBeanInjectionPoints = newEnterpriseBean.getAnnotatedInjectionPoints();
assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
}
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -8,8 +8,8 @@
import javax.inject.Qualifier;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.introspector.WBClass;
-import org.jboss.weld.introspector.jlr.WBClassImpl;
+import org.jboss.weld.introspector.WeldClass;
+import org.jboss.weld.introspector.jlr.WeldClassImpl;
import org.jboss.weld.metadata.TypeStore;
import org.jboss.weld.resources.ClassTransformer;
import org.jboss.weld.test.AbstractWeldTest;
@@ -24,7 +24,7 @@
@Test
public void testDeclaredAnnotations()
{
- WBClass<Order> annotatedElement = WBClassImpl.of(Order.class, transformer);
+ WeldClass<Order> annotatedElement = WeldClassImpl.of(Order.class, transformer);
assert annotatedElement.getAnnotations().size() == 1;
assert annotatedElement.getAnnotation(Random.class) != null;
assert annotatedElement.getJavaClass().equals(Order.class);
@@ -33,7 +33,7 @@
@Test
public void testMetaAnnotations()
{
- WBClass<Order> annotatedElement = WBClassImpl.of(Order.class, transformer);
+ WeldClass<Order> annotatedElement = WeldClassImpl.of(Order.class, transformer);
Set<Annotation> annotations = annotatedElement.getMetaAnnotations(Qualifier.class);
assert annotations.size() == 1;
Iterator<Annotation> it = annotations.iterator();
@@ -44,10 +44,10 @@
@Test
public void testEmpty()
{
- WBClass<Order> annotatedElement = WBClassImpl.of(Order.class, transformer);
+ WeldClass<Order> annotatedElement = WeldClassImpl.of(Order.class, transformer);
assert annotatedElement.getAnnotation(Stereotype.class) == null;
assert annotatedElement.getMetaAnnotations(Stereotype.class).size() == 0;
- WBClass<Antelope> classWithNoAnnotations = WBClassImpl.of(Antelope.class, transformer);
+ WeldClass<Antelope> classWithNoAnnotations = WeldClassImpl.of(Antelope.class, transformer);
assert classWithNoAnnotations.getAnnotations().size() == 0;
}
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/newsimple/NewSimpleBeanTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/newsimple/NewSimpleBeanTest.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/newsimple/NewSimpleBeanTest.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -7,7 +7,7 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.weld.bean.ManagedBean;
import org.jboss.weld.bean.NewManagedBean;
-import org.jboss.weld.introspector.WBAnnotated;
+import org.jboss.weld.introspector.WeldAnnotated;
import org.jboss.weld.literal.NewLiteral;
import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@@ -63,8 +63,8 @@
public void testNewBeanHasSameInjectedFieldsAsWrappedBean()
{
initNewBean();
- Set<? extends WBAnnotated<?, ?>> wrappedBeanInjectionPoints = wrappedSimpleBean.getAnnotatedInjectionPoints();
- Set<? extends WBAnnotated<?, ?>> newBeanInjectionPoints = newSimpleBean.getAnnotatedInjectionPoints();
+ Set<? extends WeldAnnotated<?, ?>> wrappedBeanInjectionPoints = wrappedSimpleBean.getAnnotatedInjectionPoints();
+ Set<? extends WeldAnnotated<?, ?>> newBeanInjectionPoints = newSimpleBean.getAnnotatedInjectionPoints();
assert wrappedBeanInjectionPoints.equals(newBeanInjectionPoints);
}
Deleted: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/Wbri256Test.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/Wbri256Test.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/Wbri256Test.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,19 +0,0 @@
-package org.jboss.weld.test.unit.lookup;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-@Artifact
-public class Wbri256Test extends AbstractWeldTest
-{
-
- @Test
- public void testParameterizedInjection()
- {
- LookupFoo lookupFoo = getCurrentManager().getInstanceByType(LookupFoo.class);
- assert lookupFoo.getFoo().getName().equals("foo");
- assert lookupFoo.getFoobaz().getName().equals("foobase");
- }
-
-}
Copied: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/Weld256Test.java (from rev 3893, ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/Wbri256Test.java)
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/Weld256Test.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/Weld256Test.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,19 @@
+package org.jboss.weld.test.unit.lookup;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+@Artifact
+public class Weld256Test extends AbstractWeldTest
+{
+
+ @Test
+ public void testParameterizedInjection()
+ {
+ LookupFoo lookupFoo = getCurrentManager().getInstanceByType(LookupFoo.class);
+ assert lookupFoo.getFoo().getName().equals("foo");
+ assert lookupFoo.getFoobaz().getName().equals("foobase");
+ }
+
+}
Deleted: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri279/Wbri279Test.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri279/Wbri279Test.java 2009-10-08 06:11:18 UTC (rev 3894)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri279/Wbri279Test.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.test.unit.lookup.wbri279;
-
-import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWeldTest;
-import org.testng.annotations.Test;
-
-/**
- * @author pmuir
- *
- */
-@Artifact
-public class Wbri279Test extends AbstractWeldTest
-{
-
- @Test(description="WBRI-279")
- public void testLookupOfGenericTypeSubclass()
- {
- assert createContextualInstance(SomeBean.class).getObjectAsString().equals(IntegerFactory.VALUE.toString());
- }
-
-}
Copied: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri279/Weld279Test.java (from rev 3893, ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri279/Wbri279Test.java)
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri279/Weld279Test.java (rev 0)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri279/Weld279Test.java 2009-10-08 06:32:51 UTC (rev 3895)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.test.unit.lookup.wbri279;
+
+import org.jboss.testharness.impl.packaging.Artifact;
+import org.jboss.weld.test.AbstractWeldTest;
+import org.testng.annotations.Test;
+
+/**
+ * @author pmuir
+ *
+ */
+@Artifact
+public class Weld279Test extends AbstractWeldTest
+{
+
+ @Test(description="WELD-279")
+ public void testLookupOfGenericTypeSubclass()
+ {
+ assert createContextualInstance(SomeBean.class).getObjectAsString().equals(IntegerFactory.VALUE.toString());
+ }
+
+}
15 years, 1 month
Weld SVN: r3894 - in ri/trunk: embedded-tck-runner/src/test/resources and 25 other directories.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-10-08 02:11:18 -0400 (Thu, 08 Oct 2009)
New Revision: 3894
Modified:
ri/trunk/dist/readme.txt
ri/trunk/embedded-tck-runner/src/test/resources/log4j.xml
ri/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/Container.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewManagedBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewSessionBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerField.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/facade/AbstractFacade.java
ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java
ri/trunk/impl/src/main/java/org/jboss/weld/context/ContextLifecycle.java
ri/trunk/impl/src/main/java/org/jboss/weld/event/EventImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverFactory.java
ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java
ri/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMethod.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBMember.java
ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBConstructorImpl.java
ri/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java
ri/trunk/impl/src/main/java/org/jboss/weld/resolution/NameBasedResolver.java
ri/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
ri/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java
ri/trunk/inject-tck-runner/src/test/resources/log4j.xml
ri/trunk/inject-tck-runner/tests.xml
ri/trunk/jboss-as/build.properties
ri/trunk/jboss-as/build.xml
ri/trunk/jboss-tck-runner/src/test/resources/log4j.xml
ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environment.java
ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environments.java
ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Service.java
ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/BeanDeploymentArchive.java
ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/Deployment.java
ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/EjbServices.java
ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/EjbInjectionServices.java
ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/InjectionServices.java
ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/JpaInjectionServices.java
ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/ResourceInjectionServices.java
ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java
ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/ResourceLoader.java
ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/ServletServices.java
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/home.xhtml
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/web.xml
Log:
miscellaneous renames
Modified: ri/trunk/dist/readme.txt
===================================================================
--- ri/trunk/dist/readme.txt 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/dist/readme.txt 2009-10-08 06:11:18 UTC (rev 3894)
@@ -1,4 +1,4 @@
-Web Beans
+Weld
------------
Java Contexts and Dependency Injection (JSR-299) is a new Java standard for
Modified: ri/trunk/embedded-tck-runner/src/test/resources/log4j.xml
===================================================================
--- ri/trunk/embedded-tck-runner/src/test/resources/log4j.xml 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/embedded-tck-runner/src/test/resources/log4j.xml 2009-10-08 06:11:18 UTC (rev 3894)
@@ -54,7 +54,7 @@
</category>
-->
- <!-- ############### Web Beans logging ################### -->
+ <!-- ############### Weld logging ################### -->
<category name="org.jboss.weld">
<priority value="WARN"/>
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -100,7 +100,7 @@
import com.google.common.collect.Multimaps;
/**
- * Implementation of the Weld Manager.
+ * Implementation of the Bean Manager.
*
* Essentially a singleton for registering Beans, Contexts, Observers,
* Interceptors etc. as well as providing resolution
@@ -1017,7 +1017,7 @@
Bean<T> bean = (Bean<T>) resolve(getBeans(element, bindings));
if (bean == null)
{
- throw new UnsatisfiedResolutionException(element + "Unable to resolve any Web Beans");
+ throw new UnsatisfiedResolutionException(element + "Unable to resolve any Managed Beans");
}
boolean normalScoped = getServices().get(MetaAnnotationStore.class).getScopeModel(bean.getScope()).isNormal();
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/Container.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/Container.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/Container.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -27,7 +27,7 @@
import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
/**
- * A Web Beans application container
+ * A Weld application container
*
* @author pmuir
*
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -83,7 +83,7 @@
private Set<WBInjectionPoint<?, ?>> delegateInjectionPoints;
// If the type a primitive?
private boolean primitive;
- // The Web Beans manager
+ // The Bean manager
protected BeanManagerImpl manager;
private boolean _serializable;
@@ -100,7 +100,7 @@
/**
* Constructor
*
- * @param manager The Weld manager
+ * @param manager The Bean manager
*/
public AbstractBean(String idSuffix, BeanManagerImpl manager)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractClassBean.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -88,7 +88,7 @@
* Constructor
*
* @param type The type
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
*/
protected AbstractClassBean(WBClass<T> type, String idSuffix, BeanManagerImpl manager)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractProducerBean.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -63,7 +63,7 @@
/**
* Constructor
* @param declaringBean The declaring bean
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
*/
public AbstractProducerBean(String idSuffix, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/ManagedBean.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -91,7 +91,7 @@
* Constructor
*
* @param type The type of the bean
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
*/
protected ManagedBean(WBClass<T> type, String idSuffix, BeanManagerImpl manager)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewManagedBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewManagedBean.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewManagedBean.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -38,7 +38,7 @@
* Creates an instance of a NewSimpleBean from an annotated class
*
* @param clazz The annotated class
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
* @return a new NewSimpleBean instance
*/
public static <T> NewManagedBean<T> of(WBClass<T> clazz, BeanManagerImpl manager)
@@ -52,7 +52,7 @@
* Protected constructor
*
* @param type An annotated class
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
*/
protected NewManagedBean(final WBClass<T> type, String idSuffix, BeanManagerImpl manager)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewSessionBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewSessionBean.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/NewSessionBean.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -40,7 +40,7 @@
* Creates an instance of a NewEnterpriseBean from an annotated class
*
* @param clazz The annotated class
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
* @return a new NewEnterpriseBean instance
*/
public static <T> NewSessionBean<T> of(InternalEjbDescriptor<T> ejbDescriptor, BeanManagerImpl manager)
@@ -55,7 +55,7 @@
* Protected constructor
*
* @param type An annotated class
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
*/
protected NewSessionBean(final WBClass<T> type, InternalEjbDescriptor<T> ejbDescriptor, String idSuffix, BeanManagerImpl manager)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerField.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerField.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/ProducerField.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -59,7 +59,7 @@
*
* @param method The producer field abstraction
* @param declaringBean The declaring bean
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
*/
protected ProducerField(WBField<T, X> field, AbstractClassBean<X> declaringBean, BeanManagerImpl manager)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/SessionBean.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -92,7 +92,7 @@
* Constructor
*
* @param type The type of the bean
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
*/
protected SessionBean(WBClass<T> type, InternalEjbDescriptor<T> ejbDescriptor, String idSuffix, BeanManagerImpl manager)
{
@@ -284,7 +284,7 @@
{
if (ejbDescriptor.isMessageDriven())
{
- throw new DefinitionException("Message Driven Beans can't be Web Beans");
+ throw new DefinitionException("Message Driven Beans can't be Managed Beans");
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/facade/AbstractFacade.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/facade/AbstractFacade.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/builtin/facade/AbstractFacade.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -42,7 +42,7 @@
// The binding types the helper operates on
private final Set<? extends Annotation> bindings;
- // The Web Beans manager
+ // The Bean manager
private final BeanManagerImpl manager;
// The type of the operation
private final Type type;
@@ -50,7 +50,7 @@
/**
*
* @param type The event type
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
* @param bindings The binding types
*/
protected AbstractFacade(Type type, BeanManagerImpl manager, Set<? extends Annotation> bindings)
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -149,10 +149,10 @@
static
{
- log.info("Web Beans " + getVersion());
+ log.info("Weld " + getVersion());
}
- // The Web Beans manager
+ // The Bean manager
private BeanManagerImpl deploymentManager;
private Map<BeanDeploymentArchive, BeanDeployment> beanDeployments;
private Environment environment;
@@ -285,7 +285,7 @@
entry.getValue().deployBeans(environment);
}
fireAfterBeanDiscoveryEvent();
- log.debug("Web Beans initialized. Validating beans.");
+ log.debug("Weld initialized. Validating beans.");
}
return this;
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/context/ContextLifecycle.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/context/ContextLifecycle.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/context/ContextLifecycle.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -31,7 +31,7 @@
import org.jboss.weld.log.Logging;
/**
- * An implementation of the Web Beans lifecycle that supports restoring
+ * An implementation of the Weld lifecycle that supports restoring
* and destroying all the built in contexts
*
* @author Pete Muir
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/event/EventImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/event/EventImpl.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/event/EventImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -53,7 +53,7 @@
* Constructor
*
* @param eventType The event type
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
* @param bindings The binding types
*/
private EventImpl(Type eventType, BeanManagerImpl manager, Set<Annotation> bindings)
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverFactory.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverFactory.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverFactory.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -38,7 +38,7 @@
*
* @param method The observer method abstraction
* @param declaringBean The declaring bean
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
* @return An observer implementation built from the method abstraction
*/
public static <X, T> ObserverMethodImpl<X, T> create(WBMethod<T, X> method, RIBean<X> declaringBean, BeanManagerImpl manager)
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/event/ObserverMethodImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -73,7 +73,7 @@
*
* @param observer The observer
* @param declaringBean The observer bean
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
*/
protected ObserverMethodImpl(final WBMethod<T, X> observer, final RIBean<X> declaringBean, final BeanManagerImpl manager)
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/injection/ConstructorInjectionPoint.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -154,10 +154,12 @@
* annotated parameters.
*
* @param parameters The list of annotated parameter to look up
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
* @return The object array of looked up values
*/
- protected Object[] getParameterValues(List<ParameterInjectionPoint<?, ?>> parameters, Object specialVal, Class<? extends Annotation> specialParam, BeanManagerImpl manager, CreationalContext<?> creationalContext)
+ protected Object[] getParameterValues(List<ParameterInjectionPoint<?, ?>> parameters,
+ Object specialVal, Class<? extends Annotation> specialParam,
+ BeanManagerImpl manager, CreationalContext<?> creationalContext)
{
Object[] parameterValues = new Object[parameters.size()];
Iterator<ParameterInjectionPoint<?, ?>> iterator = parameters.iterator();
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/injection/MethodInjectionPoint.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -246,10 +246,12 @@
* annotated parameters.
*
* @param parameters The list of annotated parameter to look up
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
* @return The object array of looked up values
*/
- protected Object[] getParameterValues(List<ParameterInjectionPoint<?, ?>> parameters, Class<? extends Annotation> specialParam, Object specialVal, BeanManagerImpl manager, CreationalContext<?> creationalContext)
+ protected Object[] getParameterValues(List<ParameterInjectionPoint<?, ?>> parameters,
+ Class<? extends Annotation> specialParam, Object specialVal,
+ BeanManagerImpl manager, CreationalContext<?> creationalContext)
{
Object[] parameterValues = new Object[parameters.size()];
Iterator<ParameterInjectionPoint<?, ?>> iterator = parameters.iterator();
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMethod.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMethod.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/WBMethod.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -58,7 +58,7 @@
* class. Useful with proxies
*
* @param instance The instance to invoke
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
* @return A reference to the instance
*/
public T invokeOnInstance(Object instance, Object... parameters) throws IllegalArgumentException, SecurityException, IllegalAccessException, InvocationTargetException, NoSuchMethodException;
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBMember.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBMember.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/AbstractWBMember.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -123,7 +123,7 @@
/**
* Gets the current value of the member
*
- * @param beanManager The Web Beans manager
+ * @param beanManager The Bean manager
* @return The current value
*
public T getValue(BeanManager beanManager)
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBConstructorImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBConstructorImpl.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/introspector/jlr/WBConstructorImpl.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -218,7 +218,7 @@
/**
* Creates a new instance
*
- * @param manager The Web Beans manager
+ * @param manager The Bean manager
* @return An instance
* @throws InvocationTargetException
* @throws IllegalAccessException
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/jsf/JsfHelper.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -112,7 +112,7 @@
}
else
{
- throw new IllegalStateException("Web Beans doesn not support using JSF in an non-servlet environment");
+ throw new IllegalStateException("Weld doesn not support using JSF in an non-servlet environment");
}
}
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/resolution/NameBasedResolver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/resolution/NameBasedResolver.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/resolution/NameBasedResolver.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -39,7 +39,7 @@
// The beans to search
private final Iterable<? extends Bean<?>> allBeans;
- // The Web Beans manager
+ // The Bean manager
private final BeanManagerImpl manager;
/**
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/servlet/ServletLifecycle.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -35,7 +35,7 @@
import org.jboss.weld.log.Logging;
/**
- * Implementation of the Web Beans lifecycle that can react to servlet events
+ * Implementation of the Weld lifecycle that can react to servlet events
* and drives the Session, Conversation and Request (for Servlet requests)
* lifecycle
*
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/util/Beans.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -208,7 +208,7 @@
if (preDestroyMethods.size() > 1)
{
// TODO actually this is wrong, in EJB you can have @PreDestroy methods
- // on the superclass, though the Web Beans spec is silent on the issue
+ // on the superclass, though the CDI spec is silent on the issue
throw new DefinitionException("Cannot have more than one pre destroy method annotated with @PreDestroy for " + type);
}
else if (preDestroyMethods.size() == 1)
Modified: ri/trunk/inject-tck-runner/src/test/resources/log4j.xml
===================================================================
--- ri/trunk/inject-tck-runner/src/test/resources/log4j.xml 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/inject-tck-runner/src/test/resources/log4j.xml 2009-10-08 06:11:18 UTC (rev 3894)
@@ -54,7 +54,7 @@
</category>
-->
- <!-- ############### Web Beans logging ################### -->
+ <!-- ############### Weld logging ################### -->
<category name="org.jboss.weld">
<priority value="WARN"/>
Modified: ri/trunk/inject-tck-runner/tests.xml
===================================================================
--- ri/trunk/inject-tck-runner/tests.xml 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/inject-tck-runner/tests.xml 2009-10-08 06:11:18 UTC (rev 3894)
@@ -1,8 +1,8 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
-<suite name="Web Beans AtInject TCK" verbose="2" >
+<suite name="Weld AtInject TCK" verbose="2" >
- <test name="Web Beans RI" junit="true">
+ <test name="Weld" junit="true">
<classes>
<class name="org.jboss.weld.atinject.tck.AtInjectTCK"></class>
</classes>
Modified: ri/trunk/jboss-as/build.properties
===================================================================
--- ri/trunk/jboss-as/build.properties 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/jboss-as/build.properties 2009-10-08 06:11:18 UTC (rev 3894)
@@ -1,4 +1,4 @@
-# Container a number of properties associated with installing Web Beans into JBoss AS and running the TCK in JBoss AS
+# Container a number of properties associated with installing Weld into JBoss AS and running the TCK in JBoss AS
jboss.home=/Applications/jboss-5.2.0.Beta
org.jboss.testharness.container.javaOpts=-Xms128m -Xmx384m -XX:MaxPermSize=128m -Dorg.jboss.resolver.warning=true -Dsun.rmi.dgc.client.gcInterval=3600000 -Dsun.rmi.dgc.server.gcInterval=3600000
Modified: ri/trunk/jboss-as/build.xml
===================================================================
--- ri/trunk/jboss-as/build.xml 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/jboss-as/build.xml 2009-10-08 06:11:18 UTC (rev 3894)
@@ -13,7 +13,7 @@
<delete dir="target" failonerror="false" />
</target>
- <target name="update" depends="install-weld.deployer, install-javassist-update" description="Update JBoss 5.x or 6.x for Web Beans" />
+ <target name="update" depends="install-weld.deployer, install-javassist-update" description="Update JBoss 5.x or 6.x for Weld" />
<target name="install-weld.deployer">
<echo message="Installing Weld ${weld.version} to ${jboss.home}" />
Modified: ri/trunk/jboss-tck-runner/src/test/resources/log4j.xml
===================================================================
--- ri/trunk/jboss-tck-runner/src/test/resources/log4j.xml 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/jboss-tck-runner/src/test/resources/log4j.xml 2009-10-08 06:11:18 UTC (rev 3894)
@@ -54,7 +54,7 @@
</category>
-->
- <!-- ############### Web Beans logging ################### -->
+ <!-- ############### Weld logging ################### -->
<category name="org.jboss.weld">
<priority value="WARN"/>
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environment.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environment.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environment.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -19,7 +19,7 @@
import java.util.Set;
/**
- * Represents an environment. Specifies the services Web Beans requires
+ * Represents an environment. Specifies the services Weld requires
*
* @author Pete Muir
*
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environments.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environments.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Environments.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -42,7 +42,7 @@
/**
* Java EE5 or Java EE6
*
- * In this environment, Web Beans requires that {@link JpaInjectionServices},
+ * In this environment, Weld requires that {@link JpaInjectionServices},
* {@link ResourceInjectionServices} and {@link EjbInjectionServices} are
* present, and so will perform EE-style field injection on managed beans
* itself
@@ -62,7 +62,7 @@
/**
* Java EE5 or Java EE6
*
- * In this environment, Web Beans requires that {@link InjectionServices} are
+ * In this environment, Weld requires that {@link InjectionServices} are
* present, and expects the container to use this callback to perform EE-style
* injection
*
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Service.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Service.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Service.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -17,7 +17,7 @@
package org.jboss.weld.bootstrap.api;
/**
- * Marks a Service which is used by Web Beans to interact with it's environment
+ * Marks a Service which is used by Weld to interact with it's environment
* @author Pete Muir
*
*/
@@ -25,7 +25,7 @@
{
/**
- * Called by Web beans when it is shutting down, allowing the service to
+ * Called by Weld when it is shutting down, allowing the service to
* perform any cleanup needed.
*/
public void cleanup();
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/BeanDeploymentArchive.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/BeanDeploymentArchive.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/BeanDeploymentArchive.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -53,7 +53,7 @@
* deployment archive and adjacent to it in the deployment archive graph.
*
* Cycles in the accessible BeanDeploymentArchive graph are allowed. If a
- * cycle is detected by Web Beans, it will be automatically removed by Web
+ * cycle is detected by Weld, it will be automatically removed by Web
* Beans. This means any implementor of this interface don't need to worry
* about circularities.
*
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/Deployment.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/Deployment.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/spi/Deployment.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -42,13 +42,13 @@
* <h3>Deployment structure representation</h3>
*
* <p>
- * Web Beans will request the bean archive deployment structure during the bean
+ * Weld will request the bean archive deployment structure during the bean
* discovery initialization step. After this step, CDI allows users to define
* bean's programmatically, possibly with bean classes from a deployment archive
- * which is currently not a bean deployment archive. Web Beans will request the
+ * which is currently not a bean deployment archive. Weld will request the
* {@link BeanDeploymentArchive} for each programmatically using
* {@link #loadBeanDeploymentArchive(Class)}. If any unknown
- * {@link BeanDeploymentArchive}s are loaded, before Web Beans proceeds to
+ * {@link BeanDeploymentArchive}s are loaded, before Weld proceeds to
* validating the deployment, the bean archive deployment structure will
* re-requested.
* </p>
@@ -121,7 +121,7 @@
* all Java EE modules such as WARs, EJB jars and RARs.
*
* Cycles in the accessible BeanDeploymentArchive graph are allowed. If a
- * cycle is detected by Web Beans, it will be automatically removed by Web
+ * cycle is detected by Weld, it will be automatically removed by Web
* Beans. This means any implementor of this interface don't need to worry
* about circularities.
*
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/EjbServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/EjbServices.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/ejb/spi/EjbServices.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -21,7 +21,7 @@
import org.jboss.weld.ejb.api.SessionObjectReference;
/**
- * A container should implement this interface to allow Web Beans to
+ * A container should implement this interface to allow Weld to
* resolve EJB and discover EJBs
*
* {@link EjbServices} is a per-deployment service.
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/EjbInjectionServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/EjbInjectionServices.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/EjbInjectionServices.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -22,7 +22,7 @@
import org.jboss.weld.bootstrap.api.Service;
/**
- * A container should implement this interface to allow Web Beans to
+ * A container should implement this interface to allow Weld to
* resolve EJB.
*
* {@link EjbInjectionServices} is a per-module service.
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/InjectionServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/InjectionServices.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/InjectionServices.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -19,7 +19,7 @@
import org.jboss.weld.bootstrap.api.Service;
/**
- * Provides callbacks to the container when Web Beans performs injection on an
+ * Provides callbacks to the container when Weld performs injection on an
* InjectionTarget, managed bean or session bean
*
* This service may be used to provide EE-style injection.
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/JpaInjectionServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/JpaInjectionServices.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/JpaInjectionServices.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -23,7 +23,7 @@
import org.jboss.weld.bootstrap.api.Service;
/**
- * A container should implement this interface to allow the Web Beans RI to
+ * A container should implement this interface to allow the Weld RI to
* resolve JPA persistence units and discover entities
*
* {@link JpaInjectionServices} is a per-module service.
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/ResourceInjectionServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/ResourceInjectionServices.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/ResourceInjectionServices.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -21,7 +21,7 @@
import org.jboss.weld.bootstrap.api.Service;
/**
- * A container should implement this interface to allow the Web Beans RI to
+ * A container should implement this interface to allow the Weld to
* resolve Resources
*
* {@link ResourceInjectionServices} is per-module service.
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -28,7 +28,7 @@
import org.jboss.weld.ejb.spi.EjbDescriptor;
/**
- * Functionality provided by the Web Beans Manager over and above the JSR-299
+ * Functionality provided by the Weld Manager over and above the JSR-299
* Manager.
*
* @author Pete Muir
@@ -62,7 +62,7 @@
public WeldManager setCurrent(Class<? extends Annotation> scopeType);
/**
- * The injection target for the given EJB, or null if Web Beans was not
+ * The injection target for the given EJB, or null if Weld was not
* given this descriptor in the deployment.
*
* @param <T>
@@ -72,7 +72,7 @@
public <T> InjectionTarget<T> createInjectionTarget(EjbDescriptor<T> descriptor);
/**
- * Get the Bean object for the given EJB, or null if Web Beans was not given
+ * Get the Bean object for the given EJB, or null if Weld was not given
* this descriptor in the deployment.
*
* @param <T>
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/ResourceLoader.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/ResourceLoader.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/resources/spi/ResourceLoader.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -23,7 +23,7 @@
import org.jboss.weld.bootstrap.api.Service;
/**
- * Resource loading/class creation services for Web Beans. By default an
+ * Resource loading/class creation services for Weld. By default an
* implementation which uses the Thread Context ClassLoader if available,
* otherwise the classloading of the implementation is used.
*
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/ServletServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/ServletServices.java 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/servlet/api/ServletServices.java 2009-10-08 06:11:18 UTC (rev 3894)
@@ -23,7 +23,7 @@
/**
* Allows the container to identify BDA in use for a request. This method will
- * be called, in the same thread as the request, every time Web Beans needs to
+ * be called, in the same thread as the request, every time Weld needs to
* identify a request.
*
* {@link ServletServices} is a per-deployment service.
Modified: ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/home.xhtml
===================================================================
--- ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/home.xhtml 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/home.xhtml 2009-10-08 06:11:18 UTC (rev 3894)
@@ -6,14 +6,14 @@
<h:head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
- <title>JSF 2.0 Web Beans Example</title>
+ <title>JSF 2.0 Weld Example</title>
</h:head>
<h:body>
<h:form id="NumberGuessMain">
<h:panelGrid styleClass="title-panel">
<h:outputText value="Guess Number" styleClass="title-panel-text"/>
- <h:outputText value="Powered By JavaServer Faces 2.0 and Web Beans" styleClass="title-panel-subtext"/>
+ <h:outputText value="Powered By JavaServer Faces 2.0 and Weld" styleClass="title-panel-subtext"/>
</h:panelGrid>
<div style="color: black; font-size: 20px;">
Modified: ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/web.xml
===================================================================
--- ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/web.xml 2009-10-08 05:51:23 UTC (rev 3893)
+++ ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/web.xml 2009-10-08 06:11:18 UTC (rev 3894)
@@ -5,7 +5,7 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
- <display-name>Web Beans Test</display-name>
+ <display-name>Weld Test</display-name>
<!-- JSF -->
15 years, 1 month
Weld SVN: r3893 - in ri/trunk: dist and 55 other directories.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-10-08 01:51:23 -0400 (Thu, 08 Oct 2009)
New Revision: 3893
Added:
ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java
ri/trunk/impl/src/main/java/org/jboss/weld/el/AbstractWeldELResolver.java
ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldELContextListener.java
ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldELResolver.java
ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldExpressionFactory.java
ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldMethodExpression.java
ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldValueExpression.java
ri/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java
ri/trunk/impl/src/main/java/org/jboss/weld/servlet/WeldListener.java
ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java
ri/trunk/tests/src/main/java/org/jboss/weld/test/AbstractWeldTest.java
Removed:
ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WebBeansBootstrap.java
ri/trunk/impl/src/main/java/org/jboss/weld/el/AbstractWebBeansELResolver.java
ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansELContextListener.java
ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansELResolver.java
ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansExpressionFactory.java
ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansMethodExpression.java
ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansValueExpression.java
ri/trunk/impl/src/main/java/org/jboss/weld/jsf/WebBeansPhaseListener.java
ri/trunk/impl/src/main/java/org/jboss/weld/servlet/WebBeansListener.java
ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WebBeansManager.java
ri/trunk/tests/src/main/java/org/jboss/weld/test/AbstractWebBeansTest.java
Modified:
ri/trunk/dist/readme.txt
ri/trunk/dist/release-process.txt
ri/trunk/dist/versions.properties
ri/trunk/eclipse-code-formatter-profile.xml
ri/trunk/embedded-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties
ri/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java
ri/trunk/jboss-as/build.properties
ri/trunk/jboss-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties
ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Bootstrap.java
ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Singleton.java
ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ForwardingBootstrap.java
ri/trunk/spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockBootstrap.java
ri/trunk/tests/src/main/java/org/jboss/weld/mock/MockServletLifecycle.java
ri/trunk/tests/src/main/java/org/jboss/weld/mock/el/EL.java
ri/trunk/tests/src/test/debug-resources/META-INF/jboss-test-harness.properties
ri/trunk/tests/src/test/java/org/jboss/weld/test/examples/ExampleTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/examples/MockExampleTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/ActivitiesTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/child/SameBeanTypeInChildActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/ELCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/EventCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/InactiveScopeTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/InjectedManagerCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/InstanceCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/JndiManagerCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/NonNormalScopeTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/annotated/DeclaringTypeTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/annotated/ExampleTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/annotated/decoration/AnnotatedTypeDecoratorTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/DiscoverFailsBootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/multipleEnterprise/BootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/multipleEnterpriseAndSimple/BootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/multipleSimple/BootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/singleEnterprise/BootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/singleProducerMethod/BootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/singleSimple/BootstrapTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/ApplicationScopedTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/ContextTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/ParameterizedTypeScopedTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/PassivatingContextTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/decorator/simple/SimpleDecoratorTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/definition/ELResolverTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/definition/StereotypesTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/environments/servlet/ServletLifecycleTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/NewEnterpriseBeanTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/enterprise/EnterpriseBeanTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/event/SimpleEventTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/event/tx/AbstractHtmlUnitTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/exceptions/ExceptionHandlingTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/named/NamedBeanWithBindingTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/newsimple/NewSimpleBeanTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/field/ParameterizedProducerTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/DisposalMethodOnOtherBeanNotResolvedTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/ManagerProducerTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/NamedProducerTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/NullProducerTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/proxy/ProxyTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/proxy/enterprise/EnterpriseBeanProxyTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTests.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/simple/SimpleInterceptorTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/LookupInstanceTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/Wbri256Test.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/circular/CircularDependencyTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri279/Wbri279Test.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri293/ContextualReferenceTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/manager/EjbDescriptorLookupTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/manager/ManagerTest.java
ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/noncontextual/ExampleTest.java
Log:
source code refactorings
Modified: ri/trunk/dist/readme.txt
===================================================================
--- ri/trunk/dist/readme.txt 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/dist/readme.txt 2009-10-08 05:51:23 UTC (rev 3893)
@@ -2,7 +2,7 @@
------------
Java Contexts and Dependency Injection (JSR-299) is a new Java standard for
-dependency injection and contextual lifecycle management. Web Beans is the
+dependency injection and contextual lifecycle management. Weld is the
reference implementation of JSR-299.
This distribution, as a whole, is licensed under the terms of the Apache Public
@@ -12,10 +12,10 @@
doc/
-- The Reference guide, take a look at doc/en-US/html/index.html for getting
- started using Web Beans and the facilities offered by JSR-299.
+ started using Weld and the facilities offered by JSR-299.
examples/
- -- The Web Beans examples, the examples are described in more detail in the
+ -- The Weld examples, the examples are described in more detail in the
reference guide
jboss-as/
@@ -25,5 +25,5 @@
lib/
-- Libraries, for building the examples
-lib/webbeans
- -- Web Beans binary, source and javadoc jars
+lib/weld
+ -- Weld binary, source and javadoc jars
Modified: ri/trunk/dist/release-process.txt
===================================================================
--- ri/trunk/dist/release-process.txt 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/dist/release-process.txt 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,4 +1,4 @@
-Release process for Web Beans RI
+Release process for Weld
--------------------------------
* Run the testsuite and examples
@@ -10,7 +10,7 @@
* Check the tags
* Build the maven artifacts using release:perform in all locations
* Verify the checkout of the tag
-* Release the webbeans-ri-int for jbossas if necessary
+* Release the weld-ri-int for jbossas if necessary
* Edit the checkout of the tag, and alter the versions in jboss-as/build.properties to released versions
* Edit the checkout of the tag, and alter the versions of all poms under examples to be the released versions
* Checkin tag changes
Modified: ri/trunk/dist/versions.properties
===================================================================
--- ri/trunk/dist/versions.properties 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/dist/versions.properties 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,6 +1,6 @@
jsr299.version=1.0.0-SNAPSHOT
-webbeans.version=1.0.0-SNAPSHOT
-webbeans.servlet.version=1.0.0-SNAPSHOT
-webbeans.logger.version=1.0.0-SNAPSHOT
-webbeans.wicket.version=1.0.0-SNAPSHOT
-webbeans.se.version=1.0.0-SNAPSHOT
+weld.version=1.0.0-SNAPSHOT
+weld.servlet.version=1.0.0-SNAPSHOT
+weld.logger.version=1.0.0-SNAPSHOT
+weld.wicket.version=1.0.0-SNAPSHOT
+weld.se.version=1.0.0-SNAPSHOT
Modified: ri/trunk/eclipse-code-formatter-profile.xml
===================================================================
--- ri/trunk/eclipse-code-formatter-profile.xml 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/eclipse-code-formatter-profile.xml 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<profiles version="11">
-<profile kind="CodeFormatterProfile" name="WebBeans" version="11">
+<profile kind="CodeFormatterProfile" name="Weld" version="11">
<setting id="org.eclipse.jdt.core.formatter.comment.insert_new_line_before_root_tags" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_after_comma_in_annotation" value="insert"/>
<setting id="org.eclipse.jdt.core.formatter.insert_space_before_comma_in_type_parameters" value="do not insert"/>
Modified: ri/trunk/embedded-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties
===================================================================
--- ri/trunk/embedded-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/embedded-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,5 +1,5 @@
# Configuration for running incontainer tests from your IDE
-# Alter the path webbeans accordingly (relative from the tck/impl dir)
+# Alter the path weld accordingly (relative from the tck/impl dir)
org.jboss.testharness.standalone=false
org.jboss.testharness.container.extraConfigurationDir=../../weld/jboss-as
org.jboss.testharness.container.forceRestart=false
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/BeanManagerImpl.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -67,14 +67,14 @@
import org.jboss.weld.ejb.EjbDescriptors;
import org.jboss.weld.ejb.spi.EjbDescriptor;
import org.jboss.weld.el.Namespace;
-import org.jboss.weld.el.WebBeansELResolver;
-import org.jboss.weld.el.WebBeansExpressionFactory;
+import org.jboss.weld.el.WeldELResolver;
+import org.jboss.weld.el.WeldExpressionFactory;
import org.jboss.weld.introspector.WBAnnotated;
import org.jboss.weld.literal.AnyLiteral;
import org.jboss.weld.literal.DefaultLiteral;
import org.jboss.weld.log.Log;
import org.jboss.weld.log.Logging;
-import org.jboss.weld.manager.api.WebBeansManager;
+import org.jboss.weld.manager.api.WeldManager;
import org.jboss.weld.metadata.cache.MetaAnnotationStore;
import org.jboss.weld.metadata.cache.ScopeModel;
import org.jboss.weld.resolution.NameBasedResolver;
@@ -100,7 +100,7 @@
import com.google.common.collect.Multimaps;
/**
- * Implementation of the Web Beans Manager.
+ * Implementation of the Weld Manager.
*
* Essentially a singleton for registering Beans, Contexts, Observers,
* Interceptors etc. as well as providing resolution
@@ -108,7 +108,7 @@
* @author Pete Muir
* @author Marius Bogoevici
*/
-public class BeanManagerImpl implements WebBeansManager, Serializable
+public class BeanManagerImpl implements WeldManager, Serializable
{
@@ -222,7 +222,7 @@
private transient final TypeSafeResolver<? extends Resolvable, InterceptorImpl<?>> interceptorResolver;
private transient final TypeSafeResolver<? extends Resolvable, ObserverMethod<?,?>> observerResolver;
private transient final NameBasedResolver nameBasedResolver;
- private transient final ELResolver webbeansELResolver;
+ private transient final ELResolver weldELResolver;
private transient Namespace rootNamespace;
/*
@@ -428,7 +428,7 @@
this.interceptorResolver = new TypeSafeInterceptorResolver(this, createDynamicAccessibleIterable(Transform.INTERCEPTOR_BEAN));
this.observerResolver = new TypeSafeObserverResolver(this, createDynamicAccessibleIterable(Transform.EVENT_OBSERVER));
this.nameBasedResolver = new NameBasedResolver(this, createDynamicAccessibleIterable(Transform.BEAN));
- this.webbeansELResolver = new WebBeansELResolver(this);
+ this.weldELResolver = new WeldELResolver(this);
this.childActivities = new CopyOnWriteArraySet<BeanManagerImpl>();
this.currentInjectionPoint = new ThreadLocal<Stack<InjectionPoint>>()
@@ -1363,12 +1363,12 @@
public ELResolver getELResolver()
{
- return webbeansELResolver;
+ return weldELResolver;
}
public ExpressionFactory wrapExpressionFactory(ExpressionFactory expressionFactory)
{
- return new WebBeansExpressionFactory(expressionFactory);
+ return new WeldExpressionFactory(expressionFactory);
}
public <T> WBCreationalContext<T> createCreationalContext(Contextual<T> contextual)
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WebBeansBootstrap.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WebBeansBootstrap.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WebBeansBootstrap.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,439 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.bootstrap;
-
-import java.util.HashMap;
-import java.util.HashSet;
-import java.util.Map;
-import java.util.Set;
-import java.util.Map.Entry;
-
-import javax.enterprise.inject.spi.BeforeBeanDiscovery;
-import javax.enterprise.inject.spi.BeforeShutdown;
-import javax.enterprise.inject.spi.Extension;
-
-import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.Container;
-import org.jboss.weld.ContextualStore;
-import org.jboss.weld.DefinitionException;
-import org.jboss.weld.DeploymentException;
-import org.jboss.weld.Validator;
-import org.jboss.weld.bean.builtin.ManagerBean;
-import org.jboss.weld.bootstrap.api.Bootstrap;
-import org.jboss.weld.bootstrap.api.Environment;
-import org.jboss.weld.bootstrap.api.Lifecycle;
-import org.jboss.weld.bootstrap.api.Service;
-import org.jboss.weld.bootstrap.api.ServiceRegistry;
-import org.jboss.weld.bootstrap.api.helpers.ServiceRegistries;
-import org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry;
-import org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl;
-import org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl;
-import org.jboss.weld.bootstrap.events.BeforeBeanDiscoveryImpl;
-import org.jboss.weld.bootstrap.events.BeforeShutdownImpl;
-import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
-import org.jboss.weld.bootstrap.spi.Deployment;
-import org.jboss.weld.context.AbstractApplicationContext;
-import org.jboss.weld.context.ApplicationContext;
-import org.jboss.weld.context.ContextLifecycle;
-import org.jboss.weld.context.ConversationContext;
-import org.jboss.weld.context.DependentContext;
-import org.jboss.weld.context.RequestContext;
-import org.jboss.weld.context.SessionContext;
-import org.jboss.weld.context.SingletonContext;
-import org.jboss.weld.context.api.BeanStore;
-import org.jboss.weld.ejb.EJBApiAbstraction;
-import org.jboss.weld.ejb.EjbDescriptors;
-import org.jboss.weld.jsf.JsfApiAbstraction;
-import org.jboss.weld.log.Log;
-import org.jboss.weld.log.Logging;
-import org.jboss.weld.metadata.TypeStore;
-import org.jboss.weld.metadata.cache.MetaAnnotationStore;
-import org.jboss.weld.persistence.PersistenceApiAbstraction;
-import org.jboss.weld.resources.ClassTransformer;
-import org.jboss.weld.resources.DefaultResourceLoader;
-import org.jboss.weld.resources.spi.ResourceLoader;
-import org.jboss.weld.servlet.ServletApiAbstraction;
-import org.jboss.weld.transaction.spi.TransactionServices;
-import org.jboss.weld.util.serviceProvider.ServiceLoader;
-import org.jboss.weld.ws.WSApiAbstraction;
-
-/**
- * Common bootstrapping functionality that is run at application startup and
- * detects and register beans
- *
- * @author Pete Muir
- */
-public class WebBeansBootstrap implements Bootstrap
-{
-
- /**
- *
- * A Deployment visitor which can find the transitive closure of Bean
- * Deployment Archives
- *
- * @author pmuir
- *
- */
- private static class DeploymentVisitor
- {
-
- private final BeanManagerImpl deploymentManager;
- private final Environment environment;
- private final Deployment deployment;
- private final ExtensionBeanDeployerEnvironment extensionBeanDeployerEnvironment;
-
- public DeploymentVisitor(BeanManagerImpl deploymentManager, Environment environment, Deployment deployment, ExtensionBeanDeployerEnvironment extensionBeanDeployerEnvironment)
- {
- this.deploymentManager = deploymentManager;
- this.environment = environment;
- this.deployment = deployment;
- this.extensionBeanDeployerEnvironment = extensionBeanDeployerEnvironment;
- }
-
- public Map<BeanDeploymentArchive, BeanDeployment> visit()
- {
- Set<BeanDeploymentArchive> seenBeanDeploymentArchives = new HashSet<BeanDeploymentArchive>();
- Map<BeanDeploymentArchive, BeanDeployment> managerAwareBeanDeploymentArchives = new HashMap<BeanDeploymentArchive, BeanDeployment>();
- for (BeanDeploymentArchive archvive : deployment.getBeanDeploymentArchives())
- {
- visit(archvive, managerAwareBeanDeploymentArchives, seenBeanDeploymentArchives);
- }
- return managerAwareBeanDeploymentArchives;
- }
-
- private BeanDeployment visit(BeanDeploymentArchive beanDeploymentArchive, Map<BeanDeploymentArchive, BeanDeployment> managerAwareBeanDeploymentArchives, Set<BeanDeploymentArchive> seenBeanDeploymentArchives)
- {
- // Check that the required services are specified
- verifyServices(beanDeploymentArchive.getServices(), environment.getRequiredBeanDeploymentArchiveServices());
-
- // Check the id is not null
- if (beanDeploymentArchive.getId() == null)
- {
- throw new IllegalArgumentException("BeanDeploymentArchive must not be null " + beanDeploymentArchive);
- }
-
- // Create the BeanDeployment and attach
- BeanDeployment parent = new BeanDeployment(beanDeploymentArchive, deploymentManager, deployment, extensionBeanDeployerEnvironment, deployment.getServices());
- managerAwareBeanDeploymentArchives.put(beanDeploymentArchive, parent);
- seenBeanDeploymentArchives.add(beanDeploymentArchive);
- for (BeanDeploymentArchive archive : beanDeploymentArchive.getBeanDeploymentArchives())
- {
- // Cut any circularties
- if (!seenBeanDeploymentArchives.contains(archive))
- {
- BeanDeployment child = visit(archive, managerAwareBeanDeploymentArchives, seenBeanDeploymentArchives);
- parent.getBeanManager().addAccessibleBeanManager(child.getBeanManager());
- }
- }
- return parent;
- }
-
- }
-
- // The log provider
- private static Log log = Logging.getLog(WebBeansBootstrap.class);
-
- static
- {
- log.info("Web Beans " + getVersion());
- }
-
- // The Web Beans manager
- private BeanManagerImpl deploymentManager;
- private Map<BeanDeploymentArchive, BeanDeployment> beanDeployments;
- private Environment environment;
- private Deployment deployment;
- private ExtensionBeanDeployerEnvironment extensionBeanDeployerEnvironment;
-
- public Bootstrap startContainer(Environment environment, Deployment deployment, BeanStore applicationBeanStore)
- {
- synchronized (this)
- {
- if (deployment == null)
- {
- throw new IllegalArgumentException("Must start the container with a deployment");
- }
- if (!deployment.getServices().contains(ResourceLoader.class))
- {
- deployment.getServices().add(ResourceLoader.class, new DefaultResourceLoader());
- }
-
- verifyServices(deployment.getServices(), environment.getRequiredDeploymentServices());
-
- if (!deployment.getServices().contains(TransactionServices.class))
- {
- log.info("Transactional services not available. Injection of @Current UserTransaction not available. Transactional observers will be invoked synchronously.");
- }
- // TODO Reinstate if we can find a good way to detect.
-// if (!deployment.getServices().contains(EjbServices.class))
-// {
-// log.info("EJB services not available. Session beans will be simple beans, CDI-style injection into non-contextual EJBs, injection of remote EJBs and injection of @EJB in simple beans will not be available");
-// }
-// if (!deployment.getServices().contains(JpaInjectionServices.class))
-// {
-// log.info("JPA services not available. Injection of @PersistenceContext will not occur. Entity beans will be discovered as simple beans.");
-// }
-// if (!deployment.getServices().contains(ResourceInjectionServices.class))
-// {
-// log.info("@Resource injection not available.");
-// }
- if (applicationBeanStore == null)
- {
- throw new IllegalStateException("No application context BeanStore set");
- }
-
- this.deployment = deployment;
- ServiceRegistry implementationServices = getImplementationServices(deployment.getServices().get(ResourceLoader.class));
-
- deployment.getServices().addAll(implementationServices.entrySet());
-
- ServiceRegistry deploymentServices = new SimpleServiceRegistry();
- deploymentServices.add(ClassTransformer.class, implementationServices.get(ClassTransformer.class));
- deploymentServices.add(MetaAnnotationStore.class, implementationServices.get(MetaAnnotationStore.class));
- deploymentServices.add(TypeStore.class, implementationServices.get(TypeStore.class));
-
- this.environment = environment;
- this.deploymentManager = BeanManagerImpl.newRootManager("deployment", deploymentServices);
-
- Container.initialize(deploymentManager, ServiceRegistries.unmodifiableServiceRegistry(deployment.getServices()));
-
- createContexts();
- initializeContexts();
- // Start the application context
- Container.instance().deploymentServices().get(ContextLifecycle.class).beginApplication(applicationBeanStore);
-
- this.extensionBeanDeployerEnvironment = new ExtensionBeanDeployerEnvironment(EjbDescriptors.EMPTY, deploymentManager);
-
- DeploymentVisitor deploymentVisitor = new DeploymentVisitor(deploymentManager, environment, deployment, extensionBeanDeployerEnvironment);
- beanDeployments = deploymentVisitor.visit();
-
- return this;
- }
- }
-
- private ServiceRegistry getImplementationServices(ResourceLoader resourceLoader)
- {
- ServiceRegistry services = new SimpleServiceRegistry();
- services.add(EJBApiAbstraction.class, new EJBApiAbstraction(resourceLoader));
- services.add(JsfApiAbstraction.class, new JsfApiAbstraction(resourceLoader));
- services.add(PersistenceApiAbstraction.class, new PersistenceApiAbstraction(resourceLoader));
- services.add(WSApiAbstraction.class, new WSApiAbstraction(resourceLoader));
- services.add(ServletApiAbstraction.class, new ServletApiAbstraction(resourceLoader));
- // Temporary workaround to provide context for building annotated class
- // TODO expose AnnotatedClass on SPI and allow container to provide impl of this via ResourceLoader
- services.add(Validator.class, new Validator());
- services.add(TypeStore.class, new TypeStore());
- services.add(ClassTransformer.class, new ClassTransformer(services.get(TypeStore.class)));
- services.add(MetaAnnotationStore.class, new MetaAnnotationStore(services.get(ClassTransformer.class)));
- services.add(ContextualStore.class, new ContextualStore());
- return services;
- }
-
- public BeanManagerImpl getManager(BeanDeploymentArchive beanDeploymentArchive)
- {
- if (beanDeployments.containsKey(beanDeploymentArchive))
- {
- return beanDeployments.get(beanDeploymentArchive).getBeanManager();
- }
- else
- {
- return null;
- }
- }
-
- public Bootstrap startInitialization()
- {
- synchronized (this)
- {
- if (deploymentManager == null)
- {
- throw new IllegalStateException("Manager has not been initialized");
- }
-
- ExtensionBeanDeployer extensionBeanDeployer = new ExtensionBeanDeployer(deploymentManager, extensionBeanDeployerEnvironment);
- extensionBeanDeployer.addExtensions(ServiceLoader.load(Extension.class));
- extensionBeanDeployer.createBeans().deploy();
-
- // Add the Deployment BeanManager Bean to the Deployment BeanManager
- deploymentManager.addBean(new ManagerBean(deploymentManager));
-
- fireBeforeBeanDiscoveryEvent();
- }
- return this;
- }
-
- public Bootstrap deployBeans()
- {
- synchronized (this)
- {
- for (Entry<BeanDeploymentArchive, BeanDeployment> entry : beanDeployments.entrySet())
- {
- entry.getValue().deployBeans(environment);
- }
- fireAfterBeanDiscoveryEvent();
- log.debug("Web Beans initialized. Validating beans.");
- }
- return this;
- }
-
- public Bootstrap validateBeans()
- {
- synchronized (this)
- {
- for (Entry<BeanDeploymentArchive, BeanDeployment> entry : beanDeployments.entrySet())
- {
- deployment.getServices().get(Validator.class).validateDeployment(entry.getValue().getBeanManager(), entry.getValue().getBeanDeployer().getEnvironment());
- }
- fireAfterDeploymentValidationEvent();
- }
- return this;
- }
-
- public Bootstrap endInitialization()
- {
- synchronized (this)
- {
- // Register the managers so external requests can handle them
- Container.instance().putBeanDeployments(beanDeployments);
- Container.instance().setInitialized(true);
- }
- return this;
- }
-
- private void fireBeforeBeanDiscoveryEvent()
- {
- BeforeBeanDiscovery event = new BeforeBeanDiscoveryImpl(deploymentManager, deployment, beanDeployments, extensionBeanDeployerEnvironment);
- try
- {
- deploymentManager.fireEvent(event);
- }
- catch (Exception e)
- {
- throw new DefinitionException(e);
- }
- }
-
- private void fireBeforeShutdownEvent()
- {
- BeforeShutdown event = new BeforeShutdownImpl();
- try
- {
- deploymentManager.fireEvent(event);
- }
- catch (Exception e)
- {
- throw new DeploymentException(e);
- }
- }
-
- private void fireAfterBeanDiscoveryEvent()
- {
- AfterBeanDiscoveryImpl event = new AfterBeanDiscoveryImpl(deploymentManager, deployment, beanDeployments, extensionBeanDeployerEnvironment);
- try
- {
- deploymentManager.fireEvent(event);
- }
- catch (Exception e)
- {
- event.addDefinitionError(e);
- }
-
- if (event.getDefinitionErrors().size() > 0)
- {
- // FIXME communicate all the captured definition errors in this exception
- throw new DefinitionException(event.getDefinitionErrors().get(0));
- }
- }
-
- private void fireAfterDeploymentValidationEvent()
- {
- AfterDeploymentValidationImpl event = new AfterDeploymentValidationImpl();
-
- try
- {
- deploymentManager.fireEvent(event);
- }
- catch (Exception e)
- {
- event.addDeploymentProblem(e);
- }
-
- if (event.getDeploymentProblems().size() > 0)
- {
- // FIXME communicate all the captured deployment problems in this exception
- throw new DeploymentException(event.getDeploymentProblems().get(0));
- }
- }
-
- /**
- * Gets version information
- *
- * @return The implementation version from the Bootstrap class package.
- */
- public static String getVersion()
- {
- Package pkg = WebBeansBootstrap.class.getPackage();
- return pkg != null ? pkg.getImplementationVersion() : null;
- }
-
- protected void initializeContexts()
- {
- Lifecycle lifecycle = deployment.getServices().get(ContextLifecycle.class);
- deploymentManager.addContext(lifecycle.getDependentContext());
- deploymentManager.addContext(lifecycle.getRequestContext());
- deploymentManager.addContext(lifecycle.getConversationContext());
- deploymentManager.addContext(lifecycle.getSessionContext());
- deploymentManager.addContext(lifecycle.getApplicationContext());
- deploymentManager.addContext(lifecycle.getSingletonContext());
- }
-
- protected void createContexts()
- {
- AbstractApplicationContext applicationContext = new ApplicationContext();
- AbstractApplicationContext singletonContext = new SingletonContext();
- SessionContext sessionContext = new SessionContext();
- ConversationContext conversationContext = new ConversationContext();
- RequestContext requestContext = new RequestContext();
- DependentContext dependentContext = new DependentContext();
-
- deployment.getServices().add(ContextLifecycle.class, new ContextLifecycle(applicationContext, singletonContext, sessionContext, conversationContext, requestContext, dependentContext));
- }
-
- public void shutdown()
- {
- try
- {
- fireBeforeShutdownEvent();
- }
- finally
- {
- Container.instance().deploymentServices().get(ContextLifecycle.class).endApplication();
- }
- }
-
- protected static void verifyServices(ServiceRegistry services, Set<Class<? extends Service>> requiredServices)
- {
- for (Class<? extends Service> serviceType : requiredServices)
- {
- if (!services.contains(serviceType))
- {
- throw new IllegalStateException("Required service " + serviceType.getName() + " has not been specified");
- }
- }
- }
-
-}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WebBeansBootstrap.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bootstrap/WeldBootstrap.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -0,0 +1,439 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.bootstrap;
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Map;
+import java.util.Set;
+import java.util.Map.Entry;
+
+import javax.enterprise.inject.spi.BeforeBeanDiscovery;
+import javax.enterprise.inject.spi.BeforeShutdown;
+import javax.enterprise.inject.spi.Extension;
+
+import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.Container;
+import org.jboss.weld.ContextualStore;
+import org.jboss.weld.DefinitionException;
+import org.jboss.weld.DeploymentException;
+import org.jboss.weld.Validator;
+import org.jboss.weld.bean.builtin.ManagerBean;
+import org.jboss.weld.bootstrap.api.Bootstrap;
+import org.jboss.weld.bootstrap.api.Environment;
+import org.jboss.weld.bootstrap.api.Lifecycle;
+import org.jboss.weld.bootstrap.api.Service;
+import org.jboss.weld.bootstrap.api.ServiceRegistry;
+import org.jboss.weld.bootstrap.api.helpers.ServiceRegistries;
+import org.jboss.weld.bootstrap.api.helpers.SimpleServiceRegistry;
+import org.jboss.weld.bootstrap.events.AfterBeanDiscoveryImpl;
+import org.jboss.weld.bootstrap.events.AfterDeploymentValidationImpl;
+import org.jboss.weld.bootstrap.events.BeforeBeanDiscoveryImpl;
+import org.jboss.weld.bootstrap.events.BeforeShutdownImpl;
+import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
+import org.jboss.weld.bootstrap.spi.Deployment;
+import org.jboss.weld.context.AbstractApplicationContext;
+import org.jboss.weld.context.ApplicationContext;
+import org.jboss.weld.context.ContextLifecycle;
+import org.jboss.weld.context.ConversationContext;
+import org.jboss.weld.context.DependentContext;
+import org.jboss.weld.context.RequestContext;
+import org.jboss.weld.context.SessionContext;
+import org.jboss.weld.context.SingletonContext;
+import org.jboss.weld.context.api.BeanStore;
+import org.jboss.weld.ejb.EJBApiAbstraction;
+import org.jboss.weld.ejb.EjbDescriptors;
+import org.jboss.weld.jsf.JsfApiAbstraction;
+import org.jboss.weld.log.Log;
+import org.jboss.weld.log.Logging;
+import org.jboss.weld.metadata.TypeStore;
+import org.jboss.weld.metadata.cache.MetaAnnotationStore;
+import org.jboss.weld.persistence.PersistenceApiAbstraction;
+import org.jboss.weld.resources.ClassTransformer;
+import org.jboss.weld.resources.DefaultResourceLoader;
+import org.jboss.weld.resources.spi.ResourceLoader;
+import org.jboss.weld.servlet.ServletApiAbstraction;
+import org.jboss.weld.transaction.spi.TransactionServices;
+import org.jboss.weld.util.serviceProvider.ServiceLoader;
+import org.jboss.weld.ws.WSApiAbstraction;
+
+/**
+ * Common bootstrapping functionality that is run at application startup and
+ * detects and register beans
+ *
+ * @author Pete Muir
+ */
+public class WeldBootstrap implements Bootstrap
+{
+
+ /**
+ *
+ * A Deployment visitor which can find the transitive closure of Bean
+ * Deployment Archives
+ *
+ * @author pmuir
+ *
+ */
+ private static class DeploymentVisitor
+ {
+
+ private final BeanManagerImpl deploymentManager;
+ private final Environment environment;
+ private final Deployment deployment;
+ private final ExtensionBeanDeployerEnvironment extensionBeanDeployerEnvironment;
+
+ public DeploymentVisitor(BeanManagerImpl deploymentManager, Environment environment, Deployment deployment, ExtensionBeanDeployerEnvironment extensionBeanDeployerEnvironment)
+ {
+ this.deploymentManager = deploymentManager;
+ this.environment = environment;
+ this.deployment = deployment;
+ this.extensionBeanDeployerEnvironment = extensionBeanDeployerEnvironment;
+ }
+
+ public Map<BeanDeploymentArchive, BeanDeployment> visit()
+ {
+ Set<BeanDeploymentArchive> seenBeanDeploymentArchives = new HashSet<BeanDeploymentArchive>();
+ Map<BeanDeploymentArchive, BeanDeployment> managerAwareBeanDeploymentArchives = new HashMap<BeanDeploymentArchive, BeanDeployment>();
+ for (BeanDeploymentArchive archvive : deployment.getBeanDeploymentArchives())
+ {
+ visit(archvive, managerAwareBeanDeploymentArchives, seenBeanDeploymentArchives);
+ }
+ return managerAwareBeanDeploymentArchives;
+ }
+
+ private BeanDeployment visit(BeanDeploymentArchive beanDeploymentArchive, Map<BeanDeploymentArchive, BeanDeployment> managerAwareBeanDeploymentArchives, Set<BeanDeploymentArchive> seenBeanDeploymentArchives)
+ {
+ // Check that the required services are specified
+ verifyServices(beanDeploymentArchive.getServices(), environment.getRequiredBeanDeploymentArchiveServices());
+
+ // Check the id is not null
+ if (beanDeploymentArchive.getId() == null)
+ {
+ throw new IllegalArgumentException("BeanDeploymentArchive must not be null " + beanDeploymentArchive);
+ }
+
+ // Create the BeanDeployment and attach
+ BeanDeployment parent = new BeanDeployment(beanDeploymentArchive, deploymentManager, deployment, extensionBeanDeployerEnvironment, deployment.getServices());
+ managerAwareBeanDeploymentArchives.put(beanDeploymentArchive, parent);
+ seenBeanDeploymentArchives.add(beanDeploymentArchive);
+ for (BeanDeploymentArchive archive : beanDeploymentArchive.getBeanDeploymentArchives())
+ {
+ // Cut any circularties
+ if (!seenBeanDeploymentArchives.contains(archive))
+ {
+ BeanDeployment child = visit(archive, managerAwareBeanDeploymentArchives, seenBeanDeploymentArchives);
+ parent.getBeanManager().addAccessibleBeanManager(child.getBeanManager());
+ }
+ }
+ return parent;
+ }
+
+ }
+
+ // The log provider
+ private static Log log = Logging.getLog(WeldBootstrap.class);
+
+ static
+ {
+ log.info("Web Beans " + getVersion());
+ }
+
+ // The Web Beans manager
+ private BeanManagerImpl deploymentManager;
+ private Map<BeanDeploymentArchive, BeanDeployment> beanDeployments;
+ private Environment environment;
+ private Deployment deployment;
+ private ExtensionBeanDeployerEnvironment extensionBeanDeployerEnvironment;
+
+ public Bootstrap startContainer(Environment environment, Deployment deployment, BeanStore applicationBeanStore)
+ {
+ synchronized (this)
+ {
+ if (deployment == null)
+ {
+ throw new IllegalArgumentException("Must start the container with a deployment");
+ }
+ if (!deployment.getServices().contains(ResourceLoader.class))
+ {
+ deployment.getServices().add(ResourceLoader.class, new DefaultResourceLoader());
+ }
+
+ verifyServices(deployment.getServices(), environment.getRequiredDeploymentServices());
+
+ if (!deployment.getServices().contains(TransactionServices.class))
+ {
+ log.info("Transactional services not available. Injection of @Current UserTransaction not available. Transactional observers will be invoked synchronously.");
+ }
+ // TODO Reinstate if we can find a good way to detect.
+// if (!deployment.getServices().contains(EjbServices.class))
+// {
+// log.info("EJB services not available. Session beans will be simple beans, CDI-style injection into non-contextual EJBs, injection of remote EJBs and injection of @EJB in simple beans will not be available");
+// }
+// if (!deployment.getServices().contains(JpaInjectionServices.class))
+// {
+// log.info("JPA services not available. Injection of @PersistenceContext will not occur. Entity beans will be discovered as simple beans.");
+// }
+// if (!deployment.getServices().contains(ResourceInjectionServices.class))
+// {
+// log.info("@Resource injection not available.");
+// }
+ if (applicationBeanStore == null)
+ {
+ throw new IllegalStateException("No application context BeanStore set");
+ }
+
+ this.deployment = deployment;
+ ServiceRegistry implementationServices = getImplementationServices(deployment.getServices().get(ResourceLoader.class));
+
+ deployment.getServices().addAll(implementationServices.entrySet());
+
+ ServiceRegistry deploymentServices = new SimpleServiceRegistry();
+ deploymentServices.add(ClassTransformer.class, implementationServices.get(ClassTransformer.class));
+ deploymentServices.add(MetaAnnotationStore.class, implementationServices.get(MetaAnnotationStore.class));
+ deploymentServices.add(TypeStore.class, implementationServices.get(TypeStore.class));
+
+ this.environment = environment;
+ this.deploymentManager = BeanManagerImpl.newRootManager("deployment", deploymentServices);
+
+ Container.initialize(deploymentManager, ServiceRegistries.unmodifiableServiceRegistry(deployment.getServices()));
+
+ createContexts();
+ initializeContexts();
+ // Start the application context
+ Container.instance().deploymentServices().get(ContextLifecycle.class).beginApplication(applicationBeanStore);
+
+ this.extensionBeanDeployerEnvironment = new ExtensionBeanDeployerEnvironment(EjbDescriptors.EMPTY, deploymentManager);
+
+ DeploymentVisitor deploymentVisitor = new DeploymentVisitor(deploymentManager, environment, deployment, extensionBeanDeployerEnvironment);
+ beanDeployments = deploymentVisitor.visit();
+
+ return this;
+ }
+ }
+
+ private ServiceRegistry getImplementationServices(ResourceLoader resourceLoader)
+ {
+ ServiceRegistry services = new SimpleServiceRegistry();
+ services.add(EJBApiAbstraction.class, new EJBApiAbstraction(resourceLoader));
+ services.add(JsfApiAbstraction.class, new JsfApiAbstraction(resourceLoader));
+ services.add(PersistenceApiAbstraction.class, new PersistenceApiAbstraction(resourceLoader));
+ services.add(WSApiAbstraction.class, new WSApiAbstraction(resourceLoader));
+ services.add(ServletApiAbstraction.class, new ServletApiAbstraction(resourceLoader));
+ // Temporary workaround to provide context for building annotated class
+ // TODO expose AnnotatedClass on SPI and allow container to provide impl of this via ResourceLoader
+ services.add(Validator.class, new Validator());
+ services.add(TypeStore.class, new TypeStore());
+ services.add(ClassTransformer.class, new ClassTransformer(services.get(TypeStore.class)));
+ services.add(MetaAnnotationStore.class, new MetaAnnotationStore(services.get(ClassTransformer.class)));
+ services.add(ContextualStore.class, new ContextualStore());
+ return services;
+ }
+
+ public BeanManagerImpl getManager(BeanDeploymentArchive beanDeploymentArchive)
+ {
+ if (beanDeployments.containsKey(beanDeploymentArchive))
+ {
+ return beanDeployments.get(beanDeploymentArchive).getBeanManager();
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ public Bootstrap startInitialization()
+ {
+ synchronized (this)
+ {
+ if (deploymentManager == null)
+ {
+ throw new IllegalStateException("Manager has not been initialized");
+ }
+
+ ExtensionBeanDeployer extensionBeanDeployer = new ExtensionBeanDeployer(deploymentManager, extensionBeanDeployerEnvironment);
+ extensionBeanDeployer.addExtensions(ServiceLoader.load(Extension.class));
+ extensionBeanDeployer.createBeans().deploy();
+
+ // Add the Deployment BeanManager Bean to the Deployment BeanManager
+ deploymentManager.addBean(new ManagerBean(deploymentManager));
+
+ fireBeforeBeanDiscoveryEvent();
+ }
+ return this;
+ }
+
+ public Bootstrap deployBeans()
+ {
+ synchronized (this)
+ {
+ for (Entry<BeanDeploymentArchive, BeanDeployment> entry : beanDeployments.entrySet())
+ {
+ entry.getValue().deployBeans(environment);
+ }
+ fireAfterBeanDiscoveryEvent();
+ log.debug("Web Beans initialized. Validating beans.");
+ }
+ return this;
+ }
+
+ public Bootstrap validateBeans()
+ {
+ synchronized (this)
+ {
+ for (Entry<BeanDeploymentArchive, BeanDeployment> entry : beanDeployments.entrySet())
+ {
+ deployment.getServices().get(Validator.class).validateDeployment(entry.getValue().getBeanManager(), entry.getValue().getBeanDeployer().getEnvironment());
+ }
+ fireAfterDeploymentValidationEvent();
+ }
+ return this;
+ }
+
+ public Bootstrap endInitialization()
+ {
+ synchronized (this)
+ {
+ // Register the managers so external requests can handle them
+ Container.instance().putBeanDeployments(beanDeployments);
+ Container.instance().setInitialized(true);
+ }
+ return this;
+ }
+
+ private void fireBeforeBeanDiscoveryEvent()
+ {
+ BeforeBeanDiscovery event = new BeforeBeanDiscoveryImpl(deploymentManager, deployment, beanDeployments, extensionBeanDeployerEnvironment);
+ try
+ {
+ deploymentManager.fireEvent(event);
+ }
+ catch (Exception e)
+ {
+ throw new DefinitionException(e);
+ }
+ }
+
+ private void fireBeforeShutdownEvent()
+ {
+ BeforeShutdown event = new BeforeShutdownImpl();
+ try
+ {
+ deploymentManager.fireEvent(event);
+ }
+ catch (Exception e)
+ {
+ throw new DeploymentException(e);
+ }
+ }
+
+ private void fireAfterBeanDiscoveryEvent()
+ {
+ AfterBeanDiscoveryImpl event = new AfterBeanDiscoveryImpl(deploymentManager, deployment, beanDeployments, extensionBeanDeployerEnvironment);
+ try
+ {
+ deploymentManager.fireEvent(event);
+ }
+ catch (Exception e)
+ {
+ event.addDefinitionError(e);
+ }
+
+ if (event.getDefinitionErrors().size() > 0)
+ {
+ // FIXME communicate all the captured definition errors in this exception
+ throw new DefinitionException(event.getDefinitionErrors().get(0));
+ }
+ }
+
+ private void fireAfterDeploymentValidationEvent()
+ {
+ AfterDeploymentValidationImpl event = new AfterDeploymentValidationImpl();
+
+ try
+ {
+ deploymentManager.fireEvent(event);
+ }
+ catch (Exception e)
+ {
+ event.addDeploymentProblem(e);
+ }
+
+ if (event.getDeploymentProblems().size() > 0)
+ {
+ // FIXME communicate all the captured deployment problems in this exception
+ throw new DeploymentException(event.getDeploymentProblems().get(0));
+ }
+ }
+
+ /**
+ * Gets version information
+ *
+ * @return The implementation version from the Bootstrap class package.
+ */
+ public static String getVersion()
+ {
+ Package pkg = WeldBootstrap.class.getPackage();
+ return pkg != null ? pkg.getImplementationVersion() : null;
+ }
+
+ protected void initializeContexts()
+ {
+ Lifecycle lifecycle = deployment.getServices().get(ContextLifecycle.class);
+ deploymentManager.addContext(lifecycle.getDependentContext());
+ deploymentManager.addContext(lifecycle.getRequestContext());
+ deploymentManager.addContext(lifecycle.getConversationContext());
+ deploymentManager.addContext(lifecycle.getSessionContext());
+ deploymentManager.addContext(lifecycle.getApplicationContext());
+ deploymentManager.addContext(lifecycle.getSingletonContext());
+ }
+
+ protected void createContexts()
+ {
+ AbstractApplicationContext applicationContext = new ApplicationContext();
+ AbstractApplicationContext singletonContext = new SingletonContext();
+ SessionContext sessionContext = new SessionContext();
+ ConversationContext conversationContext = new ConversationContext();
+ RequestContext requestContext = new RequestContext();
+ DependentContext dependentContext = new DependentContext();
+
+ deployment.getServices().add(ContextLifecycle.class, new ContextLifecycle(applicationContext, singletonContext, sessionContext, conversationContext, requestContext, dependentContext));
+ }
+
+ public void shutdown()
+ {
+ try
+ {
+ fireBeforeShutdownEvent();
+ }
+ finally
+ {
+ Container.instance().deploymentServices().get(ContextLifecycle.class).endApplication();
+ }
+ }
+
+ protected static void verifyServices(ServiceRegistry services, Set<Class<? extends Service>> requiredServices)
+ {
+ for (Class<? extends Service> serviceType : requiredServices)
+ {
+ if (!services.contains(serviceType))
+ {
+ throw new IllegalStateException("Required service " + serviceType.getName() + " has not been specified");
+ }
+ }
+ }
+
+}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/el/AbstractWebBeansELResolver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/el/AbstractWebBeansELResolver.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/el/AbstractWebBeansELResolver.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,143 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.el;
-
-import static org.jboss.weld.el.ELCreationalContextStack.getCreationalContextStore;
-
-import java.beans.FeatureDescriptor;
-import java.util.Iterator;
-import java.util.concurrent.Callable;
-
-import javax.el.ELContext;
-import javax.el.ELResolver;
-import javax.enterprise.inject.spi.Bean;
-
-import org.jboss.weld.BeanManagerImpl;
-
-/**
- * An EL-resolver against the named beans
- *
- * @author Pete Muir
- */
-public abstract class AbstractWebBeansELResolver extends ELResolver
-{
-
- protected abstract BeanManagerImpl getManager(ELContext context);
-
- @Override
- public Class<?> getCommonPropertyType(ELContext context, Object base)
- {
- return null;
- }
-
- @Override
- public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base)
- {
- return null;
- }
-
- @Override
- public Class<?> getType(ELContext context, Object base, Object property)
- {
- return null;
- }
-
- @Override
- public Object getValue(final ELContext context, Object base, Object property)
- {
- if (property != null)
- {
- String propertyString = property.toString();
- Namespace namespace = null;
- if (base == null)
- {
- if (getManager(context).getRootNamespace().contains(propertyString))
- {
- context.setPropertyResolved(true);
- return getManager(context).getRootNamespace().get(propertyString);
- }
- }
- else if (base instanceof Namespace)
- {
- namespace = (Namespace) base;
- // We're definitely the responsible party
- context.setPropertyResolved(true);
- if (namespace.contains(propertyString))
- {
- // There is a child namespace
- return namespace.get(propertyString);
- }
- }
- else
- {
- // let the standard EL resolver chain handle the property
- return null;
- }
- final String name;
- if (namespace != null)
- {
- // Try looking in the manager for a bean
- name = namespace.qualifyName(propertyString);
- }
- else
- {
- name = propertyString;
- }
- Object value = null;
- try
- {
- final Bean<?> bean = getManager(context).resolve(getManager(context).getBeans(name));
- final ELCreationalContext<?> creationalContext = getCreationalContextStore(context).peek();
- if (bean != null)
- {
- value = creationalContext.putIfAbsent(bean, new Callable<Object>()
- {
-
- public Object call() throws Exception
- {
- return getManager(context).getReference(bean, creationalContext);
- }
-
- });
- }
- }
- catch (Exception e)
- {
- throw new RuntimeException("Error resolving property " + propertyString + " against base " + base, e);
- }
- if (value != null)
- {
- context.setPropertyResolved(true);
- return value;
- }
- }
- return null;
- }
-
- @Override
- public boolean isReadOnly(ELContext context, Object base, Object property)
- {
- return false;
- }
-
- @Override
- public void setValue(ELContext context, Object base, Object property, Object value)
- {
- }
-
-}
-
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/el/AbstractWeldELResolver.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/el/AbstractWebBeansELResolver.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/el/AbstractWeldELResolver.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/el/AbstractWeldELResolver.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -0,0 +1,143 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.el;
+
+import static org.jboss.weld.el.ELCreationalContextStack.getCreationalContextStore;
+
+import java.beans.FeatureDescriptor;
+import java.util.Iterator;
+import java.util.concurrent.Callable;
+
+import javax.el.ELContext;
+import javax.el.ELResolver;
+import javax.enterprise.inject.spi.Bean;
+
+import org.jboss.weld.BeanManagerImpl;
+
+/**
+ * An EL-resolver against the named beans
+ *
+ * @author Pete Muir
+ */
+public abstract class AbstractWeldELResolver extends ELResolver
+{
+
+ protected abstract BeanManagerImpl getManager(ELContext context);
+
+ @Override
+ public Class<?> getCommonPropertyType(ELContext context, Object base)
+ {
+ return null;
+ }
+
+ @Override
+ public Iterator<FeatureDescriptor> getFeatureDescriptors(ELContext context, Object base)
+ {
+ return null;
+ }
+
+ @Override
+ public Class<?> getType(ELContext context, Object base, Object property)
+ {
+ return null;
+ }
+
+ @Override
+ public Object getValue(final ELContext context, Object base, Object property)
+ {
+ if (property != null)
+ {
+ String propertyString = property.toString();
+ Namespace namespace = null;
+ if (base == null)
+ {
+ if (getManager(context).getRootNamespace().contains(propertyString))
+ {
+ context.setPropertyResolved(true);
+ return getManager(context).getRootNamespace().get(propertyString);
+ }
+ }
+ else if (base instanceof Namespace)
+ {
+ namespace = (Namespace) base;
+ // We're definitely the responsible party
+ context.setPropertyResolved(true);
+ if (namespace.contains(propertyString))
+ {
+ // There is a child namespace
+ return namespace.get(propertyString);
+ }
+ }
+ else
+ {
+ // let the standard EL resolver chain handle the property
+ return null;
+ }
+ final String name;
+ if (namespace != null)
+ {
+ // Try looking in the manager for a bean
+ name = namespace.qualifyName(propertyString);
+ }
+ else
+ {
+ name = propertyString;
+ }
+ Object value = null;
+ try
+ {
+ final Bean<?> bean = getManager(context).resolve(getManager(context).getBeans(name));
+ final ELCreationalContext<?> creationalContext = getCreationalContextStore(context).peek();
+ if (bean != null)
+ {
+ value = creationalContext.putIfAbsent(bean, new Callable<Object>()
+ {
+
+ public Object call() throws Exception
+ {
+ return getManager(context).getReference(bean, creationalContext);
+ }
+
+ });
+ }
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Error resolving property " + propertyString + " against base " + base, e);
+ }
+ if (value != null)
+ {
+ context.setPropertyResolved(true);
+ return value;
+ }
+ }
+ return null;
+ }
+
+ @Override
+ public boolean isReadOnly(ELContext context, Object base, Object property)
+ {
+ return false;
+ }
+
+ @Override
+ public void setValue(ELContext context, Object base, Object property, Object value)
+ {
+ }
+
+}
+
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansELContextListener.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansELContextListener.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansELContextListener.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.el;
-
-import javax.el.ELContextEvent;
-import javax.el.ELContextListener;
-
-/**
- * Responsible for pushing the CreationalContext stack into the ELContext which
- * is later populated by our expression wrappers
- *
- * @author pmuir
- *
- */
-public class WebBeansELContextListener implements ELContextListener
-{
-
- public void contextCreated(ELContextEvent contextEvent)
- {
- ELCreationalContextStack.addToContext(contextEvent.getELContext());
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansELResolver.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansELResolver.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansELResolver.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,43 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.el;
-
-import javax.el.ELContext;
-
-import org.jboss.weld.BeanManagerImpl;
-
-/**
- * @author pmuir
- *
- */
-public class WebBeansELResolver extends AbstractWebBeansELResolver
-{
-
- private final BeanManagerImpl beanManager;
-
- public WebBeansELResolver(BeanManagerImpl beanManager)
- {
- this.beanManager = beanManager;
- }
-
- @Override
- protected BeanManagerImpl getManager(ELContext context)
- {
- return beanManager;
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansExpressionFactory.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansExpressionFactory.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansExpressionFactory.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,64 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.el;
-
-import javax.el.ELContext;
-import javax.el.ExpressionFactory;
-import javax.el.MethodExpression;
-import javax.el.ValueExpression;
-
-import org.jboss.weld.util.el.ForwardingExpressionFactory;
-
-/**
- * @author pmuir
- *
- */
-public class WebBeansExpressionFactory extends ForwardingExpressionFactory
-{
-
- private final ExpressionFactory delegate;
-
- public WebBeansExpressionFactory(ExpressionFactory expressionFactory)
- {
- if (expressionFactory == null)
- {
- throw new IllegalArgumentException("Cannot pass null expressionFactory");
- }
- this.delegate = expressionFactory;
- }
-
- @Override
- protected ExpressionFactory delegate()
- {
- return delegate;
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public ValueExpression createValueExpression(ELContext context, String expression, Class expectedType)
- {
- return new WebBeansValueExpression(super.createValueExpression(context, expression, expectedType));
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public MethodExpression createMethodExpression(ELContext context, String expression, Class expectedReturnType, Class[] expectedParamTypes)
- {
- return new WebBeansMethodExpression(super.createMethodExpression(context, expression, expectedReturnType, expectedParamTypes));
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansMethodExpression.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansMethodExpression.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansMethodExpression.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,98 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.el;
-
-import static org.jboss.weld.el.ELCreationalContextStack.getCreationalContextStore;
-
-import javax.el.ELContext;
-import javax.el.MethodExpression;
-import javax.el.MethodInfo;
-import javax.enterprise.context.spi.Contextual;
-import javax.enterprise.context.spi.CreationalContext;
-
-import org.jboss.weld.Container;
-import org.jboss.weld.util.el.ForwardingMethodExpression;
-
-/**
- * @author pmuir
- *
- */
-public class WebBeansMethodExpression extends ForwardingMethodExpression
-{
-
- private static final long serialVersionUID = 7070020110515571744L;
-
- private static final Contextual<?> CONTEXTUAL = new Contextual<Object>()
- {
-
- public Object create(CreationalContext<Object> creationalContext)
- {
- return null;
- }
-
- public void destroy(Object instance, CreationalContext<Object> creationalContext) {}
-
- };
-
- private final MethodExpression delegate;
-
- public WebBeansMethodExpression(MethodExpression delegate)
- {
- this.delegate = delegate;
- }
-
- @Override
- protected MethodExpression delegate()
- {
- return delegate;
- }
-
- @Override
- public Object invoke(ELContext context, Object[] params)
- {
- // TODO need to use correct manager for module
- ELCreationalContext<?> creationalContext = ELCreationalContext.of(Container.instance().deploymentManager().createCreationalContext(CONTEXTUAL));
- try
- {
- getCreationalContextStore(context).push(creationalContext);
- return super.invoke(context, params);
- }
- finally
- {
- getCreationalContextStore(context).pop();
- creationalContext.release();
- }
- }
-
- @Override
- public MethodInfo getMethodInfo(ELContext context)
- {
- // TODO need to use correct manager for module
- ELCreationalContext<?> creationalContext = ELCreationalContext.of(Container.instance().deploymentManager().createCreationalContext(CONTEXTUAL));
- try
- {
- getCreationalContextStore(context).push(creationalContext);
- return super.getMethodInfo(context);
- }
- finally
- {
- getCreationalContextStore(context).pop();
- creationalContext.release();
- }
- }
-
-}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansValueExpression.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansValueExpression.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansValueExpression.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,115 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.el;
-
-import static org.jboss.weld.el.ELCreationalContextStack.getCreationalContextStore;
-
-import javax.el.ELContext;
-import javax.el.ValueExpression;
-import javax.enterprise.context.spi.Contextual;
-import javax.enterprise.context.spi.CreationalContext;
-
-import org.jboss.weld.Container;
-import org.jboss.weld.util.el.ForwardingValueExpression;
-
-/**
- * @author pmuir
- *
- */
-public class WebBeansValueExpression extends ForwardingValueExpression
-{
-
- private static final long serialVersionUID = 1122137212009930853L;
-
- private static final Contextual<?> CONTEXTUAL = new Contextual<Object>()
- {
-
- public Object create(CreationalContext<Object> creationalContext)
- {
- return null;
- }
-
- public void destroy(Object instance, CreationalContext<Object> creationalContext) {}
-
- };
-
- private final ValueExpression delegate;
-
- public WebBeansValueExpression(ValueExpression delegate)
- {
- this.delegate = delegate;
- }
-
- @Override
- protected ValueExpression delegate()
- {
- return delegate;
- }
-
- @Override
- public Object getValue(final ELContext context)
- {
- // TODO need to use correct manager for module
- ELCreationalContext<?> creationalContext = ELCreationalContext.of(Container.instance().deploymentManager().createCreationalContext(CONTEXTUAL));
- try
- {
- getCreationalContextStore(context).push(creationalContext);
- return delegate().getValue(context);
- }
- finally
- {
- getCreationalContextStore(context).pop();
- creationalContext.release();
- }
- }
-
- @Override
- public void setValue(ELContext context, Object value)
- {
- // TODO need to use correct manager for module
- ELCreationalContext<?> creationalContext = ELCreationalContext.of(Container.instance().deploymentManager().createCreationalContext(CONTEXTUAL));
- try
- {
- getCreationalContextStore(context).push(creationalContext);
- delegate().setValue(context, value);
- }
- finally
- {
- getCreationalContextStore(context).pop();
- creationalContext.release();
- }
- }
-
- @SuppressWarnings("unchecked")
- @Override
- public Class getType(ELContext context)
- {
- // TODO need to use correct manager for module
- ELCreationalContext<?> creationalContext = ELCreationalContext.of(Container.instance().deploymentManager().createCreationalContext(CONTEXTUAL));
- try
- {
- getCreationalContextStore(context).push(creationalContext);
- return delegate().getType(context);
- }
- finally
- {
- getCreationalContextStore(context).pop();
- creationalContext.release();
- }
- }
-
-}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldELContextListener.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansELContextListener.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldELContextListener.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldELContextListener.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.el;
+
+import javax.el.ELContextEvent;
+import javax.el.ELContextListener;
+
+/**
+ * Responsible for pushing the CreationalContext stack into the ELContext which
+ * is later populated by our expression wrappers
+ *
+ * @author pmuir
+ *
+ */
+public class WeldELContextListener implements ELContextListener
+{
+
+ public void contextCreated(ELContextEvent contextEvent)
+ {
+ ELCreationalContextStack.addToContext(contextEvent.getELContext());
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldELResolver.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansELResolver.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldELResolver.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldELResolver.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.el;
+
+import javax.el.ELContext;
+
+import org.jboss.weld.BeanManagerImpl;
+
+/**
+ * @author pmuir
+ *
+ */
+public class WeldELResolver extends AbstractWeldELResolver
+{
+
+ private final BeanManagerImpl beanManager;
+
+ public WeldELResolver(BeanManagerImpl beanManager)
+ {
+ this.beanManager = beanManager;
+ }
+
+ @Override
+ protected BeanManagerImpl getManager(ELContext context)
+ {
+ return beanManager;
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldExpressionFactory.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansExpressionFactory.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldExpressionFactory.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldExpressionFactory.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -0,0 +1,64 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.el;
+
+import javax.el.ELContext;
+import javax.el.ExpressionFactory;
+import javax.el.MethodExpression;
+import javax.el.ValueExpression;
+
+import org.jboss.weld.util.el.ForwardingExpressionFactory;
+
+/**
+ * @author pmuir
+ *
+ */
+public class WeldExpressionFactory extends ForwardingExpressionFactory
+{
+
+ private final ExpressionFactory delegate;
+
+ public WeldExpressionFactory(ExpressionFactory expressionFactory)
+ {
+ if (expressionFactory == null)
+ {
+ throw new IllegalArgumentException("Cannot pass null expressionFactory");
+ }
+ this.delegate = expressionFactory;
+ }
+
+ @Override
+ protected ExpressionFactory delegate()
+ {
+ return delegate;
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public ValueExpression createValueExpression(ELContext context, String expression, Class expectedType)
+ {
+ return new WeldValueExpression(super.createValueExpression(context, expression, expectedType));
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public MethodExpression createMethodExpression(ELContext context, String expression, Class expectedReturnType, Class[] expectedParamTypes)
+ {
+ return new WeldMethodExpression(super.createMethodExpression(context, expression, expectedReturnType, expectedParamTypes));
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldMethodExpression.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansMethodExpression.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldMethodExpression.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldMethodExpression.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -0,0 +1,98 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.el;
+
+import static org.jboss.weld.el.ELCreationalContextStack.getCreationalContextStore;
+
+import javax.el.ELContext;
+import javax.el.MethodExpression;
+import javax.el.MethodInfo;
+import javax.enterprise.context.spi.Contextual;
+import javax.enterprise.context.spi.CreationalContext;
+
+import org.jboss.weld.Container;
+import org.jboss.weld.util.el.ForwardingMethodExpression;
+
+/**
+ * @author pmuir
+ *
+ */
+public class WeldMethodExpression extends ForwardingMethodExpression
+{
+
+ private static final long serialVersionUID = 7070020110515571744L;
+
+ private static final Contextual<?> CONTEXTUAL = new Contextual<Object>()
+ {
+
+ public Object create(CreationalContext<Object> creationalContext)
+ {
+ return null;
+ }
+
+ public void destroy(Object instance, CreationalContext<Object> creationalContext) {}
+
+ };
+
+ private final MethodExpression delegate;
+
+ public WeldMethodExpression(MethodExpression delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ @Override
+ protected MethodExpression delegate()
+ {
+ return delegate;
+ }
+
+ @Override
+ public Object invoke(ELContext context, Object[] params)
+ {
+ // TODO need to use correct manager for module
+ ELCreationalContext<?> creationalContext = ELCreationalContext.of(Container.instance().deploymentManager().createCreationalContext(CONTEXTUAL));
+ try
+ {
+ getCreationalContextStore(context).push(creationalContext);
+ return super.invoke(context, params);
+ }
+ finally
+ {
+ getCreationalContextStore(context).pop();
+ creationalContext.release();
+ }
+ }
+
+ @Override
+ public MethodInfo getMethodInfo(ELContext context)
+ {
+ // TODO need to use correct manager for module
+ ELCreationalContext<?> creationalContext = ELCreationalContext.of(Container.instance().deploymentManager().createCreationalContext(CONTEXTUAL));
+ try
+ {
+ getCreationalContextStore(context).push(creationalContext);
+ return super.getMethodInfo(context);
+ }
+ finally
+ {
+ getCreationalContextStore(context).pop();
+ creationalContext.release();
+ }
+ }
+
+}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldValueExpression.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/el/WebBeansValueExpression.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldValueExpression.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/el/WeldValueExpression.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -0,0 +1,115 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.el;
+
+import static org.jboss.weld.el.ELCreationalContextStack.getCreationalContextStore;
+
+import javax.el.ELContext;
+import javax.el.ValueExpression;
+import javax.enterprise.context.spi.Contextual;
+import javax.enterprise.context.spi.CreationalContext;
+
+import org.jboss.weld.Container;
+import org.jboss.weld.util.el.ForwardingValueExpression;
+
+/**
+ * @author pmuir
+ *
+ */
+public class WeldValueExpression extends ForwardingValueExpression
+{
+
+ private static final long serialVersionUID = 1122137212009930853L;
+
+ private static final Contextual<?> CONTEXTUAL = new Contextual<Object>()
+ {
+
+ public Object create(CreationalContext<Object> creationalContext)
+ {
+ return null;
+ }
+
+ public void destroy(Object instance, CreationalContext<Object> creationalContext) {}
+
+ };
+
+ private final ValueExpression delegate;
+
+ public WeldValueExpression(ValueExpression delegate)
+ {
+ this.delegate = delegate;
+ }
+
+ @Override
+ protected ValueExpression delegate()
+ {
+ return delegate;
+ }
+
+ @Override
+ public Object getValue(final ELContext context)
+ {
+ // TODO need to use correct manager for module
+ ELCreationalContext<?> creationalContext = ELCreationalContext.of(Container.instance().deploymentManager().createCreationalContext(CONTEXTUAL));
+ try
+ {
+ getCreationalContextStore(context).push(creationalContext);
+ return delegate().getValue(context);
+ }
+ finally
+ {
+ getCreationalContextStore(context).pop();
+ creationalContext.release();
+ }
+ }
+
+ @Override
+ public void setValue(ELContext context, Object value)
+ {
+ // TODO need to use correct manager for module
+ ELCreationalContext<?> creationalContext = ELCreationalContext.of(Container.instance().deploymentManager().createCreationalContext(CONTEXTUAL));
+ try
+ {
+ getCreationalContextStore(context).push(creationalContext);
+ delegate().setValue(context, value);
+ }
+ finally
+ {
+ getCreationalContextStore(context).pop();
+ creationalContext.release();
+ }
+ }
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Class getType(ELContext context)
+ {
+ // TODO need to use correct manager for module
+ ELCreationalContext<?> creationalContext = ELCreationalContext.of(Container.instance().deploymentManager().createCreationalContext(CONTEXTUAL));
+ try
+ {
+ getCreationalContextStore(context).push(creationalContext);
+ return delegate().getType(context);
+ }
+ finally
+ {
+ getCreationalContextStore(context).pop();
+ creationalContext.release();
+ }
+ }
+
+}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/jsf/WebBeansPhaseListener.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/jsf/WebBeansPhaseListener.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/jsf/WebBeansPhaseListener.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,183 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.jsf;
-
-import static org.jboss.weld.jsf.JsfHelper.getConversationId;
-import static org.jboss.weld.jsf.JsfHelper.getHttpSession;
-import static org.jboss.weld.jsf.JsfHelper.getModuleBeanManager;
-
-import javax.faces.context.FacesContext;
-import javax.faces.event.PhaseEvent;
-import javax.faces.event.PhaseId;
-import javax.faces.event.PhaseListener;
-import javax.servlet.http.HttpSession;
-
-import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.Container;
-import org.jboss.weld.context.ContextLifecycle;
-import org.jboss.weld.context.ConversationContext;
-import org.jboss.weld.context.SessionContext;
-import org.jboss.weld.conversation.ConversationImpl;
-import org.jboss.weld.conversation.ConversationManager;
-import org.jboss.weld.log.LogProvider;
-import org.jboss.weld.log.Logging;
-import org.jboss.weld.servlet.ConversationBeanStore;
-import org.jboss.weld.servlet.HttpSessionManager;
-
-/**
- * <p>
- * A JSF phase listener that initializes aspects of Web Beans in a more
- * fine-grained, integrated manner than what is possible with a servlet filter.
- * This phase listener works in conjunction with other hooks and callbacks
- * registered with the JSF runtime to help manage the Web Beans lifecycle.
- * </p>
- *
- * <p>
- * It's expected that over time, this phase listener may take on more work, but
- * for now the work is focused soley on conversation management. The phase
- * listener restores the long-running conversation if the conversation id token
- * is detected in the request, activates the conversation context in either case
- * (long-running or transient), and finally passivates the conversation after
- * the response has been committed.
- * </p>
- *
- * @author Nicklas Karlsson
- * @author Dan Allen
- */
-public class WebBeansPhaseListener implements PhaseListener
-{
- private static LogProvider log = Logging.getLogProvider(WebBeansPhaseListener.class);
-
- /**
- * Execute before every phase in the JSF life cycle. The order this
- * phase listener executes in relation to other phase listeners is
- * determined by the ordering of the faces-config.xml descriptors.
- * This phase listener should take precedence over extensions.
- *
- * @param phaseEvent The phase event
- */
- public void beforePhase(PhaseEvent phaseEvent)
- {
- if (phaseEvent.getPhaseId().equals(PhaseId.RESTORE_VIEW))
- {
- beforeRestoreView(phaseEvent.getFacesContext());
- }
- }
-
- /**
- * Execute after every phase in the JSF life cycle. The order this
- * phase listener executes in relation to other phase listeners is
- * determined by the ordering of the faces-config.xml descriptors.
- * This phase listener should take precedence over extensions.
- *
- * @param phaseEvent The phase event
- */
- public void afterPhase(PhaseEvent phaseEvent)
- {
- if (phaseEvent.getPhaseId().equals(PhaseId.RENDER_RESPONSE))
- {
- afterRenderResponse(phaseEvent.getFacesContext());
- }
- // be careful with this else as it assumes only one if condition right now
- else if (phaseEvent.getFacesContext().getResponseComplete())
- {
- afterResponseComplete(phaseEvent.getFacesContext(), phaseEvent.getPhaseId());
- }
- }
-
- /**
- * Execute before the Restore View phase.
- */
- private void beforeRestoreView(FacesContext facesContext)
- {
- log.trace("Initiating the session and conversation before the Restore View phase");
- initiateSessionAndConversation(facesContext);
- }
-
- /**
- * Execute after the Render Response phase.
- */
- private void afterRenderResponse(FacesContext facesContext)
- {
- BeanManagerImpl moduleBeanManager = getModuleBeanManager(facesContext);
- SessionContext sessionContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getSessionContext();
- ConversationContext conversationContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getConversationContext();
- if (sessionContext.isActive())
- {
- log.trace("Cleaning up the conversation after the Render Response phase");
- moduleBeanManager.getInstanceByType(ConversationManager.class).cleanupConversation();
- conversationContext.setActive(false);
- }
- else
- {
- log.trace("Skipping conversation cleanup after the Render Response phase because session has been terminated.");
- }
- }
-
- /**
- * Execute after any phase that marks the response as complete.
- */
- private void afterResponseComplete(FacesContext facesContext, PhaseId phaseId)
- {
- BeanManagerImpl moduleBeanManager = getModuleBeanManager(facesContext);
- SessionContext sessionContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getSessionContext();
- if (sessionContext.isActive())
- {
- log.trace("Cleaning up the conversation after the " + phaseId + " phase as the response has been marked complete");
- moduleBeanManager.getInstanceByType(ConversationManager.class).cleanupConversation();
- }
- else
- {
- log.trace("Skipping conversation cleanup after the response has been marked complete because the session has been terminated.");
- }
- }
-
- /**
- * Retrieve the HTTP session from the FacesContext and assign it to the Web
- * Beans HttpSessionManager. Restore the long-running conversation if the
- * conversation id token is present in the request and, in either case,
- * activate the conversation context (long-running or transient).
- */
- private void initiateSessionAndConversation(FacesContext facesContext)
- {
- HttpSession session = getHttpSession(facesContext);
- BeanManagerImpl moduleBeanManager = getModuleBeanManager(facesContext);
- moduleBeanManager.getInstanceByType(HttpSessionManager.class).setSession(session);
- moduleBeanManager.getInstanceByType(ConversationManager.class).beginOrRestoreConversation(getConversationId(facesContext));
- String cid = moduleBeanManager.getInstanceByType(ConversationImpl.class).getUnderlyingId();
-
- ConversationContext conversationContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getConversationContext();
- conversationContext.setBeanStore(new ConversationBeanStore(session, cid));
- conversationContext.setActive(true);
- }
-
- /**
- * The phase id for which this phase listener is active. This phase listener
- * observes all JSF life-cycle phases.
- */
- public PhaseId getPhaseId()
- {
- return PhaseId.ANY_PHASE;
- }
-
-}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/jsf/WebBeansPhaseListener.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/jsf/WeldPhaseListener.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -0,0 +1,183 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.jsf;
+
+import static org.jboss.weld.jsf.JsfHelper.getConversationId;
+import static org.jboss.weld.jsf.JsfHelper.getHttpSession;
+import static org.jboss.weld.jsf.JsfHelper.getModuleBeanManager;
+
+import javax.faces.context.FacesContext;
+import javax.faces.event.PhaseEvent;
+import javax.faces.event.PhaseId;
+import javax.faces.event.PhaseListener;
+import javax.servlet.http.HttpSession;
+
+import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.Container;
+import org.jboss.weld.context.ContextLifecycle;
+import org.jboss.weld.context.ConversationContext;
+import org.jboss.weld.context.SessionContext;
+import org.jboss.weld.conversation.ConversationImpl;
+import org.jboss.weld.conversation.ConversationManager;
+import org.jboss.weld.log.LogProvider;
+import org.jboss.weld.log.Logging;
+import org.jboss.weld.servlet.ConversationBeanStore;
+import org.jboss.weld.servlet.HttpSessionManager;
+
+/**
+ * <p>
+ * A JSF phase listener that initializes aspects of Weld in a more
+ * fine-grained, integrated manner than what is possible with a servlet filter.
+ * This phase listener works in conjunction with other hooks and callbacks
+ * registered with the JSF runtime to help manage the Weld lifecycle.
+ * </p>
+ *
+ * <p>
+ * It's expected that over time, this phase listener may take on more work, but
+ * for now the work is focused soley on conversation management. The phase
+ * listener restores the long-running conversation if the conversation id token
+ * is detected in the request, activates the conversation context in either case
+ * (long-running or transient), and finally passivates the conversation after
+ * the response has been committed.
+ * </p>
+ *
+ * @author Nicklas Karlsson
+ * @author Dan Allen
+ */
+public class WeldPhaseListener implements PhaseListener
+{
+ private static LogProvider log = Logging.getLogProvider(WeldPhaseListener.class);
+
+ /**
+ * Execute before every phase in the JSF life cycle. The order this
+ * phase listener executes in relation to other phase listeners is
+ * determined by the ordering of the faces-config.xml descriptors.
+ * This phase listener should take precedence over extensions.
+ *
+ * @param phaseEvent The phase event
+ */
+ public void beforePhase(PhaseEvent phaseEvent)
+ {
+ if (phaseEvent.getPhaseId().equals(PhaseId.RESTORE_VIEW))
+ {
+ beforeRestoreView(phaseEvent.getFacesContext());
+ }
+ }
+
+ /**
+ * Execute after every phase in the JSF life cycle. The order this
+ * phase listener executes in relation to other phase listeners is
+ * determined by the ordering of the faces-config.xml descriptors.
+ * This phase listener should take precedence over extensions.
+ *
+ * @param phaseEvent The phase event
+ */
+ public void afterPhase(PhaseEvent phaseEvent)
+ {
+ if (phaseEvent.getPhaseId().equals(PhaseId.RENDER_RESPONSE))
+ {
+ afterRenderResponse(phaseEvent.getFacesContext());
+ }
+ // be careful with this else as it assumes only one if condition right now
+ else if (phaseEvent.getFacesContext().getResponseComplete())
+ {
+ afterResponseComplete(phaseEvent.getFacesContext(), phaseEvent.getPhaseId());
+ }
+ }
+
+ /**
+ * Execute before the Restore View phase.
+ */
+ private void beforeRestoreView(FacesContext facesContext)
+ {
+ log.trace("Initiating the session and conversation before the Restore View phase");
+ initiateSessionAndConversation(facesContext);
+ }
+
+ /**
+ * Execute after the Render Response phase.
+ */
+ private void afterRenderResponse(FacesContext facesContext)
+ {
+ BeanManagerImpl moduleBeanManager = getModuleBeanManager(facesContext);
+ SessionContext sessionContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getSessionContext();
+ ConversationContext conversationContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getConversationContext();
+ if (sessionContext.isActive())
+ {
+ log.trace("Cleaning up the conversation after the Render Response phase");
+ moduleBeanManager.getInstanceByType(ConversationManager.class).cleanupConversation();
+ conversationContext.setActive(false);
+ }
+ else
+ {
+ log.trace("Skipping conversation cleanup after the Render Response phase because session has been terminated.");
+ }
+ }
+
+ /**
+ * Execute after any phase that marks the response as complete.
+ */
+ private void afterResponseComplete(FacesContext facesContext, PhaseId phaseId)
+ {
+ BeanManagerImpl moduleBeanManager = getModuleBeanManager(facesContext);
+ SessionContext sessionContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getSessionContext();
+ if (sessionContext.isActive())
+ {
+ log.trace("Cleaning up the conversation after the " + phaseId + " phase as the response has been marked complete");
+ moduleBeanManager.getInstanceByType(ConversationManager.class).cleanupConversation();
+ }
+ else
+ {
+ log.trace("Skipping conversation cleanup after the response has been marked complete because the session has been terminated.");
+ }
+ }
+
+ /**
+ * Retrieve the HTTP session from the FacesContext and assign it to the Web
+ * Beans HttpSessionManager. Restore the long-running conversation if the
+ * conversation id token is present in the request and, in either case,
+ * activate the conversation context (long-running or transient).
+ */
+ private void initiateSessionAndConversation(FacesContext facesContext)
+ {
+ HttpSession session = getHttpSession(facesContext);
+ BeanManagerImpl moduleBeanManager = getModuleBeanManager(facesContext);
+ moduleBeanManager.getInstanceByType(HttpSessionManager.class).setSession(session);
+ moduleBeanManager.getInstanceByType(ConversationManager.class).beginOrRestoreConversation(getConversationId(facesContext));
+ String cid = moduleBeanManager.getInstanceByType(ConversationImpl.class).getUnderlyingId();
+
+ ConversationContext conversationContext = Container.instance().deploymentServices().get(ContextLifecycle.class).getConversationContext();
+ conversationContext.setBeanStore(new ConversationBeanStore(session, cid));
+ conversationContext.setActive(true);
+ }
+
+ /**
+ * The phase id for which this phase listener is active. This phase listener
+ * observes all JSF life-cycle phases.
+ */
+ public PhaseId getPhaseId()
+ {
+ return PhaseId.ANY_PHASE;
+ }
+
+}
Deleted: ri/trunk/impl/src/main/java/org/jboss/weld/servlet/WebBeansListener.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/servlet/WebBeansListener.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/servlet/WebBeansListener.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,131 +0,0 @@
-/*
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
- *
- * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
- *
- * Use is subject to license terms.
- *
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-package org.jboss.weld.servlet;
-
-import javax.servlet.ServletRequestEvent;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpSessionEvent;
-
-import org.jboss.weld.Container;
-import org.jboss.weld.context.ContextLifecycle;
-import org.jboss.weld.servlet.api.helpers.AbstractServletListener;
-
-/**
- * The Web Beans listener
- *
- * Listens for context/session creation/destruction.
- *
- * Delegates work to the ServletLifeCycle.
- *
- * @author Nicklas Karlsson
- *
- */
-public class WebBeansListener extends AbstractServletListener
-{
-
- private ServletLifecycle lifecycle;
-
- private ServletLifecycle getLifecycle()
- {
- if (lifecycle == null)
- {
- this.lifecycle = new ServletLifecycle(Container.instance().deploymentServices().get(ContextLifecycle.class));
- }
- return lifecycle;
- }
-
- /**
- * Called when the session is created
- *
- * @param event The session event
- */
- @Override
- public void sessionCreated(HttpSessionEvent event)
- {
- // JBoss AS will still start the deployment even if WB fails
- if (Container.instance() != null && Container.instance().isInitialized())
- {
- getLifecycle().beginSession(event.getSession());
- }
- }
-
- /**
- * Called when the session is destroyed
- *
- * @param event The session event
- */
- @Override
- public void sessionDestroyed(HttpSessionEvent event)
- {
- // JBoss AS will still start the deployment even if WB fails
- if (Container.instance() != null && Container.instance().isInitialized())
- {
- getLifecycle().endSession(event.getSession());
- }
- }
-
- /**
- * Called when the request is destroyed
- *
- * @param event The request event
- */
- @Override
- public void requestDestroyed(ServletRequestEvent event)
- {
- // JBoss AS will still start the deployment even if WB fails
- if (Container.instance() != null && Container.instance().isInitialized())
- {
- if (event.getServletRequest() instanceof HttpServletRequest)
- {
- getLifecycle().endRequest((HttpServletRequest) event.getServletRequest());
- }
- else
- {
- throw new IllegalStateException("Non HTTP-Servlet lifecycle not defined");
- }
- }
- }
-
- /**
- * Called when the request is initialized
- *
- * @param event The request event
- */
- @Override
- public void requestInitialized(ServletRequestEvent event)
- {
- // JBoss AS will still start the deployment even if WB fails
- if (Container.instance() != null && Container.instance().isInitialized())
- {
- if (event.getServletRequest() instanceof HttpServletRequest)
- {
- getLifecycle().beginRequest((HttpServletRequest) event.getServletRequest());
- }
- else
- {
- throw new IllegalStateException("Non HTTP-Servlet lifecycle not defined");
- }
- }
- }
-
-}
Copied: ri/trunk/impl/src/main/java/org/jboss/weld/servlet/WeldListener.java (from rev 3879, ri/trunk/impl/src/main/java/org/jboss/weld/servlet/WebBeansListener.java)
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/servlet/WeldListener.java (rev 0)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/servlet/WeldListener.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -0,0 +1,131 @@
+/*
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ *
+ * Use is subject to license terms.
+ *
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.jboss.weld.servlet;
+
+import javax.servlet.ServletRequestEvent;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpSessionEvent;
+
+import org.jboss.weld.Container;
+import org.jboss.weld.context.ContextLifecycle;
+import org.jboss.weld.servlet.api.helpers.AbstractServletListener;
+
+/**
+ * The Weld listener
+ *
+ * Listens for context/session creation/destruction.
+ *
+ * Delegates work to the ServletLifeCycle.
+ *
+ * @author Nicklas Karlsson
+ *
+ */
+public class WeldListener extends AbstractServletListener
+{
+
+ private ServletLifecycle lifecycle;
+
+ private ServletLifecycle getLifecycle()
+ {
+ if (lifecycle == null)
+ {
+ this.lifecycle = new ServletLifecycle(Container.instance().deploymentServices().get(ContextLifecycle.class));
+ }
+ return lifecycle;
+ }
+
+ /**
+ * Called when the session is created
+ *
+ * @param event The session event
+ */
+ @Override
+ public void sessionCreated(HttpSessionEvent event)
+ {
+ // JBoss AS will still start the deployment even if WB fails
+ if (Container.instance() != null && Container.instance().isInitialized())
+ {
+ getLifecycle().beginSession(event.getSession());
+ }
+ }
+
+ /**
+ * Called when the session is destroyed
+ *
+ * @param event The session event
+ */
+ @Override
+ public void sessionDestroyed(HttpSessionEvent event)
+ {
+ // JBoss AS will still start the deployment even if WB fails
+ if (Container.instance() != null && Container.instance().isInitialized())
+ {
+ getLifecycle().endSession(event.getSession());
+ }
+ }
+
+ /**
+ * Called when the request is destroyed
+ *
+ * @param event The request event
+ */
+ @Override
+ public void requestDestroyed(ServletRequestEvent event)
+ {
+ // JBoss AS will still start the deployment even if WB fails
+ if (Container.instance() != null && Container.instance().isInitialized())
+ {
+ if (event.getServletRequest() instanceof HttpServletRequest)
+ {
+ getLifecycle().endRequest((HttpServletRequest) event.getServletRequest());
+ }
+ else
+ {
+ throw new IllegalStateException("Non HTTP-Servlet lifecycle not defined");
+ }
+ }
+ }
+
+ /**
+ * Called when the request is initialized
+ *
+ * @param event The request event
+ */
+ @Override
+ public void requestInitialized(ServletRequestEvent event)
+ {
+ // JBoss AS will still start the deployment even if WB fails
+ if (Container.instance() != null && Container.instance().isInitialized())
+ {
+ if (event.getServletRequest() instanceof HttpServletRequest)
+ {
+ getLifecycle().beginRequest((HttpServletRequest) event.getServletRequest());
+ }
+ else
+ {
+ throw new IllegalStateException("Non HTTP-Servlet lifecycle not defined");
+ }
+ }
+ }
+
+}
Modified: ri/trunk/jboss-as/build.properties
===================================================================
--- ri/trunk/jboss-as/build.properties 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/jboss-as/build.properties 2009-10-08 05:51:23 UTC (rev 3893)
@@ -7,8 +7,8 @@
# maximum number of TCK tests to deploy before restarting JBoss AS
# jboss.deployments.restart = 25
-webbeans-deployer.version=5.2.0-SNAPSHOT
-webbeans.version=1.0.0-SNAPSHOT
+weld-deployer.version=5.2.0-SNAPSHOT
+weld.version=1.0.0-SNAPSHOT
jboss-ejb3.version=1.0.0
javassist.version=3.11.0.GA
validation.version=1.0.CR3
Modified: ri/trunk/jboss-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties
===================================================================
--- ri/trunk/jboss-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/jboss-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,7 +1,7 @@
# Configuration for running incontainer tests from your IDE
-# Alter the path webbeans accordingly (relative from the tck/impl dir)
+# Alter the path weld accordingly (relative from the tck/impl dir)
org.jboss.testharness.standalone=false
-org.jboss.testharness.container.extraConfigurationDir=../../webbeans/jboss-as
+org.jboss.testharness.container.extraConfigurationDir=../../weld/jboss-as
org.jboss.testharness.container.forceRestart=false
-org.jboss.testharness.libraryDirectory=../../webbeans/jboss-tck-runner/target/dependency/lib
-org.jboss.testharness.runIntegrationTests=true
\ No newline at end of file
+org.jboss.testharness.libraryDirectory=../../weld/jboss-tck-runner/target/dependency/lib
+org.jboss.testharness.runIntegrationTests=true
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Bootstrap.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Bootstrap.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Bootstrap.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -25,10 +25,10 @@
import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
import org.jboss.weld.bootstrap.spi.Deployment;
import org.jboss.weld.context.api.BeanStore;
-import org.jboss.weld.manager.api.WebBeansManager;
+import org.jboss.weld.manager.api.WeldManager;
/**
- * Application container initialization API for Web Beans.
+ * Application container initialization API for Weld.
*
* To initialize the container you must call, in this order:
*
@@ -124,14 +124,14 @@
* If {@link #startContainer()} has not been called, this method will return
* null.
*
- * If the beanDeploymentArchive is not known to Web Beans (for example, it
- * was not passed to the Web Beans as part of the {@link Deployment}, or has
+ * If the beanDeploymentArchive is not known to Weld (for example, it
+ * was not passed to the Weld as part of the {@link Deployment}, or has
* not yet been requested by
* {@link Deployment#loadBeanDeploymentArchive(Class)}), null will be
* returned.
*
* @return the manager or null if not yet available or not found.
*/
- public WebBeansManager getManager(BeanDeploymentArchive beanDeploymentArchive);
+ public WeldManager getManager(BeanDeploymentArchive beanDeploymentArchive);
}
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Singleton.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Singleton.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/Singleton.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -26,12 +26,12 @@
/**
* Holds a reference to an application singleton. This singleton is used
- * internally by Web Beans to store various application scoped objects.
+ * internally by Weld to store various application scoped objects.
*
- * This allows Web Beans to operate as a shared library. In a shared mode, the
- * same instance of WebBeans implementation is used by all the applications in
+ * This allows Weld to operate as a shared library. In a shared mode, the
+ * same instance of Weld implementation is used by all the applications in
* a server environment. In the exclusive mode, each application loads a
- * separate copy of WebBeans implementation at the application level.
+ * separate copy of Weld implementation at the application level.
*
* Alternative implementations of Singleton can be used as required
*
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ForwardingBootstrap.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ForwardingBootstrap.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/bootstrap/api/helpers/ForwardingBootstrap.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -21,7 +21,7 @@
import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
import org.jboss.weld.bootstrap.spi.Deployment;
import org.jboss.weld.context.api.BeanStore;
-import org.jboss.weld.manager.api.WebBeansManager;
+import org.jboss.weld.manager.api.WeldManager;
/**
* Implementation of {@link Bootstrap} which supports the decorator pattern
@@ -33,7 +33,7 @@
protected abstract Bootstrap delegate();
- public WebBeansManager getManager(BeanDeploymentArchive beanDeploymentArchive)
+ public WeldManager getManager(BeanDeploymentArchive beanDeploymentArchive)
{
return delegate().getManager(beanDeploymentArchive);
}
Deleted: ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WebBeansManager.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WebBeansManager.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WebBeansManager.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,93 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2008, Red Hat Middleware LLC, and individual contributors
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package org.jboss.weld.manager.api;
-
-import java.io.Serializable;
-import java.lang.annotation.Annotation;
-
-import javax.enterprise.context.ContextNotActiveException;
-import javax.enterprise.inject.spi.Bean;
-import javax.enterprise.inject.spi.BeanManager;
-import javax.enterprise.inject.spi.InjectionTarget;
-
-import org.jboss.weld.ejb.spi.EjbDescriptor;
-
-/**
- * Functionality provided by the Web Beans Manager over and above the JSR-299
- * Manager.
- *
- * @author Pete Muir
- *
- */
-public interface WebBeansManager extends BeanManager, Serializable
-{
-
- /**
- * Create a new child activity. A child activity inherits all beans,
- * interceptors, decorators, observers, and contexts defined by its direct
- * and indirect parent activities.
- *
- * This method should not be called by the application.
- *
- * @return the child activity
- */
- public WebBeansManager createActivity();
-
- /**
- * Associate an activity with the current context for a normal scope
- *
- * @param scopeType
- * the scope to associate the activity with
- * @return the activity
- * @throws ContextNotActiveException
- * if the given scope is inactive
- * @throws IllegalArgumentException
- * if the given scope is not a normal scope
- */
- public WebBeansManager setCurrent(Class<? extends Annotation> scopeType);
-
- /**
- * The injection target for the given EJB, or null if Web Beans was not
- * given this descriptor in the deployment.
- *
- * @param <T>
- * @param descriptor
- * @return
- */
- public <T> InjectionTarget<T> createInjectionTarget(EjbDescriptor<T> descriptor);
-
- /**
- * Get the Bean object for the given EJB, or null if Web Beans was not given
- * this descriptor in the deployment.
- *
- * @param <T>
- * @param descriptor
- * @return
- */
- public <T> Bean<T> getBean(EjbDescriptor<T> descriptor);
-
- /**
- * Get the EjbDescriptor for the given ejb name
- *
- * @param <T>
- * @param ejbName
- * @return
- */
- public <T> EjbDescriptor<T> getEjbDescriptor(String ejbName);
-
-}
Copied: ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java (from rev 3875, ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WebBeansManager.java)
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java (rev 0)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/manager/api/WeldManager.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -0,0 +1,93 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2008, Red Hat Middleware LLC, and individual contributors
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.jboss.weld.manager.api;
+
+import java.io.Serializable;
+import java.lang.annotation.Annotation;
+
+import javax.enterprise.context.ContextNotActiveException;
+import javax.enterprise.inject.spi.Bean;
+import javax.enterprise.inject.spi.BeanManager;
+import javax.enterprise.inject.spi.InjectionTarget;
+
+import org.jboss.weld.ejb.spi.EjbDescriptor;
+
+/**
+ * Functionality provided by the Web Beans Manager over and above the JSR-299
+ * Manager.
+ *
+ * @author Pete Muir
+ *
+ */
+public interface WeldManager extends BeanManager, Serializable
+{
+
+ /**
+ * Create a new child activity. A child activity inherits all beans,
+ * interceptors, decorators, observers, and contexts defined by its direct
+ * and indirect parent activities.
+ *
+ * This method should not be called by the application.
+ *
+ * @return the child activity
+ */
+ public WeldManager createActivity();
+
+ /**
+ * Associate an activity with the current context for a normal scope
+ *
+ * @param scopeType
+ * the scope to associate the activity with
+ * @return the activity
+ * @throws ContextNotActiveException
+ * if the given scope is inactive
+ * @throws IllegalArgumentException
+ * if the given scope is not a normal scope
+ */
+ public WeldManager setCurrent(Class<? extends Annotation> scopeType);
+
+ /**
+ * The injection target for the given EJB, or null if Web Beans was not
+ * given this descriptor in the deployment.
+ *
+ * @param <T>
+ * @param descriptor
+ * @return
+ */
+ public <T> InjectionTarget<T> createInjectionTarget(EjbDescriptor<T> descriptor);
+
+ /**
+ * Get the Bean object for the given EJB, or null if Web Beans was not given
+ * this descriptor in the deployment.
+ *
+ * @param <T>
+ * @param descriptor
+ * @return
+ */
+ public <T> Bean<T> getBean(EjbDescriptor<T> descriptor);
+
+ /**
+ * Get the EjbDescriptor for the given ejb name
+ *
+ * @param <T>
+ * @param ejbName
+ * @return
+ */
+ public <T> EjbDescriptor<T> getEjbDescriptor(String ejbName);
+
+}
Modified: ri/trunk/spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockBootstrap.java
===================================================================
--- ri/trunk/spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockBootstrap.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockBootstrap.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -9,12 +9,12 @@
import org.jboss.weld.bootstrap.spi.BeanDeploymentArchive;
import org.jboss.weld.bootstrap.spi.Deployment;
import org.jboss.weld.context.api.BeanStore;
-import org.jboss.weld.manager.api.WebBeansManager;
+import org.jboss.weld.manager.api.WeldManager;
public class MockBootstrap implements Bootstrap
{
- public WebBeansManager getManager(BeanDeploymentArchive beanDeploymentArchive)
+ public WeldManager getManager(BeanDeploymentArchive beanDeploymentArchive)
{
return null;
}
Modified: ri/trunk/tests/src/main/java/org/jboss/weld/mock/MockServletLifecycle.java
===================================================================
--- ri/trunk/tests/src/main/java/org/jboss/weld/mock/MockServletLifecycle.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/main/java/org/jboss/weld/mock/MockServletLifecycle.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,6 +1,6 @@
package org.jboss.weld.mock;
-import org.jboss.weld.bootstrap.WebBeansBootstrap;
+import org.jboss.weld.bootstrap.WeldBootstrap;
import org.jboss.weld.bootstrap.api.Environment;
import org.jboss.weld.bootstrap.api.Environments;
import org.jboss.weld.bootstrap.api.Lifecycle;
@@ -15,7 +15,7 @@
{
private static final ResourceLoader MOCK_RESOURCE_LOADER = new MockResourceLoader();
- private final WebBeansBootstrap bootstrap;
+ private final WeldBootstrap bootstrap;
private final MockDeployment deployment;
private final BeanStore applicationBeanStore;
private final BeanStore sessionBeanStore;
@@ -30,7 +30,7 @@
{
throw new IllegalStateException("No WebBeanDiscovery is available");
}
- this.bootstrap = new WebBeansBootstrap();
+ this.bootstrap = new WeldBootstrap();
this.deployment.getServices().add(ResourceLoader.class, MOCK_RESOURCE_LOADER);
this.deployment.getServices().add(ServletServices.class, new MockServletServices(deployment.getArchive()));
this.applicationBeanStore = new ConcurrentHashMapBeanStore();
@@ -79,7 +79,7 @@
return deployment;
}
- protected WebBeansBootstrap getBootstrap()
+ protected WeldBootstrap getBootstrap()
{
return bootstrap;
}
Modified: ri/trunk/tests/src/main/java/org/jboss/weld/mock/el/EL.java
===================================================================
--- ri/trunk/tests/src/main/java/org/jboss/weld/mock/el/EL.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/main/java/org/jboss/weld/mock/el/EL.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -31,8 +31,8 @@
import javax.el.VariableMapper;
import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.el.WebBeansELContextListener;
-import org.jboss.weld.el.WebBeansExpressionFactory;
+import org.jboss.weld.el.WeldELContextListener;
+import org.jboss.weld.el.WeldExpressionFactory;
import com.sun.el.ExpressionFactoryImpl;
import com.sun.el.lang.FunctionMapperImpl;
@@ -47,9 +47,9 @@
public class EL
{
- public static final ExpressionFactory EXPRESSION_FACTORY = new WebBeansExpressionFactory(new ExpressionFactoryImpl());
+ public static final ExpressionFactory EXPRESSION_FACTORY = new WeldExpressionFactory(new ExpressionFactoryImpl());
- public static final ELContextListener[] EL_CONTEXT_LISTENERS = { new WebBeansELContextListener() };
+ public static final ELContextListener[] EL_CONTEXT_LISTENERS = { new WeldELContextListener() };
private static ELResolver createELResolver(BeanManagerImpl beanManagerImpl)
{
Deleted: ri/trunk/tests/src/main/java/org/jboss/weld/test/AbstractWebBeansTest.java
===================================================================
--- ri/trunk/tests/src/main/java/org/jboss/weld/test/AbstractWebBeansTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/main/java/org/jboss/weld/test/AbstractWebBeansTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,204 +0,0 @@
-package org.jboss.weld.test;
-
-import java.io.ByteArrayInputStream;
-import java.io.ByteArrayOutputStream;
-import java.io.IOException;
-import java.io.ObjectInputStream;
-import java.io.ObjectOutputStream;
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Type;
-import java.net.URL;
-import java.util.ArrayList;
-import java.util.Arrays;
-import java.util.List;
-import java.util.Set;
-
-import javax.el.ELContext;
-import javax.enterprise.inject.TypeLiteral;
-import javax.enterprise.inject.spi.Bean;
-import javax.servlet.ServletContext;
-
-import org.jboss.testharness.AbstractTest;
-import org.jboss.testharness.impl.runner.servlet.ServletTestRunner;
-import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.mock.MockServletContext;
-import org.jboss.weld.mock.el.EL;
-import org.jboss.weld.servlet.ServletHelper;
-import org.jboss.weld.util.collections.EnumerationList;
-import org.testng.ITestContext;
-import org.testng.annotations.AfterClass;
-import org.testng.annotations.BeforeClass;
-import org.testng.annotations.BeforeSuite;
-
-public abstract class AbstractWebBeansTest extends AbstractTest
-{
-
- private ServletContext servletContext;
-
- @Override
- @BeforeSuite
- public void beforeSuite(ITestContext context) throws Exception
- {
- if (!isInContainer())
- {
- getCurrentConfiguration().getExtraPackages().add(AbstractWebBeansTest.class.getPackage().getName());
- getCurrentConfiguration().getExtraPackages().add(EL.class.getPackage().getName());
- //getCurrentConfiguration().getExtraPackages().add(MockServletContext.class.getPackage().getName());
- }
- super.beforeSuite(context);
- }
-
- @Override
- @BeforeClass
- public void beforeClass() throws Throwable
- {
- super.beforeClass();
- if (isInContainer())
- {
- servletContext = ServletTestRunner.getCurrentServletContext();
- }
- else
- {
- servletContext = new MockServletContext("");
- }
-
- }
-
- @Override
- @AfterClass
- public void afterClass() throws Exception
- {
- servletContext = null;
- super.afterClass();
- }
-
- /**
- * Checks if all annotations are in a given set of annotations
- *
- * @param annotations The annotation set
- * @param annotationTypes The annotations to match
- * @return True if match, false otherwise
- */
- public boolean annotationSetMatches(Set<? extends Annotation> annotations, Class<? extends Annotation>... annotationTypes)
- {
- List<Class<? extends Annotation>> annotationTypeList = new ArrayList<Class<? extends Annotation>>();
- annotationTypeList.addAll(Arrays.asList(annotationTypes));
- for (Annotation annotation : annotations)
- {
- if (annotationTypeList.contains(annotation.annotationType()))
- {
- annotationTypeList.remove(annotation.annotationType());
- }
- else
- {
- return false;
- }
- }
- return annotationTypeList.size() == 0;
- }
-
- protected Iterable<URL> getResources(String name)
- {
- if (name.startsWith("/"))
- {
- name = name.substring(1);
- }
- else
- {
- name = getClass().getPackage().getName().replace(".", "/") + "/" + name;
- }
- try
- {
- return new EnumerationList<URL>(getClass().getClassLoader().getResources(name));
- }
- catch (IOException e)
- {
- throw new RuntimeException("Error loading resource from classloader" + name, e);
- }
- }
-
- protected byte[] serialize(Object instance) throws IOException
- {
- ByteArrayOutputStream bytes = new ByteArrayOutputStream();
- ObjectOutputStream out = new ObjectOutputStream(bytes);
- out.writeObject(instance);
- return bytes.toByteArray();
- }
-
- protected Object deserialize(byte[] bytes) throws IOException, ClassNotFoundException
- {
- ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes));
- return in.readObject();
- }
-
- protected BeanManagerImpl getCurrentManager()
- {
- return ServletHelper.getModuleBeanManager(servletContext);
- }
-
- public boolean isExceptionInHierarchy(Throwable exception, Class<? extends Throwable> expectedException )
- {
- while (exception != null)
- {
- if (exception.getClass().equals(expectedException))
- {
- return true;
- }
- exception = exception.getCause();
- }
- return false;
- }
-
- public <T> Bean<T> getBean(Type beanType, Annotation... bindings)
- {
- Set<Bean<?>> beans = getCurrentManager().getBeans(beanType, bindings);
- if (beans.size() > 1)
- {
- throw new RuntimeException("More than one bean resolved to " + beanType + " with bindings " + Arrays.asList(bindings));
- }
- if (beans.size() == 0)
- {
- throw new RuntimeException("No beans resolved to " + beanType + " with bindings " + Arrays.asList(bindings));
- }
- @SuppressWarnings("unchecked")
- Bean<T> bean = (Bean<T>) beans.iterator().next();
- return bean;
- }
-
- @SuppressWarnings("unchecked")
- public <T> Set<Bean<T>> getBeans(Class<T> type, Annotation... bindings)
- {
- return (Set) getCurrentManager().getBeans(type, bindings);
- }
-
- @SuppressWarnings("unchecked")
- public <T> Set<Bean<T>> getBeans(TypeLiteral<T> type, Annotation... bindings)
- {
- return (Set)getCurrentManager().getBeans(type.getType(), bindings);
- }
-
- @SuppressWarnings("unchecked")
- public <T> T createContextualInstance(Class<T> beanType, Annotation... bindings)
- {
- return (T) createContextualInstance((Type) beanType, bindings);
- }
-
- public Object createContextualInstance(Type beanType, Annotation... bindings)
- {
- Bean<?> bean = getBean(beanType, bindings);
- return getCurrentManager().getReference(bean, beanType, getCurrentManager().createCreationalContext(bean));
- }
-
- @SuppressWarnings("unchecked")
- public <T> T evaluateValueExpression(String expression, Class<T> expectedType)
- {
- ELContext elContext = EL.createELContext(getCurrentManager().getCurrent());
- return (T) EL.EXPRESSION_FACTORY.createValueExpression(elContext, expression, expectedType).getValue(elContext);
- }
-
- protected String getPath(String viewId)
- {
- return getContextPath() + viewId;
- }
-
-}
Copied: ri/trunk/tests/src/main/java/org/jboss/weld/test/AbstractWeldTest.java (from rev 3882, ri/trunk/tests/src/main/java/org/jboss/weld/test/AbstractWebBeansTest.java)
===================================================================
--- ri/trunk/tests/src/main/java/org/jboss/weld/test/AbstractWeldTest.java (rev 0)
+++ ri/trunk/tests/src/main/java/org/jboss/weld/test/AbstractWeldTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -0,0 +1,204 @@
+package org.jboss.weld.test;
+
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.IOException;
+import java.io.ObjectInputStream;
+import java.io.ObjectOutputStream;
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Type;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Set;
+
+import javax.el.ELContext;
+import javax.enterprise.inject.TypeLiteral;
+import javax.enterprise.inject.spi.Bean;
+import javax.servlet.ServletContext;
+
+import org.jboss.testharness.AbstractTest;
+import org.jboss.testharness.impl.runner.servlet.ServletTestRunner;
+import org.jboss.weld.BeanManagerImpl;
+import org.jboss.weld.mock.MockServletContext;
+import org.jboss.weld.mock.el.EL;
+import org.jboss.weld.servlet.ServletHelper;
+import org.jboss.weld.util.collections.EnumerationList;
+import org.testng.ITestContext;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeSuite;
+
+public abstract class AbstractWeldTest extends AbstractTest
+{
+
+ private ServletContext servletContext;
+
+ @Override
+ @BeforeSuite
+ public void beforeSuite(ITestContext context) throws Exception
+ {
+ if (!isInContainer())
+ {
+ getCurrentConfiguration().getExtraPackages().add(AbstractWeldTest.class.getPackage().getName());
+ getCurrentConfiguration().getExtraPackages().add(EL.class.getPackage().getName());
+ //getCurrentConfiguration().getExtraPackages().add(MockServletContext.class.getPackage().getName());
+ }
+ super.beforeSuite(context);
+ }
+
+ @Override
+ @BeforeClass
+ public void beforeClass() throws Throwable
+ {
+ super.beforeClass();
+ if (isInContainer())
+ {
+ servletContext = ServletTestRunner.getCurrentServletContext();
+ }
+ else
+ {
+ servletContext = new MockServletContext("");
+ }
+
+ }
+
+ @Override
+ @AfterClass
+ public void afterClass() throws Exception
+ {
+ servletContext = null;
+ super.afterClass();
+ }
+
+ /**
+ * Checks if all annotations are in a given set of annotations
+ *
+ * @param annotations The annotation set
+ * @param annotationTypes The annotations to match
+ * @return True if match, false otherwise
+ */
+ public boolean annotationSetMatches(Set<? extends Annotation> annotations, Class<? extends Annotation>... annotationTypes)
+ {
+ List<Class<? extends Annotation>> annotationTypeList = new ArrayList<Class<? extends Annotation>>();
+ annotationTypeList.addAll(Arrays.asList(annotationTypes));
+ for (Annotation annotation : annotations)
+ {
+ if (annotationTypeList.contains(annotation.annotationType()))
+ {
+ annotationTypeList.remove(annotation.annotationType());
+ }
+ else
+ {
+ return false;
+ }
+ }
+ return annotationTypeList.size() == 0;
+ }
+
+ protected Iterable<URL> getResources(String name)
+ {
+ if (name.startsWith("/"))
+ {
+ name = name.substring(1);
+ }
+ else
+ {
+ name = getClass().getPackage().getName().replace(".", "/") + "/" + name;
+ }
+ try
+ {
+ return new EnumerationList<URL>(getClass().getClassLoader().getResources(name));
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("Error loading resource from classloader" + name, e);
+ }
+ }
+
+ protected byte[] serialize(Object instance) throws IOException
+ {
+ ByteArrayOutputStream bytes = new ByteArrayOutputStream();
+ ObjectOutputStream out = new ObjectOutputStream(bytes);
+ out.writeObject(instance);
+ return bytes.toByteArray();
+ }
+
+ protected Object deserialize(byte[] bytes) throws IOException, ClassNotFoundException
+ {
+ ObjectInputStream in = new ObjectInputStream(new ByteArrayInputStream(bytes));
+ return in.readObject();
+ }
+
+ protected BeanManagerImpl getCurrentManager()
+ {
+ return ServletHelper.getModuleBeanManager(servletContext);
+ }
+
+ public boolean isExceptionInHierarchy(Throwable exception, Class<? extends Throwable> expectedException )
+ {
+ while (exception != null)
+ {
+ if (exception.getClass().equals(expectedException))
+ {
+ return true;
+ }
+ exception = exception.getCause();
+ }
+ return false;
+ }
+
+ public <T> Bean<T> getBean(Type beanType, Annotation... bindings)
+ {
+ Set<Bean<?>> beans = getCurrentManager().getBeans(beanType, bindings);
+ if (beans.size() > 1)
+ {
+ throw new RuntimeException("More than one bean resolved to " + beanType + " with bindings " + Arrays.asList(bindings));
+ }
+ if (beans.size() == 0)
+ {
+ throw new RuntimeException("No beans resolved to " + beanType + " with bindings " + Arrays.asList(bindings));
+ }
+ @SuppressWarnings("unchecked")
+ Bean<T> bean = (Bean<T>) beans.iterator().next();
+ return bean;
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> Set<Bean<T>> getBeans(Class<T> type, Annotation... bindings)
+ {
+ return (Set) getCurrentManager().getBeans(type, bindings);
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> Set<Bean<T>> getBeans(TypeLiteral<T> type, Annotation... bindings)
+ {
+ return (Set)getCurrentManager().getBeans(type.getType(), bindings);
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> T createContextualInstance(Class<T> beanType, Annotation... bindings)
+ {
+ return (T) createContextualInstance((Type) beanType, bindings);
+ }
+
+ public Object createContextualInstance(Type beanType, Annotation... bindings)
+ {
+ Bean<?> bean = getBean(beanType, bindings);
+ return getCurrentManager().getReference(bean, beanType, getCurrentManager().createCreationalContext(bean));
+ }
+
+ @SuppressWarnings("unchecked")
+ public <T> T evaluateValueExpression(String expression, Class<T> expectedType)
+ {
+ ELContext elContext = EL.createELContext(getCurrentManager().getCurrent());
+ return (T) EL.EXPRESSION_FACTORY.createValueExpression(elContext, expression, expectedType).getValue(elContext);
+ }
+
+ protected String getPath(String viewId)
+ {
+ return getContextPath() + viewId;
+ }
+
+}
Modified: ri/trunk/tests/src/test/debug-resources/META-INF/jboss-test-harness.properties
===================================================================
--- ri/trunk/tests/src/test/debug-resources/META-INF/jboss-test-harness.properties 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/debug-resources/META-INF/jboss-test-harness.properties 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,7 +1,7 @@
# Configuration for running incontainer tests from your IDE
-# Alter the path webbeans accordingly (relative from the tck/impl dir)
+# Alter the path weld accordingly (relative from the tck/impl dir)
org.jboss.testharness.standalone=false
-org.jboss.testharness.container.extraConfigurationDir=../../webbeans/jboss-as
+org.jboss.testharness.container.extraConfigurationDir=../../weld/jboss-as
org.jboss.testharness.container.forceRestart=false
-org.jboss.testharness.libraryDirectory=../../webbeans/tests/target/dependency/lib
-org.jboss.testharness.runIntegrationTests=true
\ No newline at end of file
+org.jboss.testharness.libraryDirectory=../../weld/tests/target/dependency/lib
+org.jboss.testharness.runIntegrationTests=true
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/examples/ExampleTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/examples/ExampleTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/examples/ExampleTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,11 +1,11 @@
package org.jboss.weld.test.examples;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class ExampleTest extends AbstractWebBeansTest
+public class ExampleTest extends AbstractWeldTest
{
@Test
public void testGameGenerator() throws Exception
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/examples/MockExampleTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/examples/MockExampleTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/examples/MockExampleTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -2,12 +2,12 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
@BeansXml("beans.xml")
-public class MockExampleTest extends AbstractWebBeansTest
+public class MockExampleTest extends AbstractWeldTest
{
@Test
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/ActivitiesTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/ActivitiesTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/ActivitiesTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -21,7 +21,7 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.weld.bean.ForwardingBean;
import org.jboss.weld.literal.DefaultLiteral;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@@ -31,7 +31,7 @@
*
*/
@Artifact
-public class ActivitiesTest extends AbstractWebBeansTest
+public class ActivitiesTest extends AbstractWeldTest
{
private static final Set<Annotation> DEFAULT_BINDINGS = new HashSet<Annotation>();
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/child/SameBeanTypeInChildActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/child/SameBeanTypeInChildActivityTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/child/SameBeanTypeInChildActivityTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -16,8 +16,8 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.weld.literal.DefaultLiteral;
-import org.jboss.weld.manager.api.WebBeansManager;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.manager.api.WeldManager;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -26,7 +26,7 @@
*
*/
@Artifact
-public class SameBeanTypeInChildActivityTest extends AbstractWebBeansTest
+public class SameBeanTypeInChildActivityTest extends AbstractWeldTest
{
private static final Set<Annotation> DEFAULT_BINDINGS = new HashSet<Annotation>();
@@ -115,8 +115,8 @@
@Test(groups = { "broken" }, expectedExceptions = { InjectionException.class })
public void testSameBeanTypeInChildAsIndirectParentInjection()
{
- WebBeansManager childActivity = getCurrentManager().createActivity();
- WebBeansManager grandChildActivity = childActivity.createActivity();
+ WeldManager childActivity = getCurrentManager().createActivity();
+ WeldManager grandChildActivity = childActivity.createActivity();
Bean<?> anotherMyBean = createDummyBean(grandChildActivity);
grandChildActivity.addBean(anotherMyBean);
}
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/ELCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/ELCurrentActivityTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/ELCurrentActivityTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -16,8 +16,8 @@
import javax.enterprise.inject.spi.InjectionPoint;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.manager.api.WebBeansManager;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.manager.api.WeldManager;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -26,7 +26,7 @@
*
*/
@Artifact
-public class ELCurrentActivityTest extends AbstractWebBeansTest
+public class ELCurrentActivityTest extends AbstractWeldTest
{
@@ -150,7 +150,7 @@
Context dummyContext = new DummyContext();
getCurrentManager().addContext(dummyContext);
assert getBeans(Cow.class).size() == 1;
- WebBeansManager childActivity = getCurrentManager().createActivity();
+ WeldManager childActivity = getCurrentManager().createActivity();
childActivity.addBean(new Daisy(childActivity));
childActivity.setCurrent(dummyContext.getScope());
assert evaluateValueExpression("#{daisy}", Cow.class) != null;
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/EventCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/EventCurrentActivityTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/EventCurrentActivityTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -7,7 +7,7 @@
import javax.enterprise.context.spi.CreationalContext;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -16,7 +16,7 @@
*
*/
@Artifact
-public class EventCurrentActivityTest extends AbstractWebBeansTest
+public class EventCurrentActivityTest extends AbstractWeldTest
{
@@ -57,7 +57,7 @@
{
// Context dummyContext = new DummyContext();
// getCurrentManager().addContext(dummyContext);
-// WebBeansManager childActivity = getCurrentManager().createActivity();
+// WeldManager childActivity = getCurrentManager().createActivity();
// TestableObserver<NightTime> observer = new TestableObserver<NightTime>()
// {
//
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/InactiveScopeTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/InactiveScopeTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/InactiveScopeTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -8,8 +8,8 @@
import javax.enterprise.context.spi.CreationalContext;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.manager.api.WebBeansManager;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.manager.api.WeldManager;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -18,7 +18,7 @@
*
*/
@Artifact
-public class InactiveScopeTest extends AbstractWebBeansTest
+public class InactiveScopeTest extends AbstractWeldTest
{
@@ -60,7 +60,7 @@
DummyContext dummyContext = new DummyContext();
dummyContext.setActive(false);
getCurrentManager().addContext(dummyContext);
- WebBeansManager childActivity = getCurrentManager().createActivity();
+ WeldManager childActivity = getCurrentManager().createActivity();
childActivity.setCurrent(dummyContext.getScope());
}
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/InjectedManagerCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/InjectedManagerCurrentActivityTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/InjectedManagerCurrentActivityTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -7,8 +7,8 @@
import javax.enterprise.context.spi.CreationalContext;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.manager.api.WebBeansManager;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.manager.api.WeldManager;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -17,7 +17,7 @@
*
*/
@Artifact
-public class InjectedManagerCurrentActivityTest extends AbstractWebBeansTest
+public class InjectedManagerCurrentActivityTest extends AbstractWeldTest
{
private static class DummyContext implements Context
@@ -58,7 +58,7 @@
Context dummyContext = new DummyContext();
getCurrentManager().addContext(dummyContext);
assert getBeans(Cow.class).size() == 1;
- WebBeansManager childActivity = getCurrentManager().createActivity();
+ WeldManager childActivity = getCurrentManager().createActivity();
childActivity.setCurrent(dummyContext.getScope());
assert createContextualInstance(Horse.class).getManager().equals(childActivity);
}
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/InstanceCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/InstanceCurrentActivityTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/InstanceCurrentActivityTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -16,8 +16,8 @@
import javax.enterprise.inject.spi.InjectionPoint;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.manager.api.WebBeansManager;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.manager.api.WeldManager;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -26,7 +26,7 @@
*
*/
@Artifact
-public class InstanceCurrentActivityTest extends AbstractWebBeansTest
+public class InstanceCurrentActivityTest extends AbstractWeldTest
{
public static class TameLiteral extends AnnotationLiteral<Tame> implements Tame {}
@@ -158,7 +158,7 @@
Context dummyContext = new DummyContext();
getCurrentManager().addContext(dummyContext);
assert getBeans(Cow.class).size() == 1;
- WebBeansManager childActivity = getCurrentManager().createActivity();
+ WeldManager childActivity = getCurrentManager().createActivity();
childActivity.addBean(new Daisy(childActivity));
childActivity.setCurrent(dummyContext.getScope());
assert createContextualInstance(Field.class).get() != null;
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/JndiManagerCurrentActivityTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/JndiManagerCurrentActivityTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/JndiManagerCurrentActivityTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -8,8 +8,8 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.weld.manager.api.WebBeansManager;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.manager.api.WeldManager;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -19,7 +19,7 @@
*/
@Artifact
@IntegrationTest
-public class JndiManagerCurrentActivityTest extends AbstractWebBeansTest
+public class JndiManagerCurrentActivityTest extends AbstractWeldTest
{
private static class DummyContext implements Context
@@ -60,7 +60,7 @@
Context dummyContext = new DummyContext();
getCurrentManager().addContext(dummyContext);
assert getBeans(Cow.class).size() == 1;
- WebBeansManager childActivity = getCurrentManager().createActivity();
+ WeldManager childActivity = getCurrentManager().createActivity();
childActivity.setCurrent(dummyContext.getScope());
assert createContextualInstance(Donkey.class).getManager().equals(childActivity);
}
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/NonNormalScopeTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/NonNormalScopeTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/activities/current/NonNormalScopeTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -7,12 +7,12 @@
import javax.enterprise.context.spi.CreationalContext;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.manager.api.WebBeansManager;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.manager.api.WeldManager;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class NonNormalScopeTest extends AbstractWebBeansTest
+public class NonNormalScopeTest extends AbstractWeldTest
{
private static class DummyContext implements Context
@@ -63,7 +63,7 @@
{
Context dummyContext = new NonNormalContext();
getCurrentManager().addContext(dummyContext);
- WebBeansManager childActivity = getCurrentManager().createActivity();
+ WeldManager childActivity = getCurrentManager().createActivity();
childActivity.setCurrent(dummyContext.getScope());
}
}
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/annotated/DeclaringTypeTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/annotated/DeclaringTypeTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/annotated/DeclaringTypeTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -21,7 +21,7 @@
import javax.enterprise.inject.spi.AnnotatedType;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -30,7 +30,7 @@
*
*/
@Artifact
-public class DeclaringTypeTest extends AbstractWebBeansTest
+public class DeclaringTypeTest extends AbstractWeldTest
{
@Test
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/annotated/ExampleTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/annotated/ExampleTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/annotated/ExampleTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -8,7 +8,7 @@
import javax.enterprise.inject.spi.AnnotatedType;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.Assert;
import org.testng.annotations.Test;
@@ -18,7 +18,7 @@
* @version $Revision: 1.1 $
*/
@Artifact
-public class ExampleTest extends AbstractWebBeansTest
+public class ExampleTest extends AbstractWeldTest
{
@Test
public void testAnnotatedCallableGetParameters() throws Exception
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/annotated/decoration/AnnotatedTypeDecoratorTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/annotated/decoration/AnnotatedTypeDecoratorTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/annotated/decoration/AnnotatedTypeDecoratorTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -13,7 +13,7 @@
import javax.inject.Inject;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -22,7 +22,7 @@
* @version $Revision: 1.1 $
*/
@Artifact
-public class AnnotatedTypeDecoratorTest extends AbstractWebBeansTest
+public class AnnotatedTypeDecoratorTest extends AbstractWeldTest
{
@Test
public void testAnnotationDecorator() throws Exception
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/DiscoverFailsBootstrapTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/DiscoverFailsBootstrapTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/DiscoverFailsBootstrapTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,6 +1,6 @@
package org.jboss.weld.test.unit.bootstrap;
-import org.jboss.weld.bootstrap.WebBeansBootstrap;
+import org.jboss.weld.bootstrap.WeldBootstrap;
import org.jboss.weld.bootstrap.api.Bootstrap;
import org.jboss.weld.bootstrap.api.Environments;
import org.jboss.weld.context.api.helpers.ConcurrentHashMapBeanStore;
@@ -12,7 +12,7 @@
@Test(groups="bootstrap", expectedExceptions=IllegalArgumentException.class)
public void testDiscoverFails()
{
- Bootstrap bootstrap = new WebBeansBootstrap();
+ Bootstrap bootstrap = new WeldBootstrap();
bootstrap.startContainer(Environments.SE, null, new ConcurrentHashMapBeanStore());
}
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/multipleEnterprise/BootstrapTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/multipleEnterprise/BootstrapTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/multipleEnterprise/BootstrapTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -11,12 +11,12 @@
import org.jboss.testharness.impl.packaging.PackagingType;
import org.jboss.weld.bean.RIBean;
import org.jboss.weld.bean.SessionBean;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
@Packaging(PackagingType.EAR)
-public class BootstrapTest extends AbstractWebBeansTest
+public class BootstrapTest extends AbstractWeldTest
{
@Test(groups="bootstrap")
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/multipleEnterpriseAndSimple/BootstrapTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/multipleEnterpriseAndSimple/BootstrapTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/multipleEnterpriseAndSimple/BootstrapTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -12,12 +12,12 @@
import org.jboss.weld.bean.ManagedBean;
import org.jboss.weld.bean.RIBean;
import org.jboss.weld.bean.SessionBean;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
@Packaging(PackagingType.EAR)
-public class BootstrapTest extends AbstractWebBeansTest
+public class BootstrapTest extends AbstractWeldTest
{
@Test(groups="bootstrap")
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/multipleSimple/BootstrapTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/multipleSimple/BootstrapTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/multipleSimple/BootstrapTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -9,11 +9,11 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.weld.bean.ManagedBean;
import org.jboss.weld.bean.RIBean;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class BootstrapTest extends AbstractWebBeansTest
+public class BootstrapTest extends AbstractWeldTest
{
@Test(groups="bootstrap")
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/singleEnterprise/BootstrapTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/singleEnterprise/BootstrapTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/singleEnterprise/BootstrapTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -10,12 +10,12 @@
import org.jboss.testharness.impl.packaging.Packaging;
import org.jboss.testharness.impl.packaging.PackagingType;
import org.jboss.weld.bean.RIBean;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
@Packaging(PackagingType.EAR)
-public class BootstrapTest extends AbstractWebBeansTest
+public class BootstrapTest extends AbstractWeldTest
{
@Test(groups="bootstrap")
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/singleProducerMethod/BootstrapTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/singleProducerMethod/BootstrapTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/singleProducerMethod/BootstrapTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -12,12 +12,12 @@
import org.jboss.weld.bean.ManagedBean;
import org.jboss.weld.bean.ProducerMethod;
import org.jboss.weld.bean.RIBean;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
@Packaging(PackagingType.EAR)
-public class BootstrapTest extends AbstractWebBeansTest
+public class BootstrapTest extends AbstractWeldTest
{
@Test(groups="bootstrap")
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/singleSimple/BootstrapTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/singleSimple/BootstrapTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/bootstrap/singleSimple/BootstrapTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -8,11 +8,11 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.weld.bean.RIBean;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class BootstrapTest extends AbstractWebBeansTest
+public class BootstrapTest extends AbstractWeldTest
{
@Test(groups="bootstrap")
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/ApplicationScopedTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/ApplicationScopedTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/ApplicationScopedTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -3,11 +3,11 @@
import java.util.concurrent.CountDownLatch;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class ApplicationScopedTest extends AbstractWebBeansTest
+public class ApplicationScopedTest extends AbstractWeldTest
{
@Test
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/ContextTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/ContextTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/ContextTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -2,12 +2,12 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
@IntegrationTest
-public class ContextTest extends AbstractWebBeansTest
+public class ContextTest extends AbstractWeldTest
{
// WBRI-155
@Test(description="WBRI155", groups="stub")
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/ParameterizedTypeScopedTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/ParameterizedTypeScopedTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/ParameterizedTypeScopedTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -3,11 +3,11 @@
import java.util.List;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class ParameterizedTypeScopedTest extends AbstractWebBeansTest
+public class ParameterizedTypeScopedTest extends AbstractWeldTest
{
@Test
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/PassivatingContextTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/PassivatingContextTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/context/PassivatingContextTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -10,7 +10,7 @@
import org.testng.annotations.Test;
@Artifact
-public class PassivatingContextTest extends org.jboss.weld.test.AbstractWebBeansTest
+public class PassivatingContextTest extends org.jboss.weld.test.AbstractWeldTest
{
/**
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/decorator/simple/SimpleDecoratorTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/decorator/simple/SimpleDecoratorTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/decorator/simple/SimpleDecoratorTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -2,7 +2,7 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -12,7 +12,7 @@
*/
@Artifact
@BeansXml("beans.xml")
-public class SimpleDecoratorTest extends AbstractWebBeansTest
+public class SimpleDecoratorTest extends AbstractWeldTest
{
@Test
public void testSimpleDecorator()
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/definition/ELResolverTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/definition/ELResolverTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/definition/ELResolverTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -7,25 +7,25 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.weld.mock.el.EL;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
- * Test the WebBeansELResolver and that it collaborates with the standard EL resolver chain.
+ * Test the WeldELResolver and that it collaborates with the standard EL resolver chain.
*
* @author Pete Muir
* @author Dan Allen
*/
@Artifact
-public class ELResolverTest extends AbstractWebBeansTest
+public class ELResolverTest extends AbstractWeldTest
{
/**
- * Test that the WebBeansELResolver only works to resolve the base of an EL
+ * Test that the WeldELResolver only works to resolve the base of an EL
* expression, in this case a named bean. Once the base is resolved, the
* remainder of the expression should be delegated to the standard chain of
- * property resolvers. If the WebBeansELResolver oversteps its bounds by
- * trying to resolve the property against the Web Beans namespace, the test
+ * property resolvers. If the WeldELResolver oversteps its bounds by
+ * trying to resolve the property against the Weld namespace, the test
* will fail.
*/
@Test
@@ -38,11 +38,11 @@
}
/**
- * Test that the WebBeansELResolver only works to resolve the base of an EL
+ * Test that the WeldELResolver only works to resolve the base of an EL
* expression, in this case from a producer method. Once the base is
* resolved, the remainder of the expression should be delegated to the
- * standard chain of property resolvers. If the WebBeansELResolver oversteps
- * its bounds by trying to resolve the property against the Web Beans
+ * standard chain of property resolvers. If the WeldELResolver oversteps
+ * its bounds by trying to resolve the property against the Weld
* namespace, the test will fail.
*/
@Test
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/definition/StereotypesTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/definition/StereotypesTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/definition/StereotypesTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -6,11 +6,11 @@
import org.jboss.weld.metadata.TypeStore;
import org.jboss.weld.metadata.cache.StereotypeModel;
import org.jboss.weld.resources.ClassTransformer;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class StereotypesTest extends AbstractWebBeansTest
+public class StereotypesTest extends AbstractWeldTest
{
private final ClassTransformer transformer = new ClassTransformer(new TypeStore());
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/environments/servlet/ServletLifecycleTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/environments/servlet/ServletLifecycleTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/environments/servlet/ServletLifecycleTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,7 +1,7 @@
package org.jboss.weld.test.unit.environments.servlet;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -20,7 +20,7 @@
* @author Dan Allen
*/
@Artifact
-public class ServletLifecycleTest extends AbstractWebBeansTest
+public class ServletLifecycleTest extends AbstractWeldTest
{
@Test(groups = "broken")
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/NewEnterpriseBeanTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/NewEnterpriseBeanTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/NewEnterpriseBeanTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -12,12 +12,12 @@
import org.jboss.weld.bean.SessionBean;
import org.jboss.weld.introspector.WBAnnotated;
import org.jboss.weld.literal.NewLiteral;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
@Packaging(PackagingType.EAR)
-public class NewEnterpriseBeanTest extends AbstractWebBeansTest
+public class NewEnterpriseBeanTest extends AbstractWeldTest
{
private static final New NEW_LITERAL = new NewLiteral()
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/annotatedItem/ClassAnnotatedItemTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -12,11 +12,11 @@
import org.jboss.weld.introspector.jlr.WBClassImpl;
import org.jboss.weld.metadata.TypeStore;
import org.jboss.weld.resources.ClassTransformer;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class ClassAnnotatedItemTest extends AbstractWebBeansTest
+public class ClassAnnotatedItemTest extends AbstractWeldTest
{
private final ClassTransformer transformer = new ClassTransformer(new TypeStore());
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/enterprise/EnterpriseBeanTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/enterprise/EnterpriseBeanTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/enterprise/EnterpriseBeanTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -4,13 +4,13 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Packaging;
import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
@IntegrationTest
@Packaging(PackagingType.EAR)
-public class EnterpriseBeanTest extends AbstractWebBeansTest
+public class EnterpriseBeanTest extends AbstractWeldTest
{
@Test(description="WBRI-179")
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/enterprise/lifecycle/EnterpriseBeanLifecycleTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -14,7 +14,7 @@
import org.jboss.testharness.impl.packaging.IntegrationTest;
import org.jboss.testharness.impl.packaging.Packaging;
import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -35,7 +35,7 @@
@Artifact
@Packaging(PackagingType.EAR)
@IntegrationTest
-public class EnterpriseBeanLifecycleTest extends AbstractWebBeansTest
+public class EnterpriseBeanLifecycleTest extends AbstractWeldTest
{
/**
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/event/SimpleEventTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/event/SimpleEventTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/event/SimpleEventTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -8,11 +8,11 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.weld.BeanManagerImpl;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class SimpleEventTest extends AbstractWebBeansTest
+public class SimpleEventTest extends AbstractWeldTest
{
private static boolean RECEIVE_1_OBSERVED;
private static boolean RECEIVE_2_OBSERVED;
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/event/tx/AbstractHtmlUnitTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/event/tx/AbstractHtmlUnitTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/event/tx/AbstractHtmlUnitTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -3,12 +3,12 @@
import java.util.HashSet;
import java.util.Set;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import com.gargoylesoftware.htmlunit.html.HtmlElement;
import com.gargoylesoftware.htmlunit.html.HtmlPage;
-public abstract class AbstractHtmlUnitTest extends AbstractWebBeansTest
+public abstract class AbstractHtmlUnitTest extends AbstractWeldTest
{
public AbstractHtmlUnitTest()
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/exceptions/ExceptionHandlingTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/exceptions/ExceptionHandlingTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/exceptions/ExceptionHandlingTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -4,11 +4,11 @@
import javax.enterprise.inject.CreationException;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class ExceptionHandlingTest extends AbstractWebBeansTest
+public class ExceptionHandlingTest extends AbstractWeldTest
{
@Test(expectedExceptions=FooException.class)
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/named/NamedBeanWithBindingTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/named/NamedBeanWithBindingTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/named/NamedBeanWithBindingTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -3,14 +3,14 @@
import javax.enterprise.inject.spi.Bean;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
* @author Dan Allen
*/
@Artifact(addCurrentPackage = true)
-public class NamedBeanWithBindingTest extends AbstractWebBeansTest
+public class NamedBeanWithBindingTest extends AbstractWeldTest
{
@Test
public void testGetNamedBeanWithBinding()
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/newsimple/NewSimpleBeanTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/newsimple/NewSimpleBeanTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/newsimple/NewSimpleBeanTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -9,11 +9,11 @@
import org.jboss.weld.bean.NewManagedBean;
import org.jboss.weld.introspector.WBAnnotated;
import org.jboss.weld.literal.NewLiteral;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class NewSimpleBeanTest extends AbstractWebBeansTest
+public class NewSimpleBeanTest extends AbstractWeldTest
{
private ManagedBean<WrappedSimpleBean> wrappedSimpleBean;
private NewManagedBean<WrappedSimpleBean> newSimpleBean;
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/field/ParameterizedProducerTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/field/ParameterizedProducerTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/field/ParameterizedProducerTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -4,11 +4,11 @@
import java.util.List;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class ParameterizedProducerTest extends AbstractWebBeansTest
+public class ParameterizedProducerTest extends AbstractWeldTest
{
@Test
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/DisposalMethodOnOtherBeanNotResolvedTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/DisposalMethodOnOtherBeanNotResolvedTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/DisposalMethodOnOtherBeanNotResolvedTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -4,11 +4,11 @@
import javax.enterprise.inject.spi.Bean;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class DisposalMethodOnOtherBeanNotResolvedTest extends AbstractWebBeansTest
+public class DisposalMethodOnOtherBeanNotResolvedTest extends AbstractWeldTest
{
@Test
public void test()
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/ManagerProducerTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/ManagerProducerTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/ManagerProducerTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,11 +1,11 @@
package org.jboss.weld.test.unit.implementation.producer.method;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class ManagerProducerTest extends AbstractWebBeansTest
+public class ManagerProducerTest extends AbstractWeldTest
{
@Test(description="WBRI-183")
public void testInjectManagerProducer()
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/NamedProducerTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/NamedProducerTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/NamedProducerTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -3,11 +3,11 @@
import javax.enterprise.inject.spi.Bean;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class NamedProducerTest extends AbstractWebBeansTest
+public class NamedProducerTest extends AbstractWeldTest
{
@Test
public void testNamedProducer()
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/NamedProducerWithBindingTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -7,14 +7,14 @@
import javax.enterprise.inject.spi.Bean;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
* @author Dan Allen
*/
@Artifact(addCurrentPackage = true)
-public class NamedProducerWithBindingTest extends AbstractWebBeansTest
+public class NamedProducerWithBindingTest extends AbstractWeldTest
{
@Test
public void testGetNamedProducerWithBinding()
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/NullProducerTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/NullProducerTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/producer/method/NullProducerTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,11 +1,11 @@
package org.jboss.weld.test.unit.implementation.producer.method;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class NullProducerTest extends AbstractWebBeansTest
+public class NullProducerTest extends AbstractWeldTest
{
@Test(description="WBRI-276")
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/proxy/ProxyTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/proxy/ProxyTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/proxy/ProxyTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -3,11 +3,11 @@
import javax.enterprise.inject.spi.Bean;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class ProxyTest extends AbstractWebBeansTest
+public class ProxyTest extends AbstractWeldTest
{
@Test(description="WBRI-122")
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/proxy/enterprise/EnterpriseBeanProxyTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/proxy/enterprise/EnterpriseBeanProxyTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/implementation/proxy/enterprise/EnterpriseBeanProxyTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -5,12 +5,12 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.Packaging;
import org.jboss.testharness.impl.packaging.PackagingType;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
@Packaging(PackagingType.EAR)
-public class EnterpriseBeanProxyTest extends AbstractWebBeansTest
+public class EnterpriseBeanProxyTest extends AbstractWeldTest
{
/**
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb/EnterpriseBeanInterceptionTests.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -12,14 +12,14 @@
import org.jboss.testharness.impl.packaging.PackagingType;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.jboss.weld.bean.SessionBean;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
@Packaging(PackagingType.EAR)
@BeansXml("beans.xml")
-public class EnterpriseBeanInterceptionTests extends AbstractWebBeansTest
+public class EnterpriseBeanInterceptionTests extends AbstractWeldTest
{
@Test(groups = { "interceptors"})
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTests.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTests.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/ejb3model/Ejb3InterceptionModelTests.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -21,7 +21,7 @@
import javax.enterprise.context.spi.CreationalContext;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
import org.testng.annotations.BeforeTest;
@@ -32,7 +32,7 @@
* @author Marius Bogoevici
*/
@Artifact
-public class Ejb3InterceptionModelTests extends AbstractWebBeansTest
+public class Ejb3InterceptionModelTests extends AbstractWeldTest
{
@BeforeMethod
public void reset()
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/simple/SimpleInterceptorTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/simple/SimpleInterceptorTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/interceptor/simple/SimpleInterceptorTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -20,7 +20,7 @@
import org.jboss.weld.metadata.TypeStore;
import org.jboss.weld.metadata.cache.InterceptorBindingModel;
import org.jboss.weld.resources.ClassTransformer;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.jsr299.BeansXml;
import org.testng.annotations.Test;
@@ -35,7 +35,7 @@
*/
@Artifact
@BeansXml("beans.xml")
-public class SimpleInterceptorTest extends AbstractWebBeansTest
+public class SimpleInterceptorTest extends AbstractWeldTest
{
@Test
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/LookupInstanceTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/LookupInstanceTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/LookupInstanceTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -7,11 +7,11 @@
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.weld.literal.DefaultLiteral;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class LookupInstanceTest extends AbstractWebBeansTest
+public class LookupInstanceTest extends AbstractWeldTest
{
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/Wbri256Test.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/Wbri256Test.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/Wbri256Test.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,11 +1,11 @@
package org.jboss.weld.test.unit.lookup;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class Wbri256Test extends AbstractWebBeansTest
+public class Wbri256Test extends AbstractWeldTest
{
@Test
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/circular/CircularDependencyTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/circular/CircularDependencyTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/circular/CircularDependencyTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -1,11 +1,11 @@
package org.jboss.weld.test.unit.lookup.circular;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
-public class CircularDependencyTest extends AbstractWebBeansTest
+public class CircularDependencyTest extends AbstractWeldTest
{
@Test
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri279/Wbri279Test.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri279/Wbri279Test.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri279/Wbri279Test.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -17,7 +17,7 @@
package org.jboss.weld.test.unit.lookup.wbri279;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -25,7 +25,7 @@
*
*/
@Artifact
-public class Wbri279Test extends AbstractWebBeansTest
+public class Wbri279Test extends AbstractWeldTest
{
@Test(description="WBRI-279")
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri293/ContextualReferenceTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri293/ContextualReferenceTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/lookup/wbri293/ContextualReferenceTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -17,7 +17,7 @@
package org.jboss.weld.test.unit.lookup.wbri293;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -26,7 +26,7 @@
*
*/
@Artifact
-public class ContextualReferenceTest extends AbstractWebBeansTest
+public class ContextualReferenceTest extends AbstractWeldTest
{
@Test(groups = "broken")
public void testReferencesEqual() {
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/manager/EjbDescriptorLookupTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/manager/EjbDescriptorLookupTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/manager/EjbDescriptorLookupTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -25,7 +25,7 @@
import org.jboss.weld.bean.SessionBean;
import org.jboss.weld.ejb.InternalEjbDescriptor;
import org.jboss.weld.ejb.spi.EjbDescriptor;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
/**
@@ -34,7 +34,7 @@
*/
@Artifact
@Packaging(PackagingType.EAR)
-public class EjbDescriptorLookupTest extends AbstractWebBeansTest
+public class EjbDescriptorLookupTest extends AbstractWeldTest
{
@Test
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/manager/ManagerTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/manager/ManagerTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/manager/ManagerTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -15,12 +15,12 @@
import org.jboss.testharness.impl.packaging.Packaging;
import org.jboss.weld.BeanManagerImpl;
import org.jboss.weld.literal.DefaultLiteral;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.annotations.Test;
@Artifact
@Packaging
-public class ManagerTest extends AbstractWebBeansTest
+public class ManagerTest extends AbstractWeldTest
{
private static final Set<Annotation> DEFAULT_BINDINGS = new HashSet<Annotation>();
Modified: ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/noncontextual/ExampleTest.java
===================================================================
--- ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/noncontextual/ExampleTest.java 2009-10-08 05:29:40 UTC (rev 3892)
+++ ri/trunk/tests/src/test/java/org/jboss/weld/test/unit/noncontextual/ExampleTest.java 2009-10-08 05:51:23 UTC (rev 3893)
@@ -8,12 +8,12 @@
import org.jboss.metadata.validation.ValidationException;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.weld.test.AbstractWebBeansTest;
+import org.jboss.weld.test.AbstractWeldTest;
import org.testng.Assert;
import org.testng.annotations.Test;
@Artifact
-public class ExampleTest extends AbstractWebBeansTest
+public class ExampleTest extends AbstractWeldTest
{
@Test
public void testNonContextual() throws Exception
15 years, 1 month
Weld SVN: r3892 - in ri/trunk: embedded-tck-runner and 19 other directories.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-10-08 01:29:40 -0400 (Thu, 08 Oct 2009)
New Revision: 3892
Modified:
ri/trunk/dist/build.xml
ri/trunk/dist/pom.xml
ri/trunk/embedded-tck-runner/pom.xml
ri/trunk/embedded-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties
ri/trunk/embedded-tck-runner/src/test/resources/log4j.xml
ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java
ri/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ClientProxyProvider.java
ri/trunk/impl/src/main/java/org/jboss/weld/context/AbstractMapContext.java
ri/trunk/impl/src/main/java/org/jboss/weld/conversation/JavaSEConversationTerminator.java
ri/trunk/inject-tck-runner/src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension
ri/trunk/inject-tck-runner/src/test/resources/log4j.xml
ri/trunk/inject-tck-runner/tests.xml
ri/trunk/jboss-as/build.xml
ri/trunk/jboss-tck-runner/src/test/resources/log4j.xml
ri/trunk/logging/src/test/java/org/jboss/weld/test/log/LoggingTest.java
ri/trunk/logging/src/test/resources/log4j.xml
ri/trunk/porting-package/src/main/resources/META-INF/jboss-test-harness.properties
ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/AbstractResourceServices.java
ri/trunk/spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockSecurityServices.java
ri/trunk/tests/src/main/java/org/jboss/weld/mock/MockSecurityServices.java
ri/trunk/tests/src/main/java/org/jboss/weld/mock/MockServletLifecycle.java
ri/trunk/tests/src/main/resources/META-INF/jboss-test-harness.properties
ri/trunk/tests/unit-tests.xml
Log:
bunch of miscellaneous name changes
Modified: ri/trunk/dist/build.xml
===================================================================
--- ri/trunk/dist/build.xml 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/dist/build.xml 2009-10-08 05:29:40 UTC (rev 3892)
@@ -1,42 +1,42 @@
<?xml version="1.0"?>
<project name="DistributionBuilder" default="dist" basedir="." xmlns:artifact="urn:maven-artifact-ant">
- <property name="wbri.dir" location="${ant.file.DistributionBuilder}/../../" />
+ <property name="weld.dir" location="${ant.file.DistributionBuilder}/../../" />
- <path id="maven-ant-tasks.classpath" path="${wbri.dir}/lib/maven-ant-tasks.jar" />
+ <path id="maven-ant-tasks.classpath" path="${weld.dir}/lib/maven-ant-tasks.jar" />
<typedef resource="org/apache/maven/artifact/ant/antlib.xml" uri="urn:maven-artifact-ant" classpathref="maven-ant-tasks.classpath" />
<property file="versions.properties" />
- <property name="maven.dir" location="${wbri.dir}/lib/maven" />
+ <property name="maven.dir" location="${weld.dir}/lib/maven" />
- <property name="dist.dir" value="${wbri.dir}/dist/webbeans-${webbeans.version}" />
- <property name="dist.wb.lib.dir" value="${dist.dir}/lib/webbeans" />
+ <property name="dist.dir" value="${weld.dir}/dist/weld-${weld.version}" />
+ <property name="dist.wb.lib.dir" value="${dist.dir}/lib/weld" />
<property name="dist.doc.dir" value="${dist.dir}/doc" />
<property name="dist.apidocs.dir" value="${dist.dir}/doc/apidocs" />
<target name="dist" description="Build the distribution">
- <fail unless="webbeans.version" message="You must specify the webbeans.version as a property" />
+ <fail unless="weld.version" message="You must specify the weld.version as a property" />
<fail unless="jsr299.version" message="You must specify the jsr299.version as a property" />
- <fail unless="webbeans.servlet.version" message="You must specify the webbeans.servlet.version as a property" />
- <fail unless="webbeans.se.version" message="You must specify the webbeans.se.version as a property" />
- <fail unless="webbeans.wicket.version" message="You must specify the webbeans.wicket.version as a property" />
- <fail unless="webbeans.logger.version" message="You must specify the webbeans.logger.version as a property" />
+ <fail unless="weld.servlet.version" message="You must specify the weld.servlet.version as a property" />
+ <fail unless="weld.se.version" message="You must specify the weld.se.version as a property" />
+ <fail unless="weld.wicket.version" message="You must specify the weld.wicket.version as a property" />
+ <fail unless="weld.logger.version" message="You must specify the weld.logger.version as a property" />
<fail unless="refdoc.dir" message="You must specify the reference docs directory with -Drefdoc.dir=~/workspace/wb/reference" />
<fail unless="examples.dir" message="You must specify the examples directory with -Dexamples.dir=~/workspace/wb/examples" />
- <maven target="clean" basedir="${wbri.dir}" />
+ <maven target="clean" basedir="${weld.dir}" />
<maven target="clean" basedir="${refdoc.dir}" />
<maven target="clean" basedir="${examples.dir}" />
- <delete dir="${wbri.dir}/jboss-as/target" />
- <delete dir="${wbri.dir}/impl/test-output" />
- <delete dir="${wbri.dir}/impl/ObjectStore" />
+ <delete dir="${weld.dir}/jboss-as/target" />
+ <delete dir="${weld.dir}/impl/test-output" />
+ <delete dir="${weld.dir}/impl/ObjectStore" />
<delete dir="${dist.dir}" failonerror="false"/>
<mkdir dir="${dist.dir}"/>
<copy todir="${dist.dir}">
- <fileset dir="${wbri.dir}">
+ <fileset dir="${weld.dir}">
<include name="jboss-as/**"/>
<include name="lib/**"/>
<include name="readme.txt"/>
@@ -67,27 +67,27 @@
</copy>
<maven target="clean" basedir="${refdoc.dir}" />
- <artifact:dependencies filesetId="webbeans.fileset" versionsId="webbeans.versions" sourcesfilesetid="webbeans.sources.fileset" javadocfilesetid="webbeans.javadocs.fileset">
- <dependency groupId="org.jboss.webbeans" artifactId="jsr299-api" version="${jsr299.version}"/>
- <dependency groupId="org.jboss.webbeans" artifactId="webbeans-core" version="${webbeans.version}"/>
- <dependency groupId="org.jboss.webbeans" artifactId="webbeans-spi" version="${webbeans.version}"/>
- <dependency groupId="org.jboss.webbeans" artifactId="webbeans-logger" version="${webbeans.logger.version}"/>
- <dependency groupId="org.jboss.webbeans" artifactId="webbeans-wicket" version="${webbeans.wicket.version}"/>
- <dependency groupId="org.jboss.webbeans" artifactId="webbeans-se" version="${webbeans.se.version}"/>
- <dependency groupId="org.jboss.webbeans.servlet" artifactId="webbeans-servlet" version="${webbeans.servlet.version}"/>
- <dependency groupId="org.jboss.webbeans.servlet" artifactId="webbeans-servlet-int" version="${webbeans.servlet.version}"/>
- <dependency groupId="org.jboss.webbeans.servlet" artifactId="webbeans-tomcat-support" version="${webbeans.servlet.version}"/>
+ <artifact:dependencies filesetId="weld.fileset" versionsId="weld.versions" sourcesfilesetid="weld.sources.fileset" javadocfilesetid="weld.javadocs.fileset">
+ <dependency groupId="org.jboss.weld" artifactId="jsr299-api" version="${jsr299.version}"/>
+ <dependency groupId="org.jboss.weld" artifactId="weld-core" version="${weld.version}"/>
+ <dependency groupId="org.jboss.weld" artifactId="weld-spi" version="${weld.version}"/>
+ <dependency groupId="org.jboss.weld" artifactId="weld-logger" version="${weld.logger.version}"/>
+ <dependency groupId="org.jboss.weld" artifactId="weld-wicket" version="${weld.wicket.version}"/>
+ <dependency groupId="org.jboss.weld" artifactId="weld-se" version="${weld.se.version}"/>
+ <dependency groupId="org.jboss.weld.servlet" artifactId="weld-servlet" version="${weld.servlet.version}"/>
+ <dependency groupId="org.jboss.weld.servlet" artifactId="weld-servlet-int" version="${weld.servlet.version}"/>
+ <dependency groupId="org.jboss.weld.servlet" artifactId="weld-tomcat-support" version="${weld.servlet.version}"/>
<remoteRepository id="repository.jboss.org" url="http://repository.jboss.org/maven2" />
</artifact:dependencies>
<delete dir="target" failonerror="false"/>
<mkdir dir="target" />
<copy todir="target">
- <fileset refid="webbeans.fileset"/>
- <fileset refid="webbeans.sources.fileset"/>
- <fileset refid="webbeans.javadocs.fileset"/>
+ <fileset refid="weld.fileset"/>
+ <fileset refid="weld.sources.fileset"/>
+ <fileset refid="weld.javadocs.fileset"/>
<chainedmapper>
- <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="${webbeans.versions}" to="flatten" />
+ <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="${weld.versions}" to="flatten" />
<flattenmapper />
</chainedmapper>
</copy>
@@ -96,7 +96,7 @@
<unzip dest="${dist.apidocs.dir}">
<fileset dir="target">
<include name="jsr299-api-javadoc.jar"/>
- <include name="webbeans-api-javadoc.jar"/>
+ <include name="weld-api-javadoc.jar"/>
</fileset>
</unzip>
@@ -104,25 +104,25 @@
<copy todir="${dist.wb.lib.dir}">
<fileset dir="target">
- <include name="webbeans-*.jar" />
+ <include name="weld-*.jar" />
<include name="jsr299-api*.jar" />
</fileset>
</copy>
<delete dir="target" failonerror="false"/>
- <zip destfile="webbeans-${webbeans.version}.zip">
- <fileset dir="${wbri.dir}/dist">
- <include name="webbeans-${webbeans.version}/**" />
+ <zip destfile="weld-${weld.version}.zip">
+ <fileset dir="${weld.dir}/dist">
+ <include name="weld-${weld.version}/**" />
</fileset>
</zip>
</target>
<target name="deploy-dist" depends="dist">
- <maven target="deploy:deploy-file" basedir="${wbri.dir}">
+ <maven target="deploy:deploy-file" basedir="${weld.dir}">
<arg line="-DpomFile=${basedir}/pom.xml" />
<arg line="-Dpackaging=zip" />
- <arg line="-Dversion=${webbeans.version}" />
- <arg line="-Dfile=${basedir}/webbeans-${webbeans.version}.zip" />
+ <arg line="-Dversion=${weld.version}" />
+ <arg line="-Dfile=${basedir}/weld-${weld.version}.zip" />
<arg line="-Durl=dav:https://snapshots.jboss.org/maven2" />
<arg line="-DrepositoryId=snapshots.jboss.org" />
<arg line="-DuniqueVersion=false" />
Modified: ri/trunk/dist/pom.xml
===================================================================
--- ri/trunk/dist/pom.xml 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/dist/pom.xml 2009-10-08 05:29:40 UTC (rev 3892)
@@ -3,14 +3,14 @@
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>webbeans-parent</artifactId>
- <groupId>org.jboss.webbeans</groupId>
+ <artifactId>weld-parent</artifactId>
+ <groupId>org.jboss.weld</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-distribution</artifactId>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-distribution</artifactId>
<packaging>zip</packaging>
- <name>Web Beans Distribution</name>
+ <name>Weld Distribution</name>
</project>
Modified: ri/trunk/embedded-tck-runner/pom.xml
===================================================================
--- ri/trunk/embedded-tck-runner/pom.xml 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/embedded-tck-runner/pom.xml 2009-10-08 05:29:40 UTC (rev 3892)
@@ -1,30 +1,30 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<parent>
- <artifactId>webbeans-parent</artifactId>
- <groupId>org.jboss.webbeans</groupId>
+ <artifactId>weld-parent</artifactId>
+ <groupId>org.jboss.weld</groupId>
<version>1.0.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-embedded-tck-runner</artifactId>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-embedded-tck-runner</artifactId>
<name>CDI TCK runner for JBoss Emebedded</name>
<description>Aggregates dependencies and run's the CDI TCK on JBoss Embedded</description>
<dependencies>
<dependency>
- <groupId>org.jboss.webbeans</groupId>
+ <groupId>org.jboss.weld</groupId>
<artifactId>jsr299-api</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-core</artifactId>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-core</artifactId>
</dependency>
<dependency>
- <groupId>org.jboss.webbeans</groupId>
- <artifactId>webbeans-porting-package</artifactId>
+ <groupId>org.jboss.weld</groupId>
+ <artifactId>weld-porting-package</artifactId>
</dependency>
<dependency>
Modified: ri/trunk/embedded-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties
===================================================================
--- ri/trunk/embedded-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/embedded-tck-runner/src/test/debug-resources/META-INF/jboss-test-harness.properties 2009-10-08 05:29:40 UTC (rev 3892)
@@ -1,6 +1,6 @@
# Configuration for running incontainer tests from your IDE
# Alter the path webbeans accordingly (relative from the tck/impl dir)
org.jboss.testharness.standalone=false
-org.jboss.testharness.container.extraConfigurationDir=../../webbeans/jboss-as
+org.jboss.testharness.container.extraConfigurationDir=../../weld/jboss-as
org.jboss.testharness.container.forceRestart=false
-org.jboss.testharness.runIntegrationTests=true
\ No newline at end of file
+org.jboss.testharness.runIntegrationTests=true
Modified: ri/trunk/embedded-tck-runner/src/test/resources/log4j.xml
===================================================================
--- ri/trunk/embedded-tck-runner/src/test/resources/log4j.xml 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/embedded-tck-runner/src/test/resources/log4j.xml 2009-10-08 05:29:40 UTC (rev 3892)
@@ -56,11 +56,11 @@
<!-- ############### Web Beans logging ################### -->
- <category name="org.jboss.webbeans">
+ <category name="org.jboss.weld">
<priority value="WARN"/>
</category>
- <category name="org.jboss.webbeans.tck">
+ <category name="org.jboss.weld.tck">
<priority value="INFO"/>
</category>
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractBean.java 2009-10-08 05:29:40 UTC (rev 3892)
@@ -100,7 +100,7 @@
/**
* Constructor
*
- * @param manager The Web Beans manager
+ * @param manager The Weld manager
*/
public AbstractBean(String idSuffix, BeanManagerImpl manager)
{
@@ -124,7 +124,7 @@
}
initDefaultBindings();
initPrimitive();
- log.trace("Building Web Bean bean metadata for #0", getType());
+ log.trace("Building Weld bean metadata for #0", getType());
initName();
initScopeType();
initSerializable();
@@ -338,7 +338,7 @@
*
* @return The set of binding types
*
- * @see org.jboss.webbeans.bean.BaseBean#getQualifiers()
+ * @see org.jboss.weld.bean.BaseBean#getQualifiers()
*/
public Set<Annotation> getQualifiers()
{
@@ -376,7 +376,7 @@
*
* @return The name
*
- * @see org.jboss.webbeans.bean.BaseBean#getName()
+ * @see org.jboss.weld.bean.BaseBean#getName()
*/
public String getName()
{
@@ -388,7 +388,7 @@
*
* @return The scope type
*
- * @see org.jboss.webbeans.bean.BaseBean#getScope()
+ * @see org.jboss.weld.bean.BaseBean#getScope()
*/
public Class<? extends Annotation> getScope()
{
@@ -411,7 +411,7 @@
*
* @return The set of API types
*
- * @see org.jboss.webbeans.bean.BaseBean#getTypeClosure()
+ * @see org.jboss.weld.bean.BaseBean#getTypeClosure()
*/
public Set<Type> getTypes()
{
@@ -435,7 +435,7 @@
*
* @return True if nullable, false otherwise
*
- * @see org.jboss.webbeans.bean.BaseBean#isNullable()
+ * @see org.jboss.weld.bean.BaseBean#isNullable()
*/
public boolean isNullable()
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/AbstractReceiverBean.java 2009-10-08 05:29:40 UTC (rev 3892)
@@ -93,7 +93,7 @@
}
/* (non-Javadoc)
- * @see org.jboss.webbeans.bean.AbstractBean#isPolicy()
+ * @see org.jboss.weld.bean.AbstractBean#isPolicy()
*/
@Override
public boolean isAlternative()
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ClientProxyProvider.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ClientProxyProvider.java 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/bean/proxy/ClientProxyProvider.java 2009-10-08 05:29:40 UTC (rev 3892)
@@ -36,7 +36,7 @@
*
* @author Nicklas Karlsson
*
- * @see org.jboss.webbeans.bean.proxy.ProxyMethodHandler
+ * @see org.jboss.weld.bean.proxy.ProxyMethodHandler
*/
public class ClientProxyProvider
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/context/AbstractMapContext.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/context/AbstractMapContext.java 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/context/AbstractMapContext.java 2009-10-08 05:29:40 UTC (rev 3892)
@@ -38,8 +38,8 @@
* @author Nicklas Karlsson
* @author Pete Muir
*
- * @see org.jboss.webbeans.contexts.SharedContext
- * @see org.jboss.webbeans.context.BasicContext
+ * @see org.jboss.weld.contexts.SharedContext
+ * @see org.jboss.weld.context.BasicContext
*/
public abstract class AbstractMapContext extends AbstractContext
{
Modified: ri/trunk/impl/src/main/java/org/jboss/weld/conversation/JavaSEConversationTerminator.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/weld/conversation/JavaSEConversationTerminator.java 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/impl/src/main/java/org/jboss/weld/conversation/JavaSEConversationTerminator.java 2009-10-08 05:29:40 UTC (rev 3892)
@@ -31,7 +31,7 @@
* A ConversationTerminator implementation using Java SE scheduling
*
* @author Nicklas Karlsson
- * @see org.jboss.webbeans.conversation.ConversationTerminator
+ * @see org.jboss.weld.conversation.ConversationTerminator
*/
@SessionScoped
public class JavaSEConversationTerminator implements ConversationTerminator, Serializable
Modified: ri/trunk/inject-tck-runner/src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension
===================================================================
--- ri/trunk/inject-tck-runner/src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/inject-tck-runner/src/test/resources/META-INF/services/javax.enterprise.inject.spi.Extension 2009-10-08 05:29:40 UTC (rev 3892)
@@ -1 +1 @@
-org.jboss.webbeans.atinject.tck.BeanDisambiguator
\ No newline at end of file
+org.jboss.weld.atinject.tck.BeanDisambiguator
Modified: ri/trunk/inject-tck-runner/src/test/resources/log4j.xml
===================================================================
--- ri/trunk/inject-tck-runner/src/test/resources/log4j.xml 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/inject-tck-runner/src/test/resources/log4j.xml 2009-10-08 05:29:40 UTC (rev 3892)
@@ -14,7 +14,7 @@
</filter>
<filter class="org.apache.log4j.varia.StringMatchFilter">
<param name="AcceptOnMatch" value="false" />
- <param name="StringToMatch" value="Error destroying org.jboss.webbeans.bean-test-ManagedBean-org.jboss.jsr299.tck.tests.implementation.simple.lifecycle.Cod" />
+ <param name="StringToMatch" value="Error destroying org.jboss.weld.bean-test-ManagedBean-org.jboss.jsr299.tck.tests.implementation.simple.lifecycle.Cod" />
</filter>
</appender>
@@ -56,11 +56,11 @@
<!-- ############### Web Beans logging ################### -->
- <category name="org.jboss.webbeans">
+ <category name="org.jboss.weld">
<priority value="WARN"/>
</category>
- <category name="org.jboss.webbeans.tck">
+ <category name="org.jboss.weld.tck">
<priority value="INFO"/>
</category>
Modified: ri/trunk/inject-tck-runner/tests.xml
===================================================================
--- ri/trunk/inject-tck-runner/tests.xml 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/inject-tck-runner/tests.xml 2009-10-08 05:29:40 UTC (rev 3892)
@@ -4,8 +4,8 @@
<test name="Web Beans RI" junit="true">
<classes>
- <class name="org.jboss.webbeans.atinject.tck.AtInjectTCK"></class>
+ <class name="org.jboss.weld.atinject.tck.AtInjectTCK"></class>
</classes>
</test>
-</suite>
\ No newline at end of file
+</suite>
Modified: ri/trunk/jboss-as/build.xml
===================================================================
--- ri/trunk/jboss-as/build.xml 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/jboss-as/build.xml 2009-10-08 05:29:40 UTC (rev 3892)
@@ -13,51 +13,51 @@
<delete dir="target" failonerror="false" />
</target>
- <target name="update" depends="install-webbeans.deployer, install-javassist-update" description="Update JBoss 5.x or 6.x for Web Beans" />
+ <target name="update" depends="install-weld.deployer, install-javassist-update" description="Update JBoss 5.x or 6.x for Web Beans" />
- <target name="install-webbeans.deployer">
- <echo message="Installing Web Beans ${webbeans.version} to ${jboss.home}" />
+ <target name="install-weld.deployer">
+ <echo message="Installing Weld ${weld.version} to ${jboss.home}" />
<fail unless="jboss.home" message="Please pass in -Djboss.home=..." />
- <delete dir="${jboss.home}/server/default/deployers/webbeans.deployer" failonerror="false" />
+ <delete dir="${jboss.home}/server/default/deployers/weld.deployer" failonerror="false" />
<delete dir="target" failonerror="false" />
- <artifact:dependencies filesetId="webbeans.deployer.fileset" versionsId="webbeans.deployer.versions">
- <dependency groupId="org.jboss.webbeans.integration" artifactId="webbeans-jboss-int-deployer-assembly" version="${webbeans-deployer.version}" type="zip" />
- <dependency groupId="org.jboss.webbeans" artifactId="webbeans-core" version="${webbeans.version}" />
+ <artifact:dependencies filesetId="weld.deployer.fileset" versionsId="weld.deployer.versions">
+ <dependency groupId="org.jboss.weld.integration" artifactId="weld-jboss-int-deployer-assembly" version="${weld-deployer.version}" type="zip" />
+ <dependency groupId="org.jboss.weld" artifactId="weld-core" version="${weld.version}" />
<remoteRepository id="repository.jboss.org" url="http://repository.jboss.org/maven2" />
<remoteRepository id="snapshots.jboss.org" url="http://snapshots.jboss.org/maven2" />
</artifact:dependencies>
<mkdir dir="target/dependency/lib" />
<copy todir="target/dependency/lib">
- <fileset refid="webbeans.deployer.fileset" />
+ <fileset refid="weld.deployer.fileset" />
<chainedmapper>
<flattenmapper />
- <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="${webbeans.deployer.versions}" to="flatten" />
+ <mapper classpathref="maven-ant-tasks.classpath" classname="org.apache.maven.artifact.ant.VersionMapper" from="${weld.deployer.versions}" to="flatten" />
</chainedmapper>
</copy>
- <unzip dest="target" src="target/dependency/lib/webbeans-jboss-int-deployer-assembly.zip" />
+ <unzip dest="target" src="target/dependency/lib/weld-jboss-int-deployer-assembly.zip" />
- <copy todir="target/webbeans.deployer/lib-int/" overwrite="true">
+ <copy todir="target/weld.deployer/lib-int/" overwrite="true">
<fileset dir="target/dependency/lib">
- <include name="webbeans-core.jar" />
+ <include name="weld-core.jar" />
</fileset>
</copy>
- <copy todir="target/webbeans.deployer/" overwrite="true">
+ <copy todir="target/weld.deployer/" overwrite="true">
<fileset dir="target/dependency/lib">
- <include name="webbeans-api.jar" />
+ <include name="weld-api.jar" />
<include name="jsr299-api.jar" />
- <include name="webbeans-logger.jar" />
+ <include name="weld-logger.jar" />
</fileset>
</copy>
<delete dir="target/dependency" />
- <copy todir="${jboss.home}/server/default/deployers/webbeans.deployer">
- <fileset dir="target/webbeans.deployer">
+ <copy todir="${jboss.home}/server/default/deployers/weld.deployer">
+ <fileset dir="target/weld.deployer">
<include name="**/*" />
</fileset>
</copy>
Modified: ri/trunk/jboss-tck-runner/src/test/resources/log4j.xml
===================================================================
--- ri/trunk/jboss-tck-runner/src/test/resources/log4j.xml 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/jboss-tck-runner/src/test/resources/log4j.xml 2009-10-08 05:29:40 UTC (rev 3892)
@@ -14,7 +14,7 @@
</filter>
<filter class="org.apache.log4j.varia.StringMatchFilter">
<param name="AcceptOnMatch" value="false" />
- <param name="StringToMatch" value="Error destroying org.jboss.webbeans.bean-test-ManagedBean-org.jboss.jsr299.tck.tests.implementation.simple.lifecycle.Cod" />
+ <param name="StringToMatch" value="Error destroying org.jboss.weld.bean-test-ManagedBean-org.jboss.jsr299.tck.tests.implementation.simple.lifecycle.Cod" />
</filter>
</appender>
@@ -56,11 +56,11 @@
<!-- ############### Web Beans logging ################### -->
- <category name="org.jboss.webbeans">
+ <category name="org.jboss.weld">
<priority value="WARN"/>
</category>
- <category name="org.jboss.webbeans.tck">
+ <category name="org.jboss.weld.tck">
<priority value="INFO"/>
</category>
Modified: ri/trunk/logging/src/test/java/org/jboss/weld/test/log/LoggingTest.java
===================================================================
--- ri/trunk/logging/src/test/java/org/jboss/weld/test/log/LoggingTest.java 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/logging/src/test/java/org/jboss/weld/test/log/LoggingTest.java 2009-10-08 05:29:40 UTC (rev 3892)
@@ -30,7 +30,7 @@
log.info(TEST_MSG);
assert TestAppender.getLastEvent() != null : "There was no last event in Log4j";
- assert TestAppender.getLastEvent().getLoggerName().equals("org.jboss.webbeans.test.log.LoggingTest");
+ assert TestAppender.getLastEvent().getLoggerName().equals("org.jboss.weld.test.log.LoggingTest");
assert TestAppender.getLastEvent().getRenderedMessage().equals(TEST_MSG) : "Last event has incorrect message";
}
Modified: ri/trunk/logging/src/test/resources/log4j.xml
===================================================================
--- ri/trunk/logging/src/test/resources/log4j.xml 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/logging/src/test/resources/log4j.xml 2009-10-08 05:29:40 UTC (rev 3892)
@@ -2,14 +2,14 @@
<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false">
- <appender name="CONSOLE" class="org.jboss.webbeans.test.log.TestAppender">
+ <appender name="CONSOLE" class="org.jboss.weld.test.log.TestAppender">
<layout class="org.apache.log4j.PatternLayout">
<!-- The default pattern: Date Priority [Category] Message\n -->
<param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{2}] %m%n"/>
</layout>
</appender>
- <category name="org.jboss.webbeans.test">
+ <category name="org.jboss.weld.test">
<priority value="INFO"/>
</category>
Modified: ri/trunk/porting-package/src/main/resources/META-INF/jboss-test-harness.properties
===================================================================
--- ri/trunk/porting-package/src/main/resources/META-INF/jboss-test-harness.properties 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/porting-package/src/main/resources/META-INF/jboss-test-harness.properties 2009-10-08 05:29:40 UTC (rev 3892)
@@ -1,4 +1,4 @@
-org.jboss.jsr299.tck.spi.Managers=org.jboss.webbeans.tck.ManagersImpl
-org.jboss.jsr299.tck.spi.Beans=org.jboss.webbeans.tck.BeansImpl
-org.jboss.jsr299.tck.spi.Contexts=org.jboss.webbeans.tck.ContextsImpl
-org.jboss.jsr299.tck.spi.EL=org.jboss.webbeans.tck.ELImpl
\ No newline at end of file
+org.jboss.jsr299.tck.spi.Managers=org.jboss.weld.tck.ManagersImpl
+org.jboss.jsr299.tck.spi.Beans=org.jboss.weld.tck.BeansImpl
+org.jboss.jsr299.tck.spi.Contexts=org.jboss.weld.tck.ContextsImpl
+org.jboss.jsr299.tck.spi.EL=org.jboss.weld.tck.ELImpl
Modified: ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/AbstractResourceServices.java
===================================================================
--- ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/AbstractResourceServices.java 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/spi/src/main/java/org/jboss/weld/injection/spi/helpers/AbstractResourceServices.java 2009-10-08 05:29:40 UTC (rev 3892)
@@ -12,12 +12,11 @@
import org.jboss.weld.bootstrap.api.Service;
public abstract class AbstractResourceServices implements Service
-{
-
+{
private static final String RESOURCE_LOOKUP_PREFIX = "java:/comp/env";
/* (non-Javadoc)
- * @see org.jboss.webbeans.resources.spi.helpers.ResourceServices#resolveResource(javax.inject.manager.InjectionPoint)
+ * @see org.jboss.weld.resources.spi.helpers.ResourceServices#resolveResource(javax.inject.manager.InjectionPoint)
*/
public Object resolveResource(InjectionPoint injectionPoint)
{
@@ -94,7 +93,9 @@
propertyName = getPropertyName((Method) injectionPoint.getMember());
if (propertyName == null)
{
- throw new IllegalArgumentException("Injection point represents a method which doesn't follow JavaBean conventions (unable to determine property name) " + injectionPoint);
+ throw new IllegalArgumentException(
+ "Injection point represents a method which doesn't follow " +
+ "JavaBean conventions (unable to determine property name) " + injectionPoint);
}
}
else
Modified: ri/trunk/spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockSecurityServices.java
===================================================================
--- ri/trunk/spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockSecurityServices.java 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/spi/src/test/java/org/jboss/weld/bootstrap/api/test/MockSecurityServices.java 2009-10-08 05:29:40 UTC (rev 3892)
@@ -28,7 +28,7 @@
{
/* (non-Javadoc)
- * @see org.jboss.webbeans.security.spi.SecurityServices#getPrincipal()
+ * @see org.jboss.weld.security.spi.SecurityServices#getPrincipal()
*/
public Principal getPrincipal()
{
Modified: ri/trunk/tests/src/main/java/org/jboss/weld/mock/MockSecurityServices.java
===================================================================
--- ri/trunk/tests/src/main/java/org/jboss/weld/mock/MockSecurityServices.java 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/tests/src/main/java/org/jboss/weld/mock/MockSecurityServices.java 2009-10-08 05:29:40 UTC (rev 3892)
@@ -28,7 +28,7 @@
{
/* (non-Javadoc)
- * @see org.jboss.webbeans.security.spi.SecurityServices#getPrincipal()
+ * @see org.jboss.weld.security.spi.SecurityServices#getPrincipal()
*/
public Principal getPrincipal()
{
Modified: ri/trunk/tests/src/main/java/org/jboss/weld/mock/MockServletLifecycle.java
===================================================================
--- ri/trunk/tests/src/main/java/org/jboss/weld/mock/MockServletLifecycle.java 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/tests/src/main/java/org/jboss/weld/mock/MockServletLifecycle.java 2009-10-08 05:29:40 UTC (rev 3892)
@@ -54,7 +54,7 @@
}
/* (non-Javadoc)
- * @see org.jboss.webbeans.mock.MockLifecycle#initialize()
+ * @see org.jboss.weld.mock.MockLifecycle#initialize()
*/
public void initialize()
{
@@ -85,7 +85,7 @@
}
/* (non-Javadoc)
- * @see org.jboss.webbeans.mock.MockLifecycle#beginApplication()
+ * @see org.jboss.weld.mock.MockLifecycle#beginApplication()
*/
public void beginApplication()
{
@@ -93,7 +93,7 @@
}
/* (non-Javadoc)
- * @see org.jboss.webbeans.mock.MockLifecycle#endApplication()
+ * @see org.jboss.weld.mock.MockLifecycle#endApplication()
*/
@Override
public void endApplication()
@@ -102,7 +102,7 @@
}
/* (non-Javadoc)
- * @see org.jboss.webbeans.mock.MockLifecycle#resetContexts()
+ * @see org.jboss.weld.mock.MockLifecycle#resetContexts()
*/
public void resetContexts()
{
@@ -110,7 +110,7 @@
}
/* (non-Javadoc)
- * @see org.jboss.webbeans.mock.MockLifecycle#beginRequest()
+ * @see org.jboss.weld.mock.MockLifecycle#beginRequest()
*/
public void beginRequest()
{
@@ -118,7 +118,7 @@
}
/* (non-Javadoc)
- * @see org.jboss.webbeans.mock.MockLifecycle#endRequest()
+ * @see org.jboss.weld.mock.MockLifecycle#endRequest()
*/
public void endRequest()
{
@@ -126,7 +126,7 @@
}
/* (non-Javadoc)
- * @see org.jboss.webbeans.mock.MockLifecycle#beginSession()
+ * @see org.jboss.weld.mock.MockLifecycle#beginSession()
*/
public void beginSession()
{
@@ -134,7 +134,7 @@
}
/* (non-Javadoc)
- * @see org.jboss.webbeans.mock.MockLifecycle#endSession()
+ * @see org.jboss.weld.mock.MockLifecycle#endSession()
*/
public void endSession()
{
Modified: ri/trunk/tests/src/main/resources/META-INF/jboss-test-harness.properties
===================================================================
--- ri/trunk/tests/src/main/resources/META-INF/jboss-test-harness.properties 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/tests/src/main/resources/META-INF/jboss-test-harness.properties 2009-10-08 05:29:40 UTC (rev 3892)
@@ -1 +1 @@
-org.jboss.testharness.spi.StandaloneContainers=org.jboss.webbeans.test.harness.StandaloneContainersImpl
+org.jboss.testharness.spi.StandaloneContainers=org.jboss.weld.test.harness.StandaloneContainersImpl
Modified: ri/trunk/tests/unit-tests.xml
===================================================================
--- ri/trunk/tests/unit-tests.xml 2009-10-08 05:27:34 UTC (rev 3891)
+++ ri/trunk/tests/unit-tests.xml 2009-10-08 05:29:40 UTC (rev 3892)
@@ -1,8 +1,8 @@
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
-<suite name="Web Beans RI" verbose="3" >
+<suite name="Weld" verbose="3" >
- <test name="Web Beans RI">
+ <test name="Weld">
<method-selectors>
<method-selector>
<selector-class name="org.jboss.testharness.impl.testng.DisableIntegrationTestsMethodSelector" />
@@ -18,49 +18,49 @@
</run>
</groups>
<packages>
- <package name="org.jboss.webbeans.test.examples" />
+ <package name="org.jboss.weld.test.examples" />
- <package name="org.jboss.webbeans.test.unit.activities" />
- <package name="org.jboss.webbeans.test.unit.activities.current" />
- <package name="org.jboss.webbeans.test.unit.activities.child" />
- <package name="org.jboss.webbeans.test.unit.annotated" />
- <package name="org.jboss.webbeans.test.unit.annotated.decoration" />
- <package name="org.jboss.webbeans.test.unit.bootstrap" />
- <package name="org.jboss.webbeans.test.unit.bootstrap.environments" />
- <package name="org.jboss.webbeans.test.unit.bootstrap.multipleEnterprise" />
- <package name="org.jboss.webbeans.test.unit.bootstrap.multipleEnterpriseAndSimple" />
- <package name="org.jboss.webbeans.test.unit.bootstrap.multipleSimple" />
- <package name="org.jboss.webbeans.test.unit.bootstrap.singleEnterprise" />
- <package name="org.jboss.webbeans.test.unit.bootstrap.singleProducerMethod" />
- <package name="org.jboss.webbeans.test.unit.bootstrap.singleSimple" />
- <package name="org.jboss.webbeans.test.unit.cluster" />
- <package name="org.jboss.webbeans.test.unit.context" />
- <package name="org.jboss.webbeans.test.unit.decorator.simple" />
- <package name="org.jboss.webbeans.test.unit.definition" />
- <package name="org.jboss.webbeans.test.unit.deployment.structure" />
- <package name="org.jboss.webbeans.test.unit.evironments.servlet" />
- <package name="org.jboss.webbeans.test.unit.implementation" />
- <package name="org.jboss.webbeans.test.unit.implementation.annotatedItem" />
- <package name="org.jboss.webbeans.test.unit.implementation.enterpise" />
- <package name="org.jboss.webbeans.test.unit.implementation.enterpise.lifecycle" />
- <package name="org.jboss.webbeans.test.unit.implementation.enterprise.sbi" />
- <package name="org.jboss.webbeans.test.unit.implementation.event" />
- <package name="org.jboss.webbeans.test.unit.implementation.event.tx" />
- <package name="org.jboss.webbeans.test.unit.implementation.exceptions" />
- <package name="org.jboss.webbeans.test.unit.implementation.named" />
- <package name="org.jboss.webbeans.test.unit.implementation.newsimple" />
- <package name="org.jboss.webbeans.test.unit.implementation.producer.field" />
- <package name="org.jboss.webbeans.test.unit.implementation.producer.method" />
- <package name="org.jboss.webbeans.test.unit.implementation.proxy" />
- <package name="org.jboss.webbeans.test.unit.implementation.proxy.enterprise" />
- <package name="org.jboss.webbeans.test.unit.lookup" />
- <package name="org.jboss.webbeans.test.unit.lookup.circular" />
- <package name="org.jboss.webbeans.test.unit.lookup.wbri279" />
- <package name="org.jboss.webbeans.test.unit.lookup.wbri293" />
- <package name="org.jboss.webbeans.test.unit.manager" />
- <package name="org.jboss.webbeans.test.unit.noncontextual" />
- <package name="org.jboss.webbeans.test.unit.security" />
+ <package name="org.jboss.weld.test.unit.activities" />
+ <package name="org.jboss.weld.test.unit.activities.current" />
+ <package name="org.jboss.weld.test.unit.activities.child" />
+ <package name="org.jboss.weld.test.unit.annotated" />
+ <package name="org.jboss.weld.test.unit.annotated.decoration" />
+ <package name="org.jboss.weld.test.unit.bootstrap" />
+ <package name="org.jboss.weld.test.unit.bootstrap.environments" />
+ <package name="org.jboss.weld.test.unit.bootstrap.multipleEnterprise" />
+ <package name="org.jboss.weld.test.unit.bootstrap.multipleEnterpriseAndSimple" />
+ <package name="org.jboss.weld.test.unit.bootstrap.multipleSimple" />
+ <package name="org.jboss.weld.test.unit.bootstrap.singleEnterprise" />
+ <package name="org.jboss.weld.test.unit.bootstrap.singleProducerMethod" />
+ <package name="org.jboss.weld.test.unit.bootstrap.singleSimple" />
+ <package name="org.jboss.weld.test.unit.cluster" />
+ <package name="org.jboss.weld.test.unit.context" />
+ <package name="org.jboss.weld.test.unit.decorator.simple" />
+ <package name="org.jboss.weld.test.unit.definition" />
+ <package name="org.jboss.weld.test.unit.deployment.structure" />
+ <package name="org.jboss.weld.test.unit.evironments.servlet" />
+ <package name="org.jboss.weld.test.unit.implementation" />
+ <package name="org.jboss.weld.test.unit.implementation.annotatedItem" />
+ <package name="org.jboss.weld.test.unit.implementation.enterpise" />
+ <package name="org.jboss.weld.test.unit.implementation.enterpise.lifecycle" />
+ <package name="org.jboss.weld.test.unit.implementation.enterprise.sbi" />
+ <package name="org.jboss.weld.test.unit.implementation.event" />
+ <package name="org.jboss.weld.test.unit.implementation.event.tx" />
+ <package name="org.jboss.weld.test.unit.implementation.exceptions" />
+ <package name="org.jboss.weld.test.unit.implementation.named" />
+ <package name="org.jboss.weld.test.unit.implementation.newsimple" />
+ <package name="org.jboss.weld.test.unit.implementation.producer.field" />
+ <package name="org.jboss.weld.test.unit.implementation.producer.method" />
+ <package name="org.jboss.weld.test.unit.implementation.proxy" />
+ <package name="org.jboss.weld.test.unit.implementation.proxy.enterprise" />
+ <package name="org.jboss.weld.test.unit.lookup" />
+ <package name="org.jboss.weld.test.unit.lookup.circular" />
+ <package name="org.jboss.weld.test.unit.lookup.wbri279" />
+ <package name="org.jboss.weld.test.unit.lookup.wbri293" />
+ <package name="org.jboss.weld.test.unit.manager" />
+ <package name="org.jboss.weld.test.unit.noncontextual" />
+ <package name="org.jboss.weld.test.unit.security" />
</packages>
</test>
-</suite>
\ No newline at end of file
+</suite>
15 years, 1 month
Weld SVN: r3891 - in ri/trunk/logging/src/test/java/org/jboss: weld and 2 other directories.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-10-08 01:27:34 -0400 (Thu, 08 Oct 2009)
New Revision: 3891
Added:
ri/trunk/logging/src/test/java/org/jboss/weld/
ri/trunk/logging/src/test/java/org/jboss/weld/test/
ri/trunk/logging/src/test/java/org/jboss/weld/test/log/
ri/trunk/logging/src/test/java/org/jboss/weld/test/log/LoggingTest.java
Removed:
ri/trunk/logging/src/test/java/org/jboss/webbeans/
ri/trunk/logging/src/test/java/org/jboss/weld/test/log/LoggingTest.java
Modified:
ri/trunk/logging/src/test/java/org/jboss/weld/test/log/TestAppender.java
Log:
refactored test packages
Copied: ri/trunk/logging/src/test/java/org/jboss/weld/test/log (from rev 3872, ri/trunk/logging/src/test/java/org/jboss/webbeans/test/log)
Deleted: ri/trunk/logging/src/test/java/org/jboss/weld/test/log/LoggingTest.java
===================================================================
--- ri/trunk/logging/src/test/java/org/jboss/webbeans/test/log/LoggingTest.java 2009-10-07 21:43:49 UTC (rev 3872)
+++ ri/trunk/logging/src/test/java/org/jboss/weld/test/log/LoggingTest.java 2009-10-08 05:27:34 UTC (rev 3891)
@@ -1,86 +0,0 @@
-package org.jboss.webbeans.test.log;
-
-import org.jboss.webbeans.log.Log;
-import org.jboss.webbeans.log.LogProvider;
-import org.jboss.webbeans.log.Logging;
-import org.testng.annotations.Test;
-
-/**
- * Simple tests to verify proper operation of the logging system.
- *
- * @author David Allen
- *
- */
-public class LoggingTest
-{
- private static final String TEST_MSG = "Test Message";
-
- @Test
- public void testLogProvider()
- {
- LogProvider logProvider = Logging.getLogProvider(LoggingTest.class);
- assert logProvider != null;
- }
-
- @Test
- public void testLogBasedOnClassObject()
- {
- Log log = Logging.getLog(LoggingTest.class);
- assert log != null : "No Log object returned";
-
- log.info(TEST_MSG);
- assert TestAppender.getLastEvent() != null : "There was no last event in Log4j";
- assert TestAppender.getLastEvent().getLoggerName().equals("org.jboss.webbeans.test.log.LoggingTest");
- assert TestAppender.getLastEvent().getRenderedMessage().equals(TEST_MSG) : "Last event has incorrect message";
- }
-
- @Test
- public void testLogBasedOnStringObject()
- {
- Log log = Logging.getLog("MyLogger");
- assert log != null;
-
- log.info(TEST_MSG);
- assert TestAppender.getLastEvent() != null : "There was no last event in Log4j";
- assert TestAppender.getLastEvent().getLoggerName().equals("MyLogger");
- assert TestAppender.getLastEvent().getRenderedMessage().equals(TEST_MSG) : "Last event has incorrect message";
- }
-
- @Test
- public void testLogMessageFormatting()
- {
- Log log = Logging.getLog(LoggingTest.class);
- assert log != null : "No Log object returned";
-
- log.info("Message with {0} parameters starting with {1} and including {2}", 3, "param1", "param2");
- assert TestAppender.getLastEvent() != null : "There was no last event in Log4j";
- assert TestAppender.getLastEvent().getRenderedMessage().equals("Message with 3 parameters starting with param1 and including param2");
- }
-
- @Test
- public void testLogMessageFormattingWithNullValue()
- {
- Log log = Logging.getLog(LoggingTest.class);
- assert log != null : "No Log object returned";
-
- String value = null;
- log.info("Verify we do not barf on a {0} value", value);
- assert TestAppender.getLastEvent() != null : "There was no last event in Log4j";
- assert TestAppender.getLastEvent().getRenderedMessage().equals("Verify we do not barf on a null value");
- }
-
- @Test
- public void testArrayConversion()
- {
- Log log = Logging.getLog(LoggingTest.class);
- assert log != null : "No Log object returned";
-
- String[] arr = new String[2];
- arr[0] = "foo";
- arr[1] = "bar";
-
- log.info("Message with {0} array {1}", arr, "baz");
- assert TestAppender.getLastEvent() != null : "There was no last event in Log4j";
- assert TestAppender.getLastEvent().getRenderedMessage().equals("Message with [foo, bar] array baz");
- }
-}
Copied: ri/trunk/logging/src/test/java/org/jboss/weld/test/log/LoggingTest.java (from rev 3877, ri/trunk/logging/src/test/java/org/jboss/webbeans/test/log/LoggingTest.java)
===================================================================
--- ri/trunk/logging/src/test/java/org/jboss/weld/test/log/LoggingTest.java (rev 0)
+++ ri/trunk/logging/src/test/java/org/jboss/weld/test/log/LoggingTest.java 2009-10-08 05:27:34 UTC (rev 3891)
@@ -0,0 +1,86 @@
+package org.jboss.weld.test.log;
+
+import org.jboss.weld.log.Log;
+import org.jboss.weld.log.LogProvider;
+import org.jboss.weld.log.Logging;
+import org.testng.annotations.Test;
+
+/**
+ * Simple tests to verify proper operation of the logging system.
+ *
+ * @author David Allen
+ *
+ */
+public class LoggingTest
+{
+ private static final String TEST_MSG = "Test Message";
+
+ @Test
+ public void testLogProvider()
+ {
+ LogProvider logProvider = Logging.getLogProvider(LoggingTest.class);
+ assert logProvider != null;
+ }
+
+ @Test
+ public void testLogBasedOnClassObject()
+ {
+ Log log = Logging.getLog(LoggingTest.class);
+ assert log != null : "No Log object returned";
+
+ log.info(TEST_MSG);
+ assert TestAppender.getLastEvent() != null : "There was no last event in Log4j";
+ assert TestAppender.getLastEvent().getLoggerName().equals("org.jboss.webbeans.test.log.LoggingTest");
+ assert TestAppender.getLastEvent().getRenderedMessage().equals(TEST_MSG) : "Last event has incorrect message";
+ }
+
+ @Test
+ public void testLogBasedOnStringObject()
+ {
+ Log log = Logging.getLog("MyLogger");
+ assert log != null;
+
+ log.info(TEST_MSG);
+ assert TestAppender.getLastEvent() != null : "There was no last event in Log4j";
+ assert TestAppender.getLastEvent().getLoggerName().equals("MyLogger");
+ assert TestAppender.getLastEvent().getRenderedMessage().equals(TEST_MSG) : "Last event has incorrect message";
+ }
+
+ @Test
+ public void testLogMessageFormatting()
+ {
+ Log log = Logging.getLog(LoggingTest.class);
+ assert log != null : "No Log object returned";
+
+ log.info("Message with {0} parameters starting with {1} and including {2}", 3, "param1", "param2");
+ assert TestAppender.getLastEvent() != null : "There was no last event in Log4j";
+ assert TestAppender.getLastEvent().getRenderedMessage().equals("Message with 3 parameters starting with param1 and including param2");
+ }
+
+ @Test
+ public void testLogMessageFormattingWithNullValue()
+ {
+ Log log = Logging.getLog(LoggingTest.class);
+ assert log != null : "No Log object returned";
+
+ String value = null;
+ log.info("Verify we do not barf on a {0} value", value);
+ assert TestAppender.getLastEvent() != null : "There was no last event in Log4j";
+ assert TestAppender.getLastEvent().getRenderedMessage().equals("Verify we do not barf on a null value");
+ }
+
+ @Test
+ public void testArrayConversion()
+ {
+ Log log = Logging.getLog(LoggingTest.class);
+ assert log != null : "No Log object returned";
+
+ String[] arr = new String[2];
+ arr[0] = "foo";
+ arr[1] = "bar";
+
+ log.info("Message with {0} array {1}", arr, "baz");
+ assert TestAppender.getLastEvent() != null : "There was no last event in Log4j";
+ assert TestAppender.getLastEvent().getRenderedMessage().equals("Message with [foo, bar] array baz");
+ }
+}
Modified: ri/trunk/logging/src/test/java/org/jboss/weld/test/log/TestAppender.java
===================================================================
--- ri/trunk/logging/src/test/java/org/jboss/webbeans/test/log/TestAppender.java 2009-10-07 21:43:49 UTC (rev 3872)
+++ ri/trunk/logging/src/test/java/org/jboss/weld/test/log/TestAppender.java 2009-10-08 05:27:34 UTC (rev 3891)
@@ -1,4 +1,4 @@
-package org.jboss.webbeans.test.log;
+package org.jboss.weld.test.log;
import org.apache.log4j.spi.LoggingEvent;
import org.apache.log4j.varia.NullAppender;
15 years, 1 month
Weld SVN: r3890 - in ri/trunk/tests/src/test/resources/org/jboss: weld and 13 other directories.
by weld-commits@lists.jboss.org
Author: shane.bryzak(a)jboss.com
Date: 2009-10-08 01:21:09 -0400 (Thu, 08 Oct 2009)
New Revision: 3890
Added:
ri/trunk/tests/src/test/resources/org/jboss/weld/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/examples/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/examples/beans.xml
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/bootstrap/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/bootstrap/javax.enterprise.inject.spi.Extension
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/decorator/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/decorator/simple/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/decorator/simple/beans.xml
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/faces-config.xml
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/home.xhtml
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/web.xml
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/interceptor/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/interceptor/ejb/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/interceptor/ejb/beans.xml
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/interceptor/simple/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/interceptor/simple/beans.xml
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/xml/
ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/xml/parser/
Log:
add test resources
Added: ri/trunk/tests/src/test/resources/org/jboss/weld/test/examples/beans.xml
===================================================================
--- ri/trunk/tests/src/test/resources/org/jboss/weld/test/examples/beans.xml (rev 0)
+++ ri/trunk/tests/src/test/resources/org/jboss/weld/test/examples/beans.xml 2009-10-08 05:21:09 UTC (rev 3890)
@@ -0,0 +1,5 @@
+<beans>
+ <alternatives>
+ <class>org.jboss.weld.test.examples.MockSentenceTranslator</class>
+ </alternatives>
+</beans>
Added: ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/bootstrap/javax.enterprise.inject.spi.Extension
===================================================================
--- ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/bootstrap/javax.enterprise.inject.spi.Extension (rev 0)
+++ ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/bootstrap/javax.enterprise.inject.spi.Extension 2009-10-08 05:21:09 UTC (rev 3890)
@@ -0,0 +1 @@
+org.jboss.weld.test.unit.bootstrap.InitializedObserver
Added: ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/decorator/simple/beans.xml
===================================================================
--- ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/decorator/simple/beans.xml (rev 0)
+++ ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/decorator/simple/beans.xml 2009-10-08 05:21:09 UTC (rev 3890)
@@ -0,0 +1,6 @@
+<beans>
+ <decorators>
+ <class>org.jboss.weld.test.unit.decorator.simple.SimpleDecorator1</class>
+ <class>org.jboss.weld.test.unit.decorator.simple.SimpleDecorator2</class>
+ </decorators>
+</beans>
Added: ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/faces-config.xml
===================================================================
--- ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/faces-config.xml (rev 0)
+++ ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/faces-config.xml 2009-10-08 05:21:09 UTC (rev 3890)
@@ -0,0 +1,7 @@
+<?xml version="1.0"?>
+<faces-config version="2.0"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2.0.xsd">
+
+</faces-config>
\ No newline at end of file
Added: ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/home.xhtml
===================================================================
--- ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/home.xhtml (rev 0)
+++ ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/home.xhtml 2009-10-08 05:21:09 UTC (rev 3890)
@@ -0,0 +1,33 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml"
+ xmlns:ui="http://java.sun.com/jsf/facelets"
+ xmlns:h="http://java.sun.com/jsf/html"
+ xmlns:f="http://java.sun.com/jsf/core">
+
+ <h:head>
+ <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
+ <title>JSF 2.0 Web Beans Example</title>
+ </h:head>
+
+ <h:body>
+ <h:form id="NumberGuessMain">
+ <h:panelGrid styleClass="title-panel">
+ <h:outputText value="Guess Number" styleClass="title-panel-text"/>
+ <h:outputText value="Powered By JavaServer Faces 2.0 and Web Beans" styleClass="title-panel-subtext"/>
+ </h:panelGrid>
+
+ <div style="color: black; font-size: 20px;">
+ Transactional Services
+ </div>
+
+ <h:panelGrid border="1" columns="5" style="font-size: 18px;">
+ <h:commandButton id="SaveButton" value="Save" action="#{foo.save}" />
+ </h:panelGrid>
+
+ <div style="color: red; font-size: 14px;">
+ <h:messages id="messages" globalOnly="false"/>
+ </div>l
+ </h:form>
+ </h:body>
+
+</html>
Added: ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/web.xml
===================================================================
--- ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/web.xml (rev 0)
+++ ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/implementation/event/tx/web.xml 2009-10-08 05:21:09 UTC (rev 3890)
@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.5"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
+
+ <display-name>Web Beans Test</display-name>
+
+
+ <!-- JSF -->
+
+ <servlet>
+ <servlet-name>Faces Servlet</servlet-name>
+ <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Faces Servlet</servlet-name>
+ <url-pattern>*.jsf</url-pattern>
+ </servlet-mapping>
+
+ <session-config>
+ <session-timeout>10</session-timeout>
+ </session-config>
+
+</web-app>
Added: ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/interceptor/ejb/beans.xml
===================================================================
--- ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/interceptor/ejb/beans.xml (rev 0)
+++ ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/interceptor/ejb/beans.xml 2009-10-08 05:21:09 UTC (rev 3890)
@@ -0,0 +1,6 @@
+<beans>
+ <interceptors>
+ <class>org.jboss.weld.test.unit.interceptor.ejb.Goalkeeper</class>
+ <class>org.jboss.weld.test.unit.interceptor.ejb.Defender</class>
+ </interceptors>
+</beans>
Added: ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/interceptor/simple/beans.xml
===================================================================
--- ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/interceptor/simple/beans.xml (rev 0)
+++ ri/trunk/tests/src/test/resources/org/jboss/weld/test/unit/interceptor/simple/beans.xml 2009-10-08 05:21:09 UTC (rev 3890)
@@ -0,0 +1,9 @@
+<beans>
+ <interceptors>
+ <class>org.jboss.weld.test.unit.interceptor.simple.SimpleInterceptor</class>
+ <class>org.jboss.weld.test.unit.interceptor.simple.TwoBindingsInterceptor</class>
+ </interceptors>
+ <decorators>
+ <class>org.jboss.weld.test.unit.interceptor.simple.SimpleDecorator</class>
+ </decorators>
+</beans>
15 years, 1 month