[webbeans-commits] Webbeans SVN: r299 - in ri/trunk/webbeans-ri/src: main/java/org/jboss/webbeans/bean and 4 other directories.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Thu Nov 13 05:02:35 EST 2008
Author: pete.muir at jboss.org
Date: 2008-11-13 05:02:35 -0500 (Thu, 13 Nov 2008)
New Revision: 299
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedItem.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedItem.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedItem.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedMember.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedParameterImpl.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/StereotypeModel.java
ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ClassAnnotatedItemTest.java
Log:
Consistent naming
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2008-11-13 09:55:06 UTC (rev 298)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/ManagerImpl.java 2008-11-13 10:02:35 UTC (rev 299)
@@ -199,7 +199,7 @@
throw new IllegalArgumentException("Not a binding type " + annotation);
}
}
- if (bindingTypes.length > element.getAnnotations(BindingType.class).size())
+ if (bindingTypes.length > element.getMetaAnnotations(BindingType.class).size())
{
throw new DuplicateBindingTypeException(element.toString());
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2008-11-13 09:55:06 UTC (rev 298)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2008-11-13 10:02:35 UTC (rev 299)
@@ -76,7 +76,7 @@
protected void init()
{
- mergedStereotypes = new MergedStereotypes<T, E>(getAnnotatedItem().getAnnotations(Stereotype.class), manager);
+ mergedStereotypes = new MergedStereotypes<T, E>(getAnnotatedItem().getMetaAnnotations(Stereotype.class), manager);
initType();
initPrimitive();
log.debug("Building Web Bean bean metadata for " + getType());
@@ -116,7 +116,7 @@
else if (!mergedStereotypes.isDeclaredInXml())
{
boolean specialization = getAnnotatedItem().isAnnotationPresent(Specializes.class);
- this.bindingTypes.addAll(getAnnotatedItem().getAnnotations(BindingType.class));
+ this.bindingTypes.addAll(getAnnotatedItem().getMetaAnnotations(BindingType.class));
if (specialization)
{
this.bindingTypes.addAll(getSpecializedType().getBindingTypes());
@@ -154,7 +154,7 @@
}
else
{
- Set<Annotation> deploymentTypes = getAnnotatedItem().getAnnotations(DeploymentType.class);
+ Set<Annotation> deploymentTypes = getAnnotatedItem().getMetaAnnotations(DeploymentType.class);
if (deploymentTypes.size() > 1)
{
@@ -279,14 +279,14 @@
}
else
{
- if (getAnnotatedItem().getAnnotations(ScopeType.class).size() > 1)
+ if (getAnnotatedItem().getMetaAnnotations(ScopeType.class).size() > 1)
{
throw new DefinitionException("At most one scope may be specified");
}
- if (getAnnotatedItem().getAnnotations(ScopeType.class).size() == 1)
+ if (getAnnotatedItem().getMetaAnnotations(ScopeType.class).size() == 1)
{
- this.scopeType = getAnnotatedItem().getAnnotations(ScopeType.class).iterator().next().annotationType();
+ this.scopeType = getAnnotatedItem().getMetaAnnotations(ScopeType.class).iterator().next().annotationType();
log.trace("Scope " + scopeType + " specified b annotation");
return;
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedItem.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedItem.java 2008-11-13 09:55:06 UTC (rev 298)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedItem.java 2008-11-13 10:02:35 UTC (rev 299)
@@ -29,10 +29,10 @@
* If no annotations are present which are annotated with the given meta
* annotation an empty set is returned
*/
- public Set<Annotation> getAnnotations(
+ public Set<Annotation> getMetaAnnotations(
Class<? extends Annotation> metaAnnotationType);
- public Annotation[] getAnnotationsAsArray(
+ public Annotation[] getMetaAnnotationsAsArray(
Class<? extends Annotation> metaAnnotationType);
/**
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedItem.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedItem.java 2008-11-13 09:55:06 UTC (rev 298)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedItem.java 2008-11-13 10:02:35 UTC (rev 299)
@@ -22,14 +22,14 @@
return delegate().getAnnotations();
}
- public Set<Annotation> getAnnotations(Class<? extends Annotation> metaAnnotationType)
+ public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
{
- return delegate().getAnnotations(metaAnnotationType);
+ return delegate().getMetaAnnotations(metaAnnotationType);
}
- public Annotation[] getAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
+ public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
{
- return delegate().getAnnotationsAsArray(metaAnnotationType);
+ return delegate().getMetaAnnotationsAsArray(metaAnnotationType);
}
public Set<Annotation> getBindingTypes()
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedItem.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedItem.java 2008-11-13 09:55:06 UTC (rev 298)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedItem.java 2008-11-13 10:02:35 UTC (rev 299)
@@ -82,7 +82,7 @@
return (A) annotationMap.get(annotationType);
}
- public Set<Annotation> getAnnotations(Class<? extends Annotation> metaAnnotationType)
+ public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
{
if (metaAnnotationMap == null)
{
@@ -92,12 +92,12 @@
return metaAnnotationMap.get(metaAnnotationType);
}
- public Annotation[] getAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
+ public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
{
if (annotationArray == null)
{
annotationArray = new Annotation[0];
- annotationArray = getAnnotations(metaAnnotationType).toArray(annotationArray);
+ annotationArray = getMetaAnnotations(metaAnnotationType).toArray(annotationArray);
}
return annotationArray;
}
@@ -203,9 +203,9 @@
public Set<Annotation> getBindingTypes()
{
- if (getAnnotations(BindingType.class).size() > 0)
+ if (getMetaAnnotations(BindingType.class).size() > 0)
{
- return getAnnotations(BindingType.class);
+ return getMetaAnnotations(BindingType.class);
}
else
{
@@ -215,9 +215,9 @@
public Annotation[] getBindingTypesAsArray()
{
- if (getAnnotationsAsArray(BindingType.class).length > 0)
+ if (getMetaAnnotationsAsArray(BindingType.class).length > 0)
{
- return getAnnotationsAsArray(BindingType.class);
+ return getMetaAnnotationsAsArray(BindingType.class);
}
else
{
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedMember.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedMember.java 2008-11-13 09:55:06 UTC (rev 298)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AbstractAnnotatedMember.java 2008-11-13 10:02:35 UTC (rev 299)
@@ -31,7 +31,7 @@
public T getValue(ManagerImpl manager)
{
- return manager.getInstanceByType(getType(), getAnnotationsAsArray(BindingType.class));
+ return manager.getInstanceByType(getType(), getMetaAnnotationsAsArray(BindingType.class));
}
public String getName()
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedParameterImpl.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedParameterImpl.java 2008-11-13 09:55:06 UTC (rev 298)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/jlr/AnnotatedParameterImpl.java 2008-11-13 10:02:35 UTC (rev 299)
@@ -49,7 +49,7 @@
public T getValue(ManagerImpl manager)
{
- return manager.getInstanceByType(getType(), getAnnotationsAsArray(BindingType.class));
+ return manager.getInstanceByType(getType(), getMetaAnnotationsAsArray(BindingType.class));
}
public String getName()
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/StereotypeModel.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/StereotypeModel.java 2008-11-13 09:55:06 UTC (rev 298)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/model/StereotypeModel.java 2008-11-13 10:02:35 UTC (rev 299)
@@ -42,7 +42,7 @@
private void checkBindingTypes()
{
- Set<Annotation> bindingTypes = getAnnotatedAnnotation().getAnnotations(BindingType.class);
+ Set<Annotation> bindingTypes = getAnnotatedAnnotation().getMetaAnnotations(BindingType.class);
if (bindingTypes.size() > 0)
{
throw new DefinitionException("Cannot declare binding types on a stereotype " + getAnnotatedAnnotation());
@@ -51,7 +51,7 @@
private void initInterceptorBindings()
{
- interceptorBindings = getAnnotatedAnnotation().getAnnotations(InterceptorBindingType.class);
+ interceptorBindings = getAnnotatedAnnotation().getMetaAnnotations(InterceptorBindingType.class);
}
private void initSupportedScopes()
@@ -88,7 +88,7 @@
private void initDefaultScopeType()
{
- Set<Annotation> scopeTypes = getAnnotatedAnnotation().getAnnotations(ScopeType.class);
+ Set<Annotation> scopeTypes = getAnnotatedAnnotation().getMetaAnnotations(ScopeType.class);
if (scopeTypes.size() > 1)
{
throw new DefinitionException("At most one scope type may be specified for " + getAnnotatedAnnotation());
@@ -101,7 +101,7 @@
private void initDefaultDeploymentType()
{
- Set<Annotation> deploymentTypes = getAnnotatedAnnotation().getAnnotations(DeploymentType.class);
+ Set<Annotation> deploymentTypes = getAnnotatedAnnotation().getMetaAnnotations(DeploymentType.class);
if (deploymentTypes.size() > 1)
{
throw new DefinitionException("At most one deployment type may be specified on " + getAnnotatedAnnotation());
Modified: ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ClassAnnotatedItemTest.java
===================================================================
--- ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ClassAnnotatedItemTest.java 2008-11-13 09:55:06 UTC (rev 298)
+++ ri/trunk/webbeans-ri/src/test/java/org/jboss/webbeans/test/ClassAnnotatedItemTest.java 2008-11-13 10:02:35 UTC (rev 299)
@@ -30,7 +30,7 @@
public void testMetaAnnotations()
{
AnnotatedClass<Order> annotatedElement = new AnnotatedClassImpl<Order>(Order.class);
- Set<Annotation> annotations = annotatedElement.getAnnotations(DeploymentType.class);
+ Set<Annotation> annotations = annotatedElement.getMetaAnnotations(DeploymentType.class);
assert annotations.size() == 1;
Iterator<Annotation> it = annotations.iterator();
Annotation production = it.next();
@@ -42,7 +42,7 @@
{
AnnotatedClass<Order> annotatedElement = new AnnotatedClassImpl<Order>(Order.class);
assert annotatedElement.getAnnotation(Stereotype.class) == null;
- assert annotatedElement.getAnnotations(Stereotype.class).size() == 0;
+ assert annotatedElement.getMetaAnnotations(Stereotype.class).size() == 0;
AnnotatedClass<Antelope> classWithNoAnnotations = new AnnotatedClassImpl<Antelope>(Antelope.class);
assert classWithNoAnnotations.getAnnotations().size() == 0;
}
More information about the weld-commits
mailing list