Skip to content

Commit

Permalink
Rename Annotated*
Browse files Browse the repository at this point in the history
git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@2828 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
pmuir committed Jun 12, 2009
1 parent e078c9c commit 2e25728
Show file tree
Hide file tree
Showing 72 changed files with 640 additions and 640 deletions.
16 changes: 8 additions & 8 deletions impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
Expand Up @@ -80,10 +80,10 @@
import org.jboss.webbeans.event.EventObserver;
import org.jboss.webbeans.event.ObserverImpl;
import org.jboss.webbeans.injection.NonContextualInjector;
import org.jboss.webbeans.injection.resolution.ResolvableAnnotatedClass;
import org.jboss.webbeans.injection.resolution.ResolvableWBClass;
import org.jboss.webbeans.injection.resolution.ResolvableFactory;
import org.jboss.webbeans.injection.resolution.Resolver;
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.introspector.WBAnnotated;
import org.jboss.webbeans.log.Log;
import org.jboss.webbeans.log.Logging;
import org.jboss.webbeans.manager.api.WebBeansManager;
Expand Down Expand Up @@ -450,10 +450,10 @@ public void setEnabledInterceptorClasses(List<Class<?>> enabledInterceptorClasse

public Set<Bean<?>> getBeans(Type beanType, Annotation... bindings)
{
return getBeans(ResolvableAnnotatedClass.of(beanType, bindings, this), bindings);
return getBeans(ResolvableWBClass.of(beanType, bindings, this), bindings);
}

public Set<Bean<?>> getBeans(AnnotatedItem<?, ?> element, Annotation... bindings)
public Set<Bean<?>> getBeans(WBAnnotated<?, ?> element, Annotation... bindings)
{
for (Annotation annotation : element.getAnnotations())
{
Expand Down Expand Up @@ -490,7 +490,7 @@ public Set<Bean<?>> getBeans(InjectionPoint injectionPoint)
currentInjectionPoint.get().push(injectionPoint);
}
// TODO Do this properly
return getBeans(ResolvableAnnotatedClass.of(injectionPoint.getType(), injectionPoint.getBindings().toArray(new Annotation[0]), this));
return getBeans(ResolvableWBClass.of(injectionPoint.getType(), injectionPoint.getBindings().toArray(new Annotation[0]), this));
}
finally
{
Expand Down Expand Up @@ -743,7 +743,7 @@ public Object getInjectableReference(InjectionPoint injectionPoint, CreationalCo
{
currentInjectionPoint.get().push(injectionPoint);
}
AnnotatedItem<?, ?> element = ResolvableAnnotatedClass.of(injectionPoint.getType(), injectionPoint.getBindings().toArray(new Annotation[0]), this);
WBAnnotated<?, ?> element = ResolvableWBClass.of(injectionPoint.getType(), injectionPoint.getBindings().toArray(new Annotation[0]), this);
Bean<?> resolvedBean = getBean(element, element.getBindingsAsArray());
if (getServices().get(MetaDataCache.class).getScopeModel(resolvedBean.getScopeType()).isNormal() && !Proxies.isTypeProxyable(injectionPoint.getType()))
{
Expand Down Expand Up @@ -788,11 +788,11 @@ public Object getInjectableReference(InjectionPoint injectionPoint, CreationalCo
@Deprecated
public <T> T getInstanceByType(Class<T> type, Annotation... bindings)
{
AnnotatedItem<T, ?> element = ResolvableAnnotatedClass.of(type, bindings, this);
WBAnnotated<T, ?> element = ResolvableWBClass.of(type, bindings, this);
return (T) getReference(getBean(element, bindings), type);
}

public <T> Bean<T> getBean(AnnotatedItem<T, ?> element, Annotation... bindings)
public <T> Bean<T> getBean(WBAnnotated<T, ?> element, Annotation... bindings)
{
Set<Bean<?>> beans = getBeans(element, bindings);
if (beans.size() == 0)
Expand Down
6 changes: 3 additions & 3 deletions impl/src/main/java/org/jboss/webbeans/BeanValidator.java
Expand Up @@ -45,8 +45,8 @@
import org.jboss.webbeans.bean.NewEnterpriseBean;
import org.jboss.webbeans.bean.NewSimpleBean;
import org.jboss.webbeans.bean.RIBean;
import org.jboss.webbeans.injection.resolution.ResolvableAnnotatedClass;
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.injection.resolution.ResolvableWBClass;
import org.jboss.webbeans.introspector.WBAnnotated;
import org.jboss.webbeans.metadata.MetaDataCache;
import org.jboss.webbeans.util.Beans;
import org.jboss.webbeans.util.ListComparator;
Expand Down Expand Up @@ -104,7 +104,7 @@ public void validate()
checkFacadeInjectionPoint(injectionPoint, Obtains.class, Instance.class);
checkFacadeInjectionPoint(injectionPoint, Any.class, Event.class);
Annotation[] bindings = injectionPoint.getBindings().toArray(new Annotation[0]);
AnnotatedItem<?, ?> annotatedItem = ResolvableAnnotatedClass.of(injectionPoint.getType(), bindings, manager);
WBAnnotated<?, ?> annotatedItem = ResolvableWBClass.of(injectionPoint.getType(), bindings, manager);
Set<?> resolvedBeans = manager.getBeans(injectionPoint);
if (resolvedBeans.isEmpty())
{
Expand Down
4 changes: 2 additions & 2 deletions impl/src/main/java/org/jboss/webbeans/InstanceImpl.java
Expand Up @@ -24,7 +24,7 @@
import javax.enterprise.inject.Instance;
import javax.enterprise.inject.spi.Bean;

import org.jboss.webbeans.injection.resolution.ResolvableAnnotatedClass;
import org.jboss.webbeans.injection.resolution.ResolvableWBClass;

/**
* Helper implementation for Instance for getting instances
Expand All @@ -51,7 +51,7 @@ private InstanceImpl(Type type, BeanManagerImpl manager, Set<Annotation> binding
public T get(Annotation... bindings)
{
Annotation[] annotations = mergeInBindings(bindings);
Bean<T> bean = getManager().getBean(ResolvableAnnotatedClass.<T>of(getType(), annotations, getManager()), annotations);
Bean<T> bean = getManager().getBean(ResolvableWBClass.<T>of(getType(), annotations, getManager()), annotations);

@SuppressWarnings("unchecked")
T instance = (T) getManager().getReference(bean, getType());
Expand Down
30 changes: 15 additions & 15 deletions impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
Expand Up @@ -39,10 +39,10 @@
import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
import org.jboss.webbeans.context.DependentInstancesStore;
import org.jboss.webbeans.conversation.ConversationImpl;
import org.jboss.webbeans.injection.AnnotatedInjectionPoint;
import org.jboss.webbeans.introspector.AnnotatedField;
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.introspector.AnnotatedParameter;
import org.jboss.webbeans.injection.WBInjectionPoint;
import org.jboss.webbeans.introspector.WBField;
import org.jboss.webbeans.introspector.WBAnnotated;
import org.jboss.webbeans.introspector.WBParameter;
import org.jboss.webbeans.literal.AnyLiteral;
import org.jboss.webbeans.literal.CurrentLiteral;
import org.jboss.webbeans.log.LogProvider;
Expand Down Expand Up @@ -112,7 +112,7 @@ public static Class<? extends Annotation> getDeploymentType(List<Class<? extends
// The API types
protected Set<Type> types;
// The injection points
protected Set<AnnotatedInjectionPoint<?, ?>> injectionPoints;
protected Set<WBInjectionPoint<?, ?>> injectionPoints;
// If the type a primitive?
private boolean primitive;
// The Web Beans manager
Expand All @@ -122,7 +122,7 @@ public static Class<? extends Annotation> getDeploymentType(List<Class<? extends

private boolean initialized;

private Set<AnnotatedInjectionPoint<?, ?>> decoratesInjectionPoint;
private Set<WBInjectionPoint<?, ?>> decoratesInjectionPoint;

protected boolean isInitialized()
{
Expand All @@ -138,7 +138,7 @@ public AbstractBean(BeanManagerImpl manager)
{
super(manager);
this.manager = manager;
injectionPoints = new HashSet<AnnotatedInjectionPoint<?, ?>>();
injectionPoints = new HashSet<WBInjectionPoint<?, ?>>();
dependentInstancesStore = new DependentInstancesStore();
}

Expand Down Expand Up @@ -181,8 +181,8 @@ protected void checkDecorates()

protected void initDecorates()
{
this.decoratesInjectionPoint = new HashSet<AnnotatedInjectionPoint<?,?>>();
for (AnnotatedInjectionPoint<?, ?> injectionPoint : getAnnotatedInjectionPoints())
this.decoratesInjectionPoint = new HashSet<WBInjectionPoint<?,?>>();
for (WBInjectionPoint<?, ?> injectionPoint : getAnnotatedInjectionPoints())
{
if (injectionPoint.isAnnotationPresent(Decorates.class))
{
Expand All @@ -191,7 +191,7 @@ protected void initDecorates()
}
}

protected Set<AnnotatedInjectionPoint<?, ?>> getDecoratesInjectionPoint()
protected Set<WBInjectionPoint<?, ?>> getDecoratesInjectionPoint()
{
return decoratesInjectionPoint;
}
Expand Down Expand Up @@ -297,13 +297,13 @@ protected void initPrimitive()
private boolean checkInjectionPointsAreSerializable()
{
boolean passivating = manager.getServices().get(MetaDataCache.class).getScopeModel(this.getScopeType()).isPassivating();
for (AnnotatedInjectionPoint<?, ?> injectionPoint : getAnnotatedInjectionPoints())
for (WBInjectionPoint<?, ?> injectionPoint : getAnnotatedInjectionPoints())
{
Annotation[] bindings = injectionPoint.getMetaAnnotationsAsArray(BindingType.class);
Bean<?> resolvedBean = manager.getBeans(injectionPoint.getRawType(), bindings).iterator().next();
if (passivating)
{
if (Dependent.class.equals(resolvedBean.getScopeType()) && !resolvedBean.isSerializable() && (((injectionPoint instanceof AnnotatedField) && !((AnnotatedField<?>) injectionPoint).isTransient()) || (injectionPoint instanceof AnnotatedParameter)) )
if (Dependent.class.equals(resolvedBean.getScopeType()) && !resolvedBean.isSerializable() && (((injectionPoint instanceof WBField) && !((WBField<?>) injectionPoint).isTransient()) || (injectionPoint instanceof WBParameter)) )
{
return false;
}
Expand Down Expand Up @@ -398,7 +398,7 @@ protected void specialize(BeanDeployerEnvironment environment)
*
* @return The annotated item
*/
protected abstract AnnotatedItem<T, E> getAnnotatedItem();
protected abstract WBAnnotated<T, E> getAnnotatedItem();

/**
* Gets the binding types
Expand Down Expand Up @@ -435,7 +435,7 @@ public Class<? extends Annotation> getDeploymentType()
}

@Override
public Set<AnnotatedInjectionPoint<?, ?>> getAnnotatedInjectionPoints()
public Set<WBInjectionPoint<?, ?>> getAnnotatedInjectionPoints()
{
return injectionPoints;
}
Expand Down Expand Up @@ -504,7 +504,7 @@ public Set<Type> getTypes()
* @param annotatedItem The other annotation to check
* @return True if assignable, otherwise false
*/
public boolean isAssignableFrom(AnnotatedItem<?, ?> annotatedItem)
public boolean isAssignableFrom(WBAnnotated<?, ?> annotatedItem)
{
return this.getAnnotatedItem().isAssignableFrom(annotatedItem);
}
Expand Down
22 changes: 11 additions & 11 deletions impl/src/main/java/org/jboss/webbeans/bean/AbstractClassBean.java
Expand Up @@ -37,9 +37,9 @@
import org.jboss.webbeans.injection.FieldInjectionPoint;
import org.jboss.webbeans.injection.MethodInjectionPoint;
import org.jboss.webbeans.injection.ParameterInjectionPoint;
import org.jboss.webbeans.introspector.AnnotatedClass;
import org.jboss.webbeans.introspector.AnnotatedMethod;
import org.jboss.webbeans.introspector.AnnotatedParameter;
import org.jboss.webbeans.introspector.WBClass;
import org.jboss.webbeans.introspector.WBMethod;
import org.jboss.webbeans.introspector.WBParameter;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
import org.jboss.webbeans.util.Beans;
Expand All @@ -58,7 +58,7 @@ public abstract class AbstractClassBean<T> extends AbstractBean<T, Class<T>>
// Logger
private static final LogProvider log = Logging.getLogProvider(AbstractClassBean.class);
// The item representation
protected AnnotatedClass<T> annotatedItem;
protected WBClass<T> annotatedItem;
// The injectable fields
private Set<FieldInjectionPoint<?>> injectableFields;
// The initializer methods
Expand All @@ -73,7 +73,7 @@ public abstract class AbstractClassBean<T> extends AbstractBean<T, Class<T>>
* @param type The type
* @param manager The Web Beans manager
*/
protected AbstractClassBean(AnnotatedClass<T> type, BeanManagerImpl manager)
protected AbstractClassBean(WBClass<T> type, BeanManagerImpl manager)
{
super(manager);
this.annotatedItem = type;
Expand Down Expand Up @@ -139,9 +139,9 @@ protected void initInjectionPoints()
{
injectableFields = new HashSet<FieldInjectionPoint<?>>(Beans.getFieldInjectionPoints(annotatedItem, this));
super.injectionPoints.addAll(injectableFields);
for (AnnotatedMethod<?> initializer : getInitializerMethods())
for (WBMethod<?> initializer : getInitializerMethods())
{
for (AnnotatedParameter<?> parameter : initializer.getParameters())
for (WBParameter<?> parameter : initializer.getParameters())
{
injectionPoints.add(ParameterInjectionPoint.of(this, parameter));
}
Expand All @@ -154,7 +154,7 @@ protected void initInjectionPoints()
protected void initInitializerMethods()
{
initializerMethods = new HashSet<MethodInjectionPoint<?>>();
for (AnnotatedMethod<?> method : annotatedItem.getAnnotatedMethods(Initializer.class))
for (WBMethod<?> method : annotatedItem.getAnnotatedMethods(Initializer.class))
{
if (method.isStatic())
{
Expand Down Expand Up @@ -182,7 +182,7 @@ else if (method.getAnnotatedParameters(Observes.class).size() > 0)
@Override
protected void initScopeType()
{
for (AnnotatedClass<?> clazz = getAnnotatedItem(); clazz != null; clazz = clazz.getSuperclass())
for (WBClass<?> clazz = getAnnotatedItem(); clazz != null; clazz = clazz.getSuperclass())
{
Set<Annotation> scopeTypes = clazz.getDeclaredMetaAnnotations(ScopeType.class);
scopeTypes = clazz.getDeclaredMetaAnnotations(ScopeType.class);
Expand Down Expand Up @@ -216,7 +216,7 @@ else if (scopeTypes.size() > 1)
@Override
protected void initDeploymentType()
{
for (AnnotatedClass<?> clazz = getAnnotatedItem(); clazz != null; clazz = clazz.getSuperclass())
for (WBClass<?> clazz = getAnnotatedItem(); clazz != null; clazz = clazz.getSuperclass())
{
Set<Annotation> deploymentTypes = clazz.getDeclaredMetaAnnotations(DeploymentType.class);
if (deploymentTypes.size() == 1)
Expand Down Expand Up @@ -284,7 +284,7 @@ protected void preSpecialize(BeanDeployerEnvironment environment)
* @return The annotated item
*/
@Override
public AnnotatedClass<T> getAnnotatedItem()
public WBClass<T> getAnnotatedItem()
{
return annotatedItem;
}
Expand Down
Expand Up @@ -43,7 +43,7 @@
import org.jboss.webbeans.context.CreationalContextImpl;
import org.jboss.webbeans.context.DependentContext;
import org.jboss.webbeans.context.DependentStorageRequest;
import org.jboss.webbeans.introspector.AnnotatedMember;
import org.jboss.webbeans.introspector.WBMember;
import org.jboss.webbeans.log.LogProvider;
import org.jboss.webbeans.log.Logging;
import org.jboss.webbeans.metadata.MetaDataCache;
Expand Down Expand Up @@ -79,7 +79,7 @@ public AbstractProducerBean(AbstractClassBean<?> declaringBean, BeanManagerImpl
}

@Override
protected abstract AnnotatedMember<T, S> getAnnotatedItem();
protected abstract WBMember<T, S> getAnnotatedItem();

/**
* Gets the deployment types
Expand Down
14 changes: 7 additions & 7 deletions impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java
Expand Up @@ -14,10 +14,10 @@

import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.bootstrap.BeanDeployerEnvironment;
import org.jboss.webbeans.injection.AnnotatedInjectionPoint;
import org.jboss.webbeans.injection.WBInjectionPoint;
import org.jboss.webbeans.injection.MethodInjectionPoint;
import org.jboss.webbeans.introspector.AnnotatedClass;
import org.jboss.webbeans.introspector.AnnotatedItem;
import org.jboss.webbeans.introspector.WBClass;
import org.jboss.webbeans.introspector.WBAnnotated;

public class DecoratorBean<T> extends SimpleBean<T> implements Decorator<T>
{
Expand Down Expand Up @@ -56,17 +56,17 @@ protected Decorator<T> delegate()
* @param manager the current manager
* @return a Bean
*/
public static <T> DecoratorBean<T> of(AnnotatedClass<T> clazz, BeanManagerImpl manager)
public static <T> DecoratorBean<T> of(WBClass<T> clazz, BeanManagerImpl manager)
{
return new DecoratorBean<T>(clazz, manager);
}

private AnnotatedItem<?, ?> decorates;
private WBAnnotated<?, ?> decorates;
private Set<Annotation> delegateBindings;
private Type delegateType;
private Set<Type> decoratedTypes;

protected DecoratorBean(AnnotatedClass<T> type, BeanManagerImpl manager)
protected DecoratorBean(WBClass<T> type, BeanManagerImpl manager)
{
super(type, manager);
}
Expand Down Expand Up @@ -99,7 +99,7 @@ protected void initDelegate()
@Override
protected void checkDecorates()
{
for (AnnotatedInjectionPoint<?, ?> injectionPoint : getDecoratesInjectionPoint())
for (WBInjectionPoint<?, ?> injectionPoint : getDecoratesInjectionPoint())
{
if (injectionPoint instanceof MethodInjectionPoint && !injectionPoint.isAnnotationPresent(Initializer.class))
{
Expand Down

0 comments on commit 2e25728

Please sign in to comment.