openwebbeans-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gerdo...@apache.org
Subject svn commit: r737872 - in /incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans: ./ manager/
Date Mon, 26 Jan 2009 21:46:00 GMT
Author: gerdogdu
Date: Mon Jan 26 21:45:58 2009
New Revision: 737872

URL: http://svn.apache.org/viewvc?rev=737872&view=rev
Log:
Removes JBoss dependent API, TypeLiteral and AnnotationLiteral and formats source.

Modified:
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ApplicationScoped.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/BindingType.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActiveException.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ConversationScoped.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Current.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Decorates.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Decorator.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/DefinitionException.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Dependent.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/DeploymentType.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Disposes.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Fires.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/IfExists.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Initializer.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/InterceptorBindingType.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Model.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Named.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/New.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Observes.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Obtains.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Produces.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Production.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/RequestScoped.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ScopeType.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/SessionScoped.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Specializes.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Standard.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Stereotype.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/TypeLiteral.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Contextual.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/CreationalContext.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/EnterpriseBeanLookup.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Initialized.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Instance.java
    incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionCompletion.java Mon Jan 26 21:45:58 2009
@@ -21,5 +21,6 @@
 
 @Retention(RUNTIME)
 @Target(PARAMETER)
-public @interface AfterTransactionCompletion {
+public @interface AfterTransactionCompletion
+{
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionFailure.java Mon Jan 26 21:45:58 2009
@@ -21,5 +21,6 @@
 
 @Retention(RUNTIME)
 @Target(PARAMETER)
-public @interface AfterTransactionFailure {
+public @interface AfterTransactionFailure
+{
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AfterTransactionSuccess.java Mon Jan 26 21:45:58 2009
@@ -21,5 +21,6 @@
 
 @Retention(RUNTIME)
 @Target(PARAMETER)
-public @interface AfterTransactionSuccess {
+public @interface AfterTransactionSuccess
+{
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/AnnotationLiteral.java Mon Jan 26 21:45:58 2009
@@ -14,66 +14,19 @@
 package javax.webbeans;
 
 import java.lang.annotation.Annotation;
-import java.lang.reflect.InvocationTargetException;
 import java.lang.reflect.Method;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
 
+@SuppressWarnings("unchecked")
 public abstract class AnnotationLiteral<T extends Annotation> implements Annotation
 {
-
     private Class<T> annotationType;
-    private Method[] members;
 
     protected AnnotationLiteral()
     {
-        Class<?> annotationLiteralSubclass = getAnnotationLiteralSubclass(this.getClass());
-        if (annotationLiteralSubclass == null)
-        {
-            throw new RuntimeException(getClass() + "is not a subclass of AnnotationLiteral ");
-        }
-
-        annotationType = getTypeParameter(annotationLiteralSubclass);
-
-        if (annotationType == null)
-        {
-            throw new RuntimeException(getClass() + " is missing type parameter in AnnotationLiteral");
-        }
+        this.annotationType = getAnnotationType(getClass());
 
-        this.members = annotationType.getDeclaredMethods();
-    }
-
-    @SuppressWarnings("unchecked")
-    private static Class<?> getAnnotationLiteralSubclass(Class<?> clazz)
-    {
-        Class<?> superclass = clazz.getSuperclass();
-        if (superclass.equals(AnnotationLiteral.class))
-        {
-            return clazz;
-        }
-        else if (superclass.equals(Object.class))
-        {
-            return null;
-        }
-        else
-        {
-            return (getAnnotationLiteralSubclass(superclass));
-        }
-    }
-
-    @SuppressWarnings("unchecked")
-    private static <T> Class<T> getTypeParameter(Class<?> annotationLiteralSuperclass)
-    {
-        Type type = annotationLiteralSuperclass.getGenericSuperclass();
-        if (type instanceof ParameterizedType)
-        {
-            ParameterizedType parameterizedType = (ParameterizedType) type;
-            if (parameterizedType.getActualTypeArguments().length == 1)
-            {
-                return (Class<T>) parameterizedType.getActualTypeArguments()[0];
-            }
-        }
-        return null;
     }
 
     public Class<? extends Annotation> annotationType()
@@ -81,88 +34,135 @@
         return annotationType;
     }
 
-    @Override
-    public String toString()
+    protected Class<T> getAnnotationType(Class<?> definedClazz)
     {
+        Type superClazz = definedClazz.getGenericSuperclass();
+        Class<T> clazz = null;
 
-        String string = "@" + annotationType().getName() + "(";
-        for (int i = 0; i < members.length; i++)
+        if (superClazz instanceof ParameterizedType)
         {
-            string += members[i].getName() + "=";
-            string += invoke(members[i], this);
-            if (i < members.length - 1)
+            ParameterizedType paramType = (ParameterizedType) superClazz;
+            Type[] actualArgs = paramType.getActualTypeArguments();
+
+            if (actualArgs.length == 1)
+            {
+                Type type = actualArgs[0];
+                if (type instanceof Class)
+                {
+                    clazz = (Class<T>) type;
+                    return clazz;
+                }
+                else
+                {
+                    throw new ExecutionException("Not class type");
+                }
+
+            }
+            else
             {
-                string += ",";
+                throw new ExecutionException("More than one parametric type");
             }
+
+        }
+        else
+        {
+            // Look for super, maybe inner
+            return getAnnotationType((Class<?>) superClazz);
         }
-        return string + ")";
+
     }
 
     @Override
     public boolean equals(Object other)
     {
+        Method[] methods = this.annotationType.getDeclaredMethods();
+
         if (other instanceof Annotation)
         {
-            Annotation that = (Annotation) other;
-            if (this.annotationType().equals(that.annotationType()))
+            Annotation annotOther = (Annotation) other;
+            if (this.annotationType().equals(annotOther.annotationType()))
             {
-                for (Method member : members)
+                for (Method method : methods)
                 {
-                    Object thisValue = invoke(member, this);
-                    Object thatValue = invoke(member, that);
-                    if (!thisValue.equals(thatValue))
+                    Object value = callMethod(this, method);
+                    Object annotValue = callMethod(annotOther, method);
+
+                    if (value != null && annotValue != null)
+                    {
+                        if (!value.equals(annotValue))
+                        {
+                            return false;
+                        }
+                    }
+                    else if ((value == null && annotValue != null) || (value != null && annotValue == null))
                     {
                         return false;
                     }
+
                 }
                 return true;
             }
         }
+
         return false;
     }
 
+    protected Object callMethod(Object instance, Method method)
+    {
+        try
+        {
+            return method.invoke(instance, new Object[] {});
+
+        }
+        catch (Exception e)
+        {
+            throw new ExecutionException("Exception in method call : " + method.getName());
+        }
+
+    }
+
     @Override
-    /*
-     * The hash code of a primitive value v is equal to
-     * WrapperType.valueOf(v).hashCode(), where WrapperType is the wrapper type
-     * corresponding to the primitive type of v (Byte, Character, Double, Float,
-     * Integer, Long, Short, or Boolean). The hash code of a string, enum,
-     * class, or annotation member-value I v is computed as by calling
-     * v.hashCode(). (In the case of annotation member values, this is a
-     * recursive definition.) The hash code of an array member-value is computed
-     * by calling the appropriate overloading of Arrays.hashCode on the value.
-     * (There is one overloading for each primitive type, and one for object
-     * reference types.)
-     */
     public int hashCode()
     {
+        Method[] methods = this.annotationType.getDeclaredMethods();
+
         int hashCode = 0;
-        for (Method member : members)
+        for (Method method : methods)
         {
-            int memberNameHashCode = 127 * member.getName().hashCode();
-            int memberValueHashCode = invoke(member, this).hashCode();
-            hashCode += memberNameHashCode ^ memberValueHashCode;
+            // Member name
+            int name = 127 * method.getName().hashCode();
+
+            // Member value
+            int value = callMethod(this, method).hashCode();
+            hashCode += name ^ value;
         }
         return hashCode;
     }
 
-    private static Object invoke(Method method, Object instance)
+    @Override
+    public String toString()
     {
-        try
-        {
-            return method.invoke(instance);
-        }
-        catch (IllegalArgumentException e)
-        {
-            throw new ExecutionException("Error checking value of member method " + method.getName() + " on " + method.getDeclaringClass(), e);
-        }
-        catch (IllegalAccessException e)
-        {
-            throw new ExecutionException("Error checking value of member method " + method.getName() + " on " + method.getDeclaringClass(), e);
-        }
-        catch (InvocationTargetException e)
+        Method[] methods = this.annotationType.getDeclaredMethods();
+
+        StringBuilder sb = new StringBuilder("@" + annotationType().getName() + "(");
+        int lenght = methods.length;
+
+        for (int i = 0; i < lenght; i++)
         {
-            throw new ExecutionException("Error checking value of member method " + method.getName() + " on " + method.getDeclaringClass(), e);
+            // Member name
+            sb.append(methods[i].getName()).append("=");
+
+            // Member value
+            sb.append(callMethod(this, methods[i]));
+
+            if (i < lenght - 1)
+            {
+                sb.append(",");
+            }
         }
+
+        sb.append(")");
+
+        return sb.toString();
     }
 }
\ No newline at end of file

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ApplicationScoped.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ApplicationScoped.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ApplicationScoped.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ApplicationScoped.java Mon Jan 26 21:45:58 2009
@@ -18,15 +18,10 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-/**
- * Application wide scope type.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @ScopeType
 @Target( { ElementType.TYPE, ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)
-public @interface ApplicationScoped {
+public @interface ApplicationScoped
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/BeforeTransactionCompletion.java Mon Jan 26 21:45:58 2009
@@ -21,5 +21,6 @@
 
 @Retention(RUNTIME)
 @Target(PARAMETER)
-public @interface BeforeTransactionCompletion {
+public @interface BeforeTransactionCompletion
+{
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/BindingType.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/BindingType.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/BindingType.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/BindingType.java Mon Jan 26 21:45:58 2009
@@ -19,15 +19,10 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-/**
- * Meta-annotation used for defining new binding types.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @Target(value = { ElementType.ANNOTATION_TYPE })
 @Retention(value = RetentionPolicy.RUNTIME)
 @Documented
-public @interface BindingType {
+public @interface BindingType
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActiveException.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActiveException.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActiveException.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ContextNotActiveException.java Mon Jan 26 21:45:58 2009
@@ -19,8 +19,6 @@
  * If the {@link Context} is not avalaible in the time of web beans component
  * getting, this exception is thrown.
  * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
  */
 public class ContextNotActiveException extends ExecutionException
 {

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ConversationScoped.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ConversationScoped.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ConversationScoped.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ConversationScoped.java Mon Jan 26 21:45:58 2009
@@ -20,13 +20,11 @@
 
 /**
  * Conversation wide scope type.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
  */
 @ScopeType
 @Target( { ElementType.TYPE, ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)
-public @interface ConversationScoped {
+public @interface ConversationScoped
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Current.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Current.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Current.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Current.java Mon Jan 26 21:45:58 2009
@@ -25,14 +25,12 @@
 
 /**
  * Defines the current instance web beans component in the context.
- * 
- * @author gurkanerdogdu
- * @since 1.0
  */
 @Target( { TYPE, METHOD, PARAMETER, FIELD })
 @Retention(RUNTIME)
 @Documented
 @BindingType
-public @interface Current {
+public @interface Current
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Decorates.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Decorates.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Decorates.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Decorates.java Mon Jan 26 21:45:58 2009
@@ -23,6 +23,7 @@
 @Target(FIELD)
 @Retention(RUNTIME)
 @Documented
-public @interface Decorates {
+public @interface Decorates
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Decorator.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Decorator.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Decorator.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Decorator.java Mon Jan 26 21:45:58 2009
@@ -23,6 +23,7 @@
 @Retention(value = RetentionPolicy.RUNTIME)
 @Documented
 @Stereotype
-public @interface Decorator {
+public @interface Decorator
+{
 
 }
\ No newline at end of file

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/DefinitionException.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/DefinitionException.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/DefinitionException.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/DefinitionException.java Mon Jan 26 21:45:58 2009
@@ -16,9 +16,6 @@
 /**
  * Defines the exception that is thrown when the definitons of the web beans
  * component is not logically correct.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
  */
 public class DefinitionException extends RuntimeException
 {

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Dependent.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Dependent.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Dependent.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Dependent.java Mon Jan 26 21:45:58 2009
@@ -23,13 +23,11 @@
  * component. This parent web beans components saves this dependent web beans
  * components in its {@link Dependent} scope. This annotation is used for
  * marking the web beans scope as dependent.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
  */
 @ScopeType(normal = false)
 @Target( { ElementType.TYPE, ElementType.METHOD })
 @Retention(RetentionPolicy.RUNTIME)
-public @interface Dependent {
+public @interface Dependent
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/DeploymentType.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/DeploymentType.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/DeploymentType.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/DeploymentType.java Mon Jan 26 21:45:58 2009
@@ -27,13 +27,11 @@
  * type, these are {@link Production} for application components and
  * {@link Standard} for standart components.
  * </p>
- * 
- * @author gurkanerdogdu
- * @since 1.0
  */
 @Target(ANNOTATION_TYPE)
 @Retention(RUNTIME)
 @Documented
-public @interface DeploymentType {
+public @interface DeploymentType
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Destructor.java Mon Jan 26 21:45:58 2009
@@ -19,13 +19,8 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-/**
- * Specifies the destructor method for the EJB statefull web beans components.
- * 
- * @author gurkanerdogdu
- * @since 1.0
- */
 @Retention(RUNTIME)
 @Target(METHOD)
-public @interface Destructor {
+public @interface Destructor
+{
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Disposes.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Disposes.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Disposes.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Disposes.java Mon Jan 26 21:45:58 2009
@@ -18,16 +18,9 @@
 import java.lang.annotation.RetentionPolicy;
 import java.lang.annotation.Target;
 
-/**
- * Some producer method components defines it disposal method to dispose its
- * created object. This annotation is used at method parameter that corresponds
- * to the created producer component instance.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @Target(ElementType.PARAMETER)
 @Retention(RetentionPolicy.RUNTIME)
-public @interface Disposes {
+public @interface Disposes
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Fires.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Fires.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Fires.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Fires.java Mon Jan 26 21:45:58 2009
@@ -27,6 +27,7 @@
 @Retention(RUNTIME)
 @Target( { TYPE, METHOD, FIELD, PARAMETER })
 @Documented
-public @interface Fires {
+public @interface Fires
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/IfExists.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/IfExists.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/IfExists.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/IfExists.java Mon Jan 26 21:45:58 2009
@@ -20,15 +20,10 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-/**
- * Defines the conditional observers.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @Target(PARAMETER)
 @Retention(RUNTIME)
 @Documented
-public @interface IfExists {
+public @interface IfExists
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Initializer.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Initializer.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Initializer.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Initializer.java Mon Jan 26 21:45:58 2009
@@ -24,6 +24,7 @@
 @Target( { METHOD, CONSTRUCTOR })
 @Retention(RUNTIME)
 @Documented
-public @interface Initializer {
+public @interface Initializer
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Interceptor.java Mon Jan 26 21:45:58 2009
@@ -19,15 +19,10 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-/**
- * Web beans defined interceptor annotation.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @Retention(RUNTIME)
 @Target(TYPE)
 @Stereotype
-public @interface Interceptor {
+public @interface Interceptor
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/InterceptorBindingType.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/InterceptorBindingType.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/InterceptorBindingType.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/InterceptorBindingType.java Mon Jan 26 21:45:58 2009
@@ -20,15 +20,10 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-/**
- * Defines the web beans interceptor type.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @Target(ANNOTATION_TYPE)
 @Retention(RUNTIME)
 @Documented
-public @interface InterceptorBindingType {
+public @interface InterceptorBindingType
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Model.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Model.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Model.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Model.java Mon Jan 26 21:45:58 2009
@@ -29,6 +29,7 @@
 @Target( { TYPE, METHOD, FIELD })
 @Retention(RUNTIME)
 @Documented
-public @interface Model {
+public @interface Model
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Named.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Named.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Named.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Named.java Mon Jan 26 21:45:58 2009
@@ -21,16 +21,11 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-/**
- * Specifies the component name.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @Target( { TYPE, METHOD })
 @Retention(RUNTIME)
 @Documented
-public @interface Named {
+public @interface Named
+{
 
     public String value() default "";
 

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/New.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/New.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/New.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/New.java Mon Jan 26 21:45:58 2009
@@ -27,14 +27,12 @@
  * Special binding. It is declared in the injection point. Every time injection
  * occurs, new instance of the injected component is created and put into the
  * dependent context.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
  */
 @Target( { METHOD, FIELD, PARAMETER, TYPE })
 @Retention(RUNTIME)
 @Documented
 @BindingType
-public @interface New {
+public @interface New
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/NonBinding.java Mon Jan 26 21:45:58 2009
@@ -19,14 +19,8 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-/**
- * Defines that the annotation member values is not used in the equality
- * comparison of the annotations.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @Retention(RUNTIME)
 @Target(METHOD)
-public @interface NonBinding {
+public @interface NonBinding
+{
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Observes.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Observes.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Observes.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Observes.java Mon Jan 26 21:45:58 2009
@@ -20,15 +20,10 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-/**
- * Defines the intention of the method as an observer.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @Target(PARAMETER)
 @Retention(RUNTIME)
 @Documented
-public @interface Observes {
+public @interface Observes
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Obtains.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Obtains.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Obtains.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Obtains.java Mon Jan 26 21:45:58 2009
@@ -1,18 +1,15 @@
 /*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You 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.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You 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;
 
@@ -22,7 +19,7 @@
 import java.lang.annotation.Target;
 
 @Retention(RetentionPolicy.RUNTIME)
-@Target({ElementType.FIELD,ElementType.PARAMETER})
+@Target( { ElementType.FIELD, ElementType.PARAMETER })
 public @interface Obtains
 {
 

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Produces.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Produces.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Produces.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Produces.java Mon Jan 26 21:45:58 2009
@@ -20,15 +20,10 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-/**
- * Defines the method as a producer method web beans component.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @Target(METHOD)
 @Retention(RUNTIME)
 @Documented
-public @interface Produces {
+public @interface Produces
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Production.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Production.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Production.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Production.java Mon Jan 26 21:45:58 2009
@@ -25,6 +25,7 @@
 @Retention(RUNTIME)
 @Documented
 @DeploymentType
-public @interface Production {
+public @interface Production
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/RequestScoped.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/RequestScoped.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/RequestScoped.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/RequestScoped.java Mon Jan 26 21:45:58 2009
@@ -21,16 +21,11 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-/**
- * Request wide defined scope annotation.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @Target( { TYPE, METHOD })
 @Retention(RUNTIME)
 @Documented
 @ScopeType
-public @interface RequestScoped {
+public @interface RequestScoped
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ScopeType.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ScopeType.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ScopeType.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/ScopeType.java Mon Jan 26 21:45:58 2009
@@ -20,16 +20,11 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-/**
- * Used for creating the new scope types.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @Target(ANNOTATION_TYPE)
 @Retention(RUNTIME)
 @Documented
-public @interface ScopeType {
+public @interface ScopeType
+{
 
     boolean normal() default true;
 

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/SessionScoped.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/SessionScoped.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/SessionScoped.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/SessionScoped.java Mon Jan 26 21:45:58 2009
@@ -21,16 +21,11 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-/**
- * Session wide defined scope annotation.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @Target( { TYPE, METHOD })
 @Retention(RUNTIME)
 @Documented
 @ScopeType
-public @interface SessionScoped {
+public @interface SessionScoped
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Specializes.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Specializes.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Specializes.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Specializes.java Mon Jan 26 21:45:58 2009
@@ -24,6 +24,7 @@
 @Target( { TYPE, METHOD })
 @Retention(RUNTIME)
 @Documented
-public @interface Specializes {
+public @interface Specializes
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Standard.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Standard.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Standard.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Standard.java Mon Jan 26 21:45:58 2009
@@ -21,16 +21,11 @@
 import java.lang.annotation.Retention;
 import java.lang.annotation.Target;
 
-/**
- * Standart web beans component type.
- * 
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- * @since 1.0
- */
 @Target( { TYPE, METHOD })
 @Retention(RUNTIME)
 @Documented
 @DeploymentType
-public @interface Standard {
+public @interface Standard
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Stereotype.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Stereotype.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Stereotype.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/Stereotype.java Mon Jan 26 21:45:58 2009
@@ -24,7 +24,8 @@
 @Retention(RUNTIME)
 @Target(ANNOTATION_TYPE)
 @Documented
-public @interface Stereotype {
+public @interface Stereotype
+{
 
     public Class<? extends Annotation>[] supportedScopes() default {};
 

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/TypeLiteral.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/TypeLiteral.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/TypeLiteral.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/TypeLiteral.java Mon Jan 26 21:45:58 2009
@@ -16,104 +16,122 @@
 import java.lang.reflect.GenericArrayType;
 import java.lang.reflect.ParameterizedType;
 import java.lang.reflect.Type;
-import java.util.List;
 
-/**
- * *****************************************************************************
- * **************** This class and its method signatures is taken from the
- * unpublished Web Beans API related code from the <a
- * href="http://anonsvn.jboss.org/repos/webbeans/">Web Beans RI svn</a>
- * *********
- * *********************************************************************
- * **************
- */
+@SuppressWarnings("unchecked")
 public abstract class TypeLiteral<T>
 {
-
-    private Type actualType;
+    private Type definedType;
 
     protected TypeLiteral()
     {
-        Class<?> typeLiteralSubclass = getTypeLiteralSubclass(this.getClass());
-        if (typeLiteralSubclass == null)
-        {
-            throw new RuntimeException(getClass() + " is not a subclass of TypeLiteral");
-        }
-        actualType = getTypeParameter(typeLiteralSubclass);
-        if (actualType == null)
-        {
-            throw new RuntimeException(getClass() + " is missing type parameter in TypeLiteral");
-        }
+        this.definedType = getDefinedType(this.getClass());
     }
 
     public final Type getType()
     {
-        return actualType;
+        return definedType;
     }
 
-    @SuppressWarnings("unchecked")
     public final Class<T> getRawType()
     {
-        Type type = getType();
-        if (type instanceof Class)
+        Class<T> rawType = null;
+
+        if (this.definedType instanceof Class)
         {
-            return (Class<T>) type;
+            rawType = (Class<T>) this.definedType;
         }
-        else if (type instanceof ParameterizedType)
+        else if (this.definedType instanceof ParameterizedType)
         {
-            return (Class<T>) ((ParameterizedType) type).getRawType();
+            ParameterizedType pt = (ParameterizedType) this.definedType;
+            rawType = (Class<T>) pt.getRawType();
+
         }
-        else if (type instanceof GenericArrayType)
+        else if (this.definedType instanceof GenericArrayType)
         {
-            return (Class<T>) Object[].class;
+            rawType = (Class<T>) Object[].class;
         }
         else
         {
-            throw new RuntimeException("Illegal type");
+            throw new ExecutionException("Illegal type for the Type Literal Class");
         }
+
+        return rawType;
     }
 
-    @SuppressWarnings("unchecked")
-    private static Class<?> getTypeLiteralSubclass(Class<?> clazz)
+    protected Type getDefinedType(Class<?> clazz)
     {
-        Class<?> superclass = clazz.getSuperclass();
-        if (superclass.equals(TypeLiteral.class))
+        Type type = null;
+
+        if (clazz == null)
         {
-            return clazz;
+            throw new ExecutionException("Class parameter clazz can not be null");
         }
-        else if (superclass.equals(Object.class))
+
+        Type superClazz = clazz.getGenericSuperclass();
+
+        if (superClazz.equals(Object.class))
         {
-            return null;
+            throw new ExecutionException("Super class must be parametrized type");
         }
-        else
+        else if (superClazz instanceof ParameterizedType)
         {
-            return (getTypeLiteralSubclass(superclass));
-        }
-    }
+            ParameterizedType pt = (ParameterizedType) superClazz;
+            Type[] actualArgs = pt.getActualTypeArguments();
 
-    @SuppressWarnings("unchecked")
-    private static Type getTypeParameter(Class<?> superclass)
-    {
-        Type type = superclass.getGenericSuperclass();
-        if (type instanceof ParameterizedType)
-        {
-            ParameterizedType parameterizedType = (ParameterizedType) type;
-            if (parameterizedType.getActualTypeArguments().length == 1)
+            if (actualArgs.length == 1)
             {
-                return parameterizedType.getActualTypeArguments()[0];
+                type = actualArgs[0];
+
             }
+            else
+            {
+                throw new ExecutionException("More than one parametric type");
+            }
+
         }
-        return null;
+        else
+        {
+            type = getDefinedType((Class<?>) superClazz);
+        }
+
+        return type;
     }
 
-    public static void main(String[] args)
-    {
-        TypeLiteral<List<String>> s = new TypeLiteral<List<String>>()
-        {
-        };
-        System.out.println(s.getRawType()); // List
-        System.out.println(s.getType()); // List<String>
+    /*
+     * (non-Javadoc)
+     * @see java.lang.Object#hashCode()
+     */
+    @Override
+    public int hashCode()
+    {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + ((definedType == null) ? 0 : definedType.hashCode());
+        return result;
+    }
+
+    /*
+     * (non-Javadoc)
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object obj)
+    {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        TypeLiteral other = (TypeLiteral) obj;
+        if (definedType == null)
+        {
+            if (other.definedType != null)
+                return false;
+        }
+        else if (!definedType.equals(other.definedType))
+            return false;
+        return true;
     }
 
-    // TODO: equals(), hashCode()
 }
\ No newline at end of file

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Bean.java Mon Jan 26 21:45:58 2009
@@ -110,7 +110,7 @@
      * @return true if nullable
      */
     public abstract boolean isNullable();
-    
+
     public abstract Set<InjectionPoint> getInjectionPoints();
 
 }
\ No newline at end of file

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Context.java Mon Jan 26 21:45:58 2009
@@ -19,8 +19,8 @@
 {
     public Class<? extends Annotation> getScopeType();
 
-    public <T> T get(Contextual<T> component, boolean create,CreationalContext<T> crreationalContext);
-    
+    public <T> T get(Contextual<T> component, boolean create, CreationalContext<T> crreationalContext);
+
     public <T> T get(Contextual<T> component, boolean create);
 
     boolean isActive();

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Contextual.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Contextual.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Contextual.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Contextual.java Mon Jan 26 21:45:58 2009
@@ -1,18 +1,15 @@
 /*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You 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.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You 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;
 
@@ -20,5 +17,5 @@
 {
     public T create(CreationalContext<T> context);
 
-    public void destroy(T instance);    
+    public void destroy(T instance);
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/CreationalContext.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/CreationalContext.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/CreationalContext.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/CreationalContext.java Mon Jan 26 21:45:58 2009
@@ -1,25 +1,21 @@
 /*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You 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.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You 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;
 
 /**
- * The CreationalContext holds incomplete Bean instances.
- * This may be caused by a situation like in the following example:
- * <code>
+ * The CreationalContext holds incomplete Bean instances. This may be caused by
+ * a situation like in the following example: <code>
  * &#x0040;ApplicationScoped class Foo 
  * { 
  *   &#x0040;Current Bar _bar; 
@@ -33,8 +29,6 @@
  */
 public interface CreationalContext<T>
 {
-    public void push(Bean<T> bean, T incompleteInstance);
-    
-    public T pop(Bean<T> bean);
+    public void push(T incompleteInstance);
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Decorator.java Mon Jan 26 21:45:58 2009
@@ -16,9 +16,6 @@
 import java.lang.annotation.Annotation;
 import java.util.Set;
 
-/**
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- */
 public abstract class Decorator extends Bean<Object>
 {
 

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/EnterpriseBeanLookup.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/EnterpriseBeanLookup.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/EnterpriseBeanLookup.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/EnterpriseBeanLookup.java Mon Jan 26 21:45:58 2009
@@ -13,9 +13,6 @@
  */
 package javax.webbeans.manager;
 
-/**
- * @author <a href="mailto:gurkanerdogdu@yahoo.com">Gurkan Erdogdu</a>
- */
 public interface EnterpriseBeanLookup
 {
 

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Initialized.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Initialized.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Initialized.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Initialized.java Mon Jan 26 21:45:58 2009
@@ -25,6 +25,7 @@
 @BindingType
 @Retention(RUNTIME)
 @Target( { FIELD, PARAMETER })
-public @interface Initialized {
+public @interface Initialized
+{
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Instance.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Instance.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Instance.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Instance.java Mon Jan 26 21:45:58 2009
@@ -1,18 +1,15 @@
 /*
- *  Licensed to the Apache Software Foundation (ASF) under one or more
- *  contributor license agreements.  See the NOTICE file distributed with
- *  this work for additional information regarding copyright ownership.
- *  The ASF licenses this file to You 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.
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with this
+ * work for additional information regarding copyright ownership. The ASF
+ * licenses this file to You 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;
 
@@ -20,6 +17,6 @@
 
 public interface Instance<T>
 {
-    T get(Annotation...annotations);
+    T get(Annotation... annotations);
 
 }

Modified: incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java
URL: http://svn.apache.org/viewvc/incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java?rev=737872&r1=737871&r2=737872&view=diff
==============================================================================
--- incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java (original)
+++ incubator/openwebbeans/trunk/webbeans-api/src/main/java/javax/webbeans/manager/Manager.java Mon Jan 26 21:45:58 2009
@@ -63,8 +63,6 @@
  * component, otherwise</li> exceptin is thrown by the container.
  * </ul>
  * </p>
-
- * @since 1.0
  */
 public interface Manager
 {
@@ -77,9 +75,9 @@
     public <T> T getInstanceByType(TypeLiteral<T> type, Annotation... bindingTypes);
 
     public Set<Bean<?>> resolveByName(String name);
-    
+
     public <T> T getInstanceToInject(InjectionPoint injectionPoint, CreationalContext<T> context);
-    
+
     public Object getInstanceToInject(InjectionPoint injectionPoint);
 
     public Object getInstanceByName(String name);



Mime
View raw message