Author: dallen6
Date: 2009-07-29 15:32:58 -0400 (Wed, 29 Jul 2009)
New Revision: 3352
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
Log:
Finished implementation of getStereotypes() on Bean
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-07-29
14:45:28 UTC (rev 3351)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/AbstractBean.java 2009-07-29
19:32:58 UTC (rev 3352)
@@ -539,4 +539,14 @@
return getAnnotatedItem().isAnnotationPresent(Specializes.class);
}
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ Set<Class<? extends Annotation>> stereotypes = new
HashSet<Class<? extends Annotation>>();
+ for (Annotation stereotypeAnnotation :
getAnnotatedItem().getMetaAnnotations(Stereotype.class))
+ {
+ stereotypes.add(stereotypeAnnotation.annotationType());
+ }
+ return stereotypes;
+ }
+
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java 2009-07-29
14:45:28 UTC (rev 3351)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/DecoratorBean.java 2009-07-29
19:32:58 UTC (rev 3352)
@@ -61,11 +61,6 @@
return decorator;
}
- public Set<Class<? extends Annotation>> getStereotypes()
- {
- return decorator.getStereotypes();
- }
-
};
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java 2009-07-29
14:45:28 UTC (rev 3351)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/ForwardingBean.java 2009-07-29
19:32:58 UTC (rev 3352)
@@ -113,6 +113,16 @@
}
/**
+ * The stereotypes applied to this bean
+ *
+ * @return stereotypes if any
+ */
+ public Set<Class<? extends Annotation>> getStereotypes()
+ {
+ return delegate().getStereotypes();
+ }
+
+ /**
* Gets the scope type of the delegate
*
* @return The scope type
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-07-29
14:45:28 UTC (rev 3351)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/bean/SimpleBean.java 2009-07-29
19:32:58 UTC (rev 3352)
@@ -553,10 +553,4 @@
return false;
}
- public Set<Class<? extends Annotation>> getStereotypes()
- {
- // TODO Auto-generated method stub
- return null;
- }
-
}
Show replies by date