[webbeans-commits] Webbeans SVN: r121 - in ri/trunk/webbeans-api/src/main/java/javax/webbeans: manager and 1 other directory.

webbeans-commits at lists.jboss.org webbeans-commits at lists.jboss.org
Mon Oct 20 14:15:46 EDT 2008


Author: pete.muir at jboss.org
Date: 2008-10-20 14:15:46 -0400 (Mon, 20 Oct 2008)
New Revision: 121

Added:
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observer.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/EnterpriseBeanLookup.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Initialized.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/InterceptionType.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Interceptor.java
Removed:
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/EnterpriseBeanLookup.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Model.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Conversation.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Observer.java
Modified:
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/ApplicationScoped.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/BindingType.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/ConversationScoped.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Current.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorates.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorator.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Dependent.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/DeploymentType.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Disposes.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Event.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/IfExists.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Initializer.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/InterceptorBindingType.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Named.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/New.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observable.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observes.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Produces.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Production.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/RequestScoped.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/ScopeType.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/SessionScoped.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Specializes.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/Standard.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/TypeLiteral.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java
   ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java
Log:
Lots of API updates, Gavin is now going to keep this up to date :-)

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,19 +1,19 @@
 /*
-* 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.
-*/
+ * 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 javax.webbeans;
 
@@ -31,5 +31,6 @@
  */
 @Retention(RUNTIME)
 @Target(PARAMETER)
-public @interface AfterTransactionCompletion {
+public @interface AfterTransactionCompletion
+{
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,19 +1,19 @@
 /*
-* 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.
-*/
+ * 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 javax.webbeans;
 
@@ -31,5 +31,6 @@
  */
 @Retention(RUNTIME)
 @Target(PARAMETER)
-public @interface AfterTransactionFailure {
+public @interface AfterTransactionFailure
+{
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,19 +1,19 @@
 /*
-* 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.
-*/
+ * 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 javax.webbeans;
 
@@ -31,5 +31,6 @@
  */
 @Retention(RUNTIME)
 @Target(PARAMETER)
-public @interface AfterTransactionSuccess {
+public @interface AfterTransactionSuccess
+{
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -18,8 +18,13 @@
 package javax.webbeans;
 
 /**
+ * Supports inline instantiation of annotation types.
+ * 
  * @author Pete Muir
- * @author Gavin King 
+ * @author Gavin King
+ * 
+ *  @param <T>
+ *            the annotation type
  */
 import java.lang.annotation.Annotation;
 import java.lang.reflect.ParameterizedType;

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/ApplicationScoped.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/ApplicationScoped.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/ApplicationScoped.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -26,7 +26,10 @@
 import java.lang.annotation.Target;
 
 /**
+ * Specifies that a Web Bean is application scoped.
  * 
+ * @author Gavin King
+ * 
  * @author Pete Muir
  */
 

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -31,5 +31,6 @@
  */
 @Retention(RUNTIME)
 @Target(PARAMETER)
-public @interface BeforeTransactionCompletion {
+public @interface BeforeTransactionCompletion
+{
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/BindingType.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/BindingType.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/BindingType.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -26,8 +26,7 @@
 
 /**
  * 
- * Specifies that an annotation type is a Web Beans
- * binding type.
+ * Specifies that an annotation type is a Web Beans binding type.
  * 
  * @author Pete Muir
  * @author Gavin King
@@ -38,5 +37,4 @@
 @Documented
 public @interface BindingType
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/ConversationScoped.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/ConversationScoped.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/ConversationScoped.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -26,15 +26,16 @@
 import java.lang.annotation.Target;
 
 /**
+ * Specifies that a Web Bean is conversation scoped.
  * 
+ * @author Gavin King
  * @author Pete Muir
  */
 
 @Target( { TYPE, METHOD })
 @Retention(RUNTIME)
 @Documented
- at ScopeType
+ at ScopeType(passivating = true)
 public @interface ConversationScoped
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Current.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Current.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Current.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -28,6 +28,7 @@
 import java.lang.annotation.Target;
 
 /**
+ * The default binding type.
  * 
  * @author Pete Muir
  */
@@ -38,5 +39,4 @@
 @BindingType
 public @interface Current
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorates.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorates.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorates.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -25,7 +25,7 @@
 import java.lang.annotation.Target;
 
 /**
- * Specifies that a field of a decorator class is the delegate.
+ * Specifies that a field of a decorator class is the delegate attribute.
  * 
  * @author Gavin King
  * @author Pete Muir
@@ -36,5 +36,4 @@
 @Documented
 public @interface Decorates
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorator.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorator.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Decorator.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -25,7 +25,7 @@
 import java.lang.annotation.Target;
 
 /**
- * Specifies that a class is a decorator.
+ * Specifies that a class is a Web Beans decorator.
  * 
  * @author Gavin King
  * @author Pete Muir
@@ -34,7 +34,7 @@
 @Target(TYPE)
 @Retention(RUNTIME)
 @Documented
+ at Stereotype
 public @interface Decorator
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Dependent.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Dependent.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Dependent.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -26,15 +26,16 @@
 import java.lang.annotation.Target;
 
 /**
+ * Specifies that a Web Bean is dependent scoped.
  * 
+ * @author Gavin King
  * @author Pete Muir
  */
 
 @Target( { METHOD, TYPE })
 @Retention(RUNTIME)
 @Documented
- at ScopeType
+ at ScopeType(normal = false)
 public @interface Dependent
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/DeploymentType.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/DeploymentType.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/DeploymentType.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -25,8 +25,7 @@
 import java.lang.annotation.Target;
 
 /**
- * Specifies that an annotation type is a Web Beans
- * component type.
+ * Specifies that an annotation type is a Web Beans deployment type.
  * 
  * @author Gavin King
  * @author Pete Muir
@@ -37,5 +36,4 @@
 @Documented
 public @interface DeploymentType
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,21 +1,20 @@
 /*
-* 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.
-*/
+ * 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 javax.webbeans;
 
 import static java.lang.annotation.ElementType.METHOD;
@@ -25,13 +24,14 @@
 import java.lang.annotation.Target;
 
 /**
- * Specifies that a method of a Web Bean component implementation class is a Web
- * Beans remove method.
+ * Specifies that a method of a Web Bean implementation class is a Web Beans
+ * remove method.
  * 
  * @author Gavin King
  * 
  */
 @Retention(RUNTIME)
 @Target(METHOD)
-public @interface Destructor {
+public @interface Destructor
+{
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Disposes.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Disposes.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Disposes.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -25,9 +25,8 @@
 import java.lang.annotation.Target;
 
 /**
- * Specifies that a parameter of a method of a Web Bean 
- * component implementation class is the parameter of
- * a disposal method.
+ * Specifies that a parameter of a method of a Web Bean implementation class
+ * class is the disposed parameter of a disposal method.
  * 
  * @author Gavin King
  * @author Pete Muir

Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/EnterpriseBeanLookup.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/EnterpriseBeanLookup.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/EnterpriseBeanLookup.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,8 +0,0 @@
-package javax.webbeans;
-
-public interface EnterpriseBeanLookup
-{
-   
-   public Object lookup(String ejbName);
-
-}

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Event.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Event.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Event.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -19,11 +19,15 @@
 
 import java.lang.annotation.Annotation;
 
-import javax.webbeans.manager.Observer;
-
 /**
+ * An interface for firing events of a particular type, and registering
+ * observers for events of that type.
  * 
+ * @author Gavin King
  * @author Pete Muir
+ * 
+ * @param <T>
+*            the type of the event object
  */
 
 public interface Event<T>
@@ -31,6 +35,6 @@
 
    public void fire(T event, Annotation... bindings);
    
-   public void observes(Observer<T> observe, Annotation... bindings);
+   public void observe(Observer<T> observer, Annotation... bindings);
    
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/IfExists.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/IfExists.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/IfExists.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -37,5 +37,4 @@
 @Documented
 public @interface IfExists
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Initializer.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Initializer.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Initializer.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,19 +1,19 @@
 /*
-* 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.
-*/
+ * 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 javax.webbeans;
 
@@ -26,18 +26,16 @@
 import java.lang.annotation.Target;
 
 /**
- * Specifies that a method of a Web Bean component
- * implementation class is a Web Beans initializer method, 
- * or that a constructor is the Web Bean component constructor.
+ * Specifies that a method of a Web Bean implementation class is a Web Beans
+ * initializer method, or that a constructor is the Web Bean constructor.
  * 
  * @author Gavin King
  * @author Pete Muir
  */
 
- at Target({METHOD,CONSTRUCTOR})
+ at Target( { METHOD, CONSTRUCTOR })
 @Retention(RUNTIME)
 @Documented
 public @interface Initializer
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,21 +1,20 @@
 /*
-* 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.
-*/
+ * 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 javax.webbeans;
 
 import static java.lang.annotation.ElementType.TYPE;
@@ -25,12 +24,14 @@
 import java.lang.annotation.Target;
 
 /**
- * Specifies that a class is an interceptor.
+ * Specifies that a class is a Web Beans interceptor.
  * 
  * @author Gavin King
  * 
  */
 @Retention(RUNTIME)
 @Target(TYPE)
-public @interface Interceptor {
+ at Stereotype
+public @interface Interceptor
+{
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/InterceptorBindingType.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/InterceptorBindingType.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/InterceptorBindingType.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -37,5 +37,4 @@
 @Documented
 public @interface InterceptorBindingType
 {
-
 }

Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Model.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Model.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Model.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -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 javax.webbeans;
-
-import static java.lang.annotation.ElementType.METHOD;
-import static java.lang.annotation.ElementType.TYPE;
-import static java.lang.annotation.RetentionPolicy.RUNTIME;
-
-import java.lang.annotation.Documented;
-import java.lang.annotation.Retention;
-import java.lang.annotation.Target;
-
-/**
- * 
- * @author Pete Muir
- */
-
- at Named
- at RequestScoped
- at Production
- at Stereotype
- at Target( { TYPE, METHOD })
- at Retention(RUNTIME)
- at Documented
-public @interface Model
-{
-
-}

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Named.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Named.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Named.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,19 +1,19 @@
 /*
-* 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.
-*/
+ * 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 javax.webbeans;
 
@@ -26,7 +26,7 @@
 import java.lang.annotation.Target;
 
 /**
- * Specifies the Web Beans component name.
+ * Specifies the name of a Web Bean.
  * 
  * @author Gavin King
  * @author Pete Muir
@@ -38,6 +38,12 @@
 public @interface Named
 {
 
+   /**
+    * If no name is explicitly specified, the default name is used.
+    * 
+    * @return the component name
+    */
+
    public String value() default "";
 
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/New.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/New.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/New.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -18,9 +18,7 @@
 package javax.webbeans;
 
 import static java.lang.annotation.ElementType.FIELD;
-import static java.lang.annotation.ElementType.METHOD;
 import static java.lang.annotation.ElementType.PARAMETER;
-import static java.lang.annotation.ElementType.TYPE;
 import static java.lang.annotation.RetentionPolicy.RUNTIME;
 
 import java.lang.annotation.Documented;
@@ -34,11 +32,10 @@
  * @author Pete Muir
  */
 
- at Target( { METHOD, FIELD, PARAMETER, TYPE })
+ at Target( { FIELD, PARAMETER, })
 @Retention(RUNTIME)
 @Documented
 @BindingType
 public @interface New
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,21 +1,20 @@
 /*
-* 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.
-*/
+ * 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 javax.webbeans;
 
 import static java.lang.annotation.ElementType.METHOD;
@@ -33,5 +32,6 @@
  */
 @Retention(RUNTIME)
 @Target(METHOD)
-public @interface NonBinding {
+public @interface NonBinding
+{
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observable.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observable.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observable.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -40,5 +40,4 @@
 @Documented
 public @interface Observable
 {
-
 }

Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observer.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observer.java	                        (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observer.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -0,0 +1,13 @@
+package javax.webbeans;
+
+/**
+ * The contract between the Web Bean manager and a Web Beans observer object.
+ * This interface should not be called directly by the application.
+ * 
+ * @author Gavin King
+ * 
+ */
+public interface Observer<T>
+{
+   public void notify(T event);
+}
\ No newline at end of file


Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observer.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observes.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observes.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Observes.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -26,7 +26,7 @@
 
 /**
  * Specifies that a parameter of a method of a Web Bean 
- * component implementation class is the event parameter 
+ * implementation class is the event parameter 
  * of an observer method.
  * 
  * @author Gavin King
@@ -38,5 +38,4 @@
 @Documented
 public @interface Observes
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Produces.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Produces.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Produces.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,19 +1,19 @@
 /*
-* 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.
-*/
+ * 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 javax.webbeans;
 
@@ -26,8 +26,8 @@
 
 /**
  * 
- * Specifies that a method of a Web Bean component
- * implementation class is a Web Beans producer method.
+ * Specifies that a method of a Web Bean implementation class is a producer
+ * method.
  * 
  * @author Gavin King
  * @author Pete Muir
@@ -38,5 +38,4 @@
 @Documented
 public @interface Produces
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Production.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Production.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Production.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -26,7 +26,7 @@
 import java.lang.annotation.Target;
 
 /**
- * Component type for application components.
+ * The default deployment type.
  * 
  * @author Gavin King
  * @author Pete Muir
@@ -38,5 +38,4 @@
 @DeploymentType
 public @interface Production
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/RequestScoped.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/RequestScoped.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/RequestScoped.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -26,7 +26,9 @@
 import java.lang.annotation.Target;
 
 /**
+ * Specifies that a Web Bean is request scoped.
  * 
+ * @author Gavin King
  * @author Pete Muir
  */
 
@@ -36,5 +38,4 @@
 @ScopeType
 public @interface RequestScoped
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/ScopeType.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/ScopeType.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/ScopeType.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,19 +1,19 @@
 /*
-* 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.
-*/
+ * 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 javax.webbeans;
 
@@ -25,8 +25,8 @@
 import java.lang.annotation.Target;
 
 /**
- * Specifies that an annotation type is a Web Beans
- * scope type.
+ * Specifies that an annotation type is a Web Beans scope type.
+ * 
  * @author Gavin King
  * @author Pete Muir
  */
@@ -37,4 +37,15 @@
 public @interface ScopeType
 {
 
+   /**
+    * @return true if this is a normal scope
+    */
+   boolean normal() default true;
+
+   /**
+    * @return true if this is a passivating scope (Web Beans with this scope
+    *         type must be serializable)
+    */
+   boolean passivating() default false;
+
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/SessionScoped.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/SessionScoped.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/SessionScoped.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -26,15 +26,16 @@
 import java.lang.annotation.Target;
 
 /**
+ * Specifies that a Web Bean is session scoped.
  * 
+ * @author Gavin King
  * @author Pete Muir
  */
 
 @Target( { TYPE, METHOD })
 @Retention(RUNTIME)
 @Documented
- at ScopeType
+ at ScopeType(passivating = true)
 public @interface SessionScoped
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Specializes.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Specializes.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Specializes.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -25,7 +25,8 @@
 import java.lang.annotation.Target;
 
 /**
- * Specifies that an implementation class directly specializes its superclass.
+ * Specifies that an implementation class directly specializes its superclass,
+ * of that a producer method directly specializes the method it overrides.
  * 
  * @author Gavin King
  * @author Pete Muir
@@ -36,5 +37,4 @@
 @Documented
 public @interface Specializes
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/Standard.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/Standard.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/Standard.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -26,7 +26,8 @@
 import java.lang.annotation.Target;
 
 /**
- * Component type for standard components.
+ * Deployment type for standard components defined by the Web Beans
+ * specification.
  * 
  * @author Gavin King
  * @author Pete Muir
@@ -38,5 +39,4 @@
 @DeploymentType
 public @interface Standard
 {
-
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/TypeLiteral.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/TypeLiteral.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/TypeLiteral.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -22,42 +22,43 @@
 import java.lang.reflect.Type;
 
 /**
+ * Supports inline instantiation of objects that represent parameterized types
+ * with actual type parameters.
  * 
- * @author Pete Muir
  * @author Gavin King
+ * 
+ * @param <T>
+ *            the type, including all actual type parameters
  */
+public abstract class TypeLiteral<T> {
 
-public class TypeLiteral<T>
-{
-	
-	protected TypeLiteral() {
-	      if (!(getClass().getSuperclass() == TypeLiteral.class)) {
-	         throw new RuntimeException("Not a direct subclass of TypeLiteral");
-	      }
-	      if (!(getClass().getGenericSuperclass() instanceof ParameterizedType)) {
-	         throw new RuntimeException("Missing type parameter in TypeLiteral");
-	      }
-	   }
+   protected TypeLiteral() {
+      if (!(getClass().getSuperclass() == TypeLiteral.class)) {
+         throw new RuntimeException("Not a direct subclass of TypeLiteral");
+      }
+      if (!(getClass().getGenericSuperclass() instanceof ParameterizedType)) {
+         throw new RuntimeException("Missing type parameter in TypeLiteral");
+      }
+   }
 
-	   public final Type getType() {
-	      ParameterizedType parameterized = (ParameterizedType) getClass()
-	            .getGenericSuperclass();
-	      return parameterized.getActualTypeArguments()[0];
-	   }
+   public final Type getType() {
+      ParameterizedType parameterized = (ParameterizedType) getClass()
+            .getGenericSuperclass();
+      return parameterized.getActualTypeArguments()[0];
+   }
 
-	   @SuppressWarnings("unchecked")
-	   public final Class<T> getRawType() {
-	      Type type = getType();
-	      if (type instanceof Class) {
-	         return (Class<T>) type;
-	      } else if (type instanceof ParameterizedType) {
-	         return (Class<T>) ((ParameterizedType) type).getRawType();
-	      } else if (type instanceof GenericArrayType) {
-	         return (Class<T>) Object[].class;
-	      } else {
-	         throw new RuntimeException("Illegal type");
-	      }
-	   }
-	   // TODO: equals(), hashCode()
-
+   @SuppressWarnings("unchecked")
+   public final Class<T> getRawType() {
+      Type type = getType();
+      if (type instanceof Class) {
+         return (Class<T>) type;
+      } else if (type instanceof ParameterizedType) {
+         return (Class<T>) ((ParameterizedType) type).getRawType();
+      } else if (type instanceof GenericArrayType) {
+         return (Class<T>) Object[].class;
+      } else {
+         throw new RuntimeException("Illegal type");
+      }
+   }
+   // TODO: equals(), hashCode()
 }

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,56 +1,65 @@
 /*
-* 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.
-*/
+ * 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 javax.webbeans.manager;
 
 import java.lang.annotation.Annotation;
 import java.util.Set;
 
-
 /**
+ * The contract between the Web Bean manager and a Web Bean. This interface
+ * should not be called directly by the application.
  * 
- * @author Pete Muir
+ * @author Gavin King
+ * 
+ * @param <T>
+ *           an API type of the Web Bean
  */
-
 public abstract class Bean<T>
 {
-   
+
    private final Manager manager;
-   
+
    protected Bean(Manager manager)
    {
       this.manager = manager;
    }
-   
+
    protected Manager getManager()
    {
       return manager;
    }
 
-   public abstract Set<Class> getTypes();
+   public abstract T create();
+
+   public abstract void destroy(T instance);
+
+   public abstract Set<Class<?>> getTypes();
+
    public abstract Set<Annotation> getBindingTypes();
-   public abstract Annotation getScopeType();
-   public abstract Annotation getDeploymentType();
+
+   public abstract Class<Annotation> getScopeType();
+
+   public abstract Class<Annotation> getDeploymentType();
+
    public abstract String getName();
-   
+
    public abstract boolean isSerializable();
+
    public abstract boolean isNullable();
-   
-   public abstract T create(Manager container);
-   public abstract void destroy(Manager container, T instance);
 
-}
\ No newline at end of file
+}

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -21,7 +21,10 @@
 
 
 /**
+ * The contract between the Web Bean manager and a Web Beans context object.
+ * This interface should not be called directly by the application.
  * 
+ * @author Gavin King
  * @author Pete Muir
  */
 
@@ -30,7 +33,8 @@
 
    public Class<? extends Annotation> getScopeType();
    
-   public <T> T get(Manager container, Bean<T> component, boolean create);
+   public <T> T get(Bean<T> component, boolean create);
    
-   public <T> void remove(Manager container, Bean<T> component);
+   boolean isActive();
+   
 }

Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Conversation.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Conversation.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Conversation.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,30 +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 javax.webbeans.manager;
-
-/**
- * 
- * @author Pete Muir
- */
-
-public interface Conversation
-{
-
-   public void begin();
-   public void end();
-}

Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java	                        (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -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 javax.webbeans.manager;
+
+import java.lang.annotation.Annotation;
+import java.util.Set;
+
+public abstract class Decorator extends Bean<Object>
+{
+
+   protected Decorator(Manager manager)
+   {
+      super(manager);
+   }
+
+   public abstract Class<?> getDelegateType();
+
+   public abstract Set<Annotation> getDelegateBindingTypes();
+
+   public abstract void setDelegate(Object instance, Object delegate);
+
+}


Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/EnterpriseBeanLookup.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/EnterpriseBeanLookup.java	                        (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/EnterpriseBeanLookup.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -0,0 +1,23 @@
+/*
+ * 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 javax.webbeans.manager;
+
+public interface EnterpriseBeanLookup
+{
+   public Object lookup(String ejbName);
+}


Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/EnterpriseBeanLookup.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Initialized.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Initialized.java	                        (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Initialized.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -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 javax.webbeans.manager;
+
+import static java.lang.annotation.ElementType.FIELD;
+import static java.lang.annotation.ElementType.PARAMETER;
+import static java.lang.annotation.RetentionPolicy.RUNTIME;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.Target;
+
+import javax.webbeans.BindingType;
+
+/**
+ * Event binding type for the event that is raised by the Web Bean manager when
+ * it has completed initialization and discovery.
+ */
+ at BindingType
+ at Retention(RUNTIME)
+ at Target( { FIELD, PARAMETER })
+public @interface Initialized
+{
+}


Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Initialized.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/InterceptionType.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/InterceptionType.java	                        (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/InterceptionType.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -0,0 +1,23 @@
+/*
+ * 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 javax.webbeans.manager;
+
+public enum InterceptionType
+{
+   AROUND_INVOKE, POST_CONSTRUCT, PRE_DESTROY, PRE_PASSIVATE, POST_ACTIVATE
+}
\ No newline at end of file


Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/InterceptionType.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Interceptor.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Interceptor.java	                        (rev 0)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Interceptor.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -0,0 +1,36 @@
+/*
+ * 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 javax.webbeans.manager;
+
+import java.lang.annotation.Annotation;
+import java.lang.reflect.Method;
+import java.util.Set;
+
+public abstract class Interceptor extends Bean<Object>
+{
+
+   protected Interceptor(Manager manager)
+   {
+      super(manager);
+   }
+
+   public abstract Set<Annotation> getInterceptorBindingTypes();
+
+   public abstract Method getMethod(InterceptionType type);
+
+}


Property changes on: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Interceptor.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Modified: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,63 +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.
-*/
+ * 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 javax.webbeans.manager;
 
 import java.lang.annotation.Annotation;
+import java.util.List;
 import java.util.Set;
 
+import javax.webbeans.Observer;
 import javax.webbeans.TypeLiteral;
 
 /**
+ * The contract between the application and the Web Bean manager. Also the
+ * contract between the Web Bean manager and Bean, Context and Observer objects.
  * 
- * @author Pete Muir
+ * @author Gavin King
+ * 
  */
-
 public interface Manager
 {
 
+   public <T> Set<Bean<T>> resolveByType(Class<T> type, Annotation... bindings);
+
+   public <T> Set<Bean<T>> resolveByType(TypeLiteral<T> apiType,
+         Annotation... bindingTypes);
+
    public <T> T getInstanceByType(Class<T> type, Annotation... bindingTypes);
 
    public <T> T getInstanceByType(TypeLiteral<T> type,
          Annotation... bindingTypes);
 
-   public <T> Set<Bean<T>> resolveByType(Class<T> apiType, Annotation... bindingTypes);
+   public Set<Bean<?>> resolveByName(String name);
 
-   public <T> Set<Bean<T>> resolveByType(TypeLiteral<T> apiType,
-         Annotation... bindingTypes);
+   public Object getInstanceByName(String name);
 
-   public Object getInstanceByName(String name);
-   
    public <T> T getInstance(Bean<T> bean);
 
-   public Set<Bean<?>> resolveByName(String name);
+   public void fireEvent(Object event, Annotation... bindings);
 
-   public void fireEvent(Object event, Annotation... bindings);
-   
-   public <T> void addObserver(Observer<T> observer);
-   
-   public <T> void removeObserver(Observer<T> observer);
-   
-   public <T> Set<Observer<T>> resolveObservers(T event, Annotation... bindings);
-   
-   public void addContext(Context context);
-   
    public Context getContext(Class<Annotation> scopeType);
-   
-   public Manager addBean(Bean<?> component);
 
+   public void addContext(Context context);
+
+   public Manager addBean(Bean<?> bean);
+
+   public Manager addInterceptor(Interceptor interceptor);
+
+   public Manager addDecorator(Decorator decorator);
+
+   public <T> void addObserver(Observer<T> observer, Class<T> eventType,
+         Annotation... bindings);
+
+   public <T> void addObserver(Observer<T> observer, TypeLiteral<T> eventType,
+         Annotation... bindings);
+
+   public <T> void removeObserver(Observer<T> observer, Class<T> eventType,
+         Annotation... bindings);
+
+   public <T> void removeObserver(Observer<T> observer,
+         TypeLiteral<T> eventType, Annotation... bindings);
+
+   public <T> Set<Observer<T>> resolveObservers(T event, Annotation... bindings);
+
+   public List<Interceptor> resolveInterceptors(InterceptionType type,
+         Annotation... interceptorBindings);
+
+   public List<Decorator> resolveDecorators(Set<Class<?>> types,
+         Annotation... bindingTypes);
+
 }

Deleted: ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Observer.java
===================================================================
--- ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Observer.java	2008-10-20 06:50:03 UTC (rev 120)
+++ ri/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Observer.java	2008-10-20 18:15:46 UTC (rev 121)
@@ -1,33 +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 javax.webbeans.manager;
-
-
-/**
- * 
- * @author Pete Muir
- */
-
-public interface Observer<T>
-{
-
-   public Class<T> getEventType();
-   
-   public void notify(Manager container, T event);
-   
-}




More information about the weld-commits mailing list