Return-Path: X-Original-To: apmail-onami-commits-archive@minotaur.apache.org Delivered-To: apmail-onami-commits-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1137DEDB8 for ; Sat, 19 Jan 2013 16:26:01 +0000 (UTC) Received: (qmail 8704 invoked by uid 500); 19 Jan 2013 16:26:00 -0000 Delivered-To: apmail-onami-commits-archive@onami.apache.org Received: (qmail 8525 invoked by uid 500); 19 Jan 2013 16:26:00 -0000 Mailing-List: contact commits-help@onami.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@onami.incubator.apache.org Delivered-To: mailing list commits@onami.incubator.apache.org Received: (qmail 7385 invoked by uid 99); 19 Jan 2013 16:25:21 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Jan 2013 16:25:21 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=5.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 19 Jan 2013 16:24:58 +0000 Received: from eris.apache.org (localhost [127.0.0.1]) by eris.apache.org (Postfix) with ESMTP id 2076A2388AC8; Sat, 19 Jan 2013 16:24:13 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r1435582 [6/12] - in /incubator/onami/site/test: ./ apidocs/reference/org/apache/onami/test/ cobertura/ xref-test/ xref-test/org/apache/onami/test/ xref-test/org/apache/onami/test/data/ xref-test/org/apache/onami/test/guice/ xref/ xref/org/... Date: Sat, 19 Jan 2013 16:24:07 -0000 To: commits@onami.incubator.apache.org From: simonetripodi@apache.org X-Mailer: svnmailer-1.0.8-patched Message-Id: <20130119162413.2076A2388AC8@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Modified: incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.GuiceModules.html URL: http://svn.apache.org/viewvc/incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.GuiceModules.html?rev=1435582&r1=1435581&r2=1435582&view=diff ============================================================================== --- incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.GuiceModules.html (original) +++ incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.GuiceModules.html Sat Jan 19 16:24:05 2013 @@ -107,6 +107,6 @@
 }
- + \ No newline at end of file Modified: incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.GuiceProvidedModules.html URL: http://svn.apache.org/viewvc/incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.GuiceProvidedModules.html?rev=1435582&r1=1435581&r2=1435582&view=diff ============================================================================== --- incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.GuiceProvidedModules.html (original) +++ incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.GuiceProvidedModules.html Sat Jan 19 16:24:05 2013 @@ -111,6 +111,6 @@
 }
- + \ No newline at end of file Modified: incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.Mock.html URL: http://svn.apache.org/viewvc/incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.Mock.html?rev=1435582&r1=1435581&r2=1435582&view=diff ============================================================================== --- incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.Mock.html (original) +++ incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.Mock.html Sat Jan 19 16:24:05 2013 @@ -197,6 +197,6 @@
 }
- + \ No newline at end of file Modified: incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.MockFramework.html URL: http://svn.apache.org/viewvc/incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.MockFramework.html?rev=1435582&r1=1435581&r2=1435582&view=diff ============================================================================== --- incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.MockFramework.html (original) +++ incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.MockFramework.html Sat Jan 19 16:24:05 2013 @@ -103,6 +103,6 @@
 }
- + \ No newline at end of file Modified: incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.MockObjType.html URL: http://svn.apache.org/viewvc/incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.MockObjType.html?rev=1435582&r1=1435581&r2=1435582&view=diff ============================================================================== --- incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.MockObjType.html (original) +++ incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.MockObjType.html Sat Jan 19 16:24:05 2013 @@ -12,13 +12,12 @@
 
- +
Classes in this File Line Coverage Branch Coverage Complexity
MockObjType
100%
5/5
N/A
0
MockObjType
100%
6/6
N/A
0
 
- - + @@ -65,21 +64,21 @@ - + - - - - + + + +
 1  
 package org.apache.onami.test.annotation;
 1  2
 package org.apache.onami.test.annotation;
 2  
 
 3  
  * Enumeration class to specifies the preferred mock object.
 24  
  */
 25  14
 public enum MockObjType
 25  5
 public enum MockObjType
 26  
 {
 27  
 
 28  2
     EASY_MOCK_NORMAL,
 29  2
     EASY_MOCK_STRICT,
 30  2
     EASY_MOCK_NICE,
 31  2
     DEFAULT
 28  1
     EASY_MOCK_NORMAL,
 29  1
     EASY_MOCK_STRICT,
 30  1
     EASY_MOCK_NICE,
 31  1
     DEFAULT
 32  
 
 33  
 }
- + \ No newline at end of file Modified: incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.MockType.html URL: http://svn.apache.org/viewvc/incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.MockType.html?rev=1435582&r1=1435581&r2=1435582&view=diff ============================================================================== --- incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.MockType.html (original) +++ incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.MockType.html Sat Jan 19 16:24:05 2013 @@ -12,13 +12,12 @@
 
- +
Classes in this File Line Coverage Branch Coverage Complexity
MockType
100%
2/2
N/A
0
MockType
100%
3/3
N/A
0
 
- - + @@ -69,18 +68,18 @@ - + - +
 1  
 package org.apache.onami.test.annotation;
 1  2
 package org.apache.onami.test.annotation;
 2  
 
 3  
  * @see MockFramework
 26  
  */
 27  10
 public enum MockType
 27  3
 public enum MockType
 28  
 {
 29  
 
 30  2
     EASY_MOCK, MOCKITO;
 30  1
     EASY_MOCK, MOCKITO;
 31  
 
 32  
 }
- + \ No newline at end of file Added: incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.package-info.html URL: http://svn.apache.org/viewvc/incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.package-info.html?rev=1435582&view=auto ============================================================================== --- incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.package-info.html (added) +++ incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.package-info.html Sat Jan 19 16:24:05 2013 @@ -0,0 +1,72 @@ + + + + +Coverage Report + + + + +
Coverage Report - org.apache.onami.test.annotation.package-info
+
 
+ + + + +
Classes in this File Line Coverage Branch Coverage Complexity
package-info
N/A
N/A
0
+
 
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
 1  
 /*
 2  
  * Licensed to the Apache Software Foundation (ASF) under one
 3  
  * or more contributor license agreements.  See the NOTICE file
 4  
  * distributed with this work for additional information
 5  
  * regarding copyright ownership.  The ASF licenses this file
 6  
  * to you under the Apache License, Version 2.0 (the
 7  
  * "License"); you may not use this file except in compliance
 8  
  * with the License.  You may obtain a copy of the License at
 9  
  *
 10  
  *   http://www.apache.org/licenses/LICENSE-2.0
 11  
  *
 12  
  * Unless required by applicable law or agreed to in writing,
 13  
  * software distributed under the License is distributed on an
 14  
  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
 15  
  * KIND, either express or implied.  See the License for the
 16  
  * specific language governing permissions and limitations
 17  
  * under the License.
 18  
  */
 19  
 
 20  
 /**
 21  
  * Contains core annotations classes to configure JUnice framework.
 22  
  */
 23  
 package org.apache.onami.test.annotation;
 24  
 
+ + + + \ No newline at end of file Propchange: incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.package-info.html ------------------------------------------------------------------------------ svn:eol-style = native Propchange: incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.package-info.html ------------------------------------------------------------------------------ svn:keywords = Date Revision Author HeadURL Id Propchange: incubator/onami/site/test/cobertura/org.apache.onami.test.annotation.package-info.html ------------------------------------------------------------------------------ svn:mime-type = text/html Modified: incubator/onami/site/test/cobertura/org.apache.onami.test.handler.GuiceInjectableClassHandler.html URL: http://svn.apache.org/viewvc/incubator/onami/site/test/cobertura/org.apache.onami.test.handler.GuiceInjectableClassHandler.html?rev=1435582&r1=1435581&r2=1435582&view=diff ============================================================================== --- incubator/onami/site/test/cobertura/org.apache.onami.test.handler.GuiceInjectableClassHandler.html (original) +++ incubator/onami/site/test/cobertura/org.apache.onami.test.handler.GuiceInjectableClassHandler.html Sat Jan 19 16:24:05 2013 @@ -12,13 +12,12 @@
 
- +
Classes in this File Line Coverage Branch Coverage Complexity
GuiceInjectableClassHandler
100%
12/12
75%
6/8
3
GuiceInjectableClassHandler
100%
13/13
75%
6/8
3
 
- - + @@ -97,15 +96,15 @@ - + - + - + @@ -122,7 +121,7 @@ - + @@ -139,36 +138,36 @@ - + - + - + - + - + - + - + - +
 1  
 package org.apache.onami.test.handler;
 1  15
 package org.apache.onami.test.handler;
 2  
 
 3  
  * @see ClassVisitor
 40  
  */
 41  78
 public final class GuiceInjectableClassHandler<A extends Annotation>
 41  48
 public final class GuiceInjectableClassHandler<A extends Annotation>
 42  
     implements AnnotationHandler<A, AccessibleObject>
 43  
 {
 44  2
     private static final Logger logger = Logger.getLogger( GuiceInjectableClassHandler.class.getName() );
 44  1
     private static final Logger logger = Logger.getLogger( GuiceInjectableClassHandler.class.getName() );
 45  
 
 46  48
     protected final Set<Class<?>> classes = new HashSet<Class<?>>();
 46  24
     protected final Set<Class<?>> classes = new HashSet<Class<?>>();
 47  
 
 48  
     public Class<?>[] getClasses()
 54  
     {
 55  48
         return classes.toArray( new Class<?>[classes.size()] );
 55  24
         return classes.toArray( new Class<?>[classes.size()] );
 56  
     }
 57  
         throws HandleException
 63  
     {
 64  30
         Class<?> type = null;
 64  15
         Class<?> type = null;
 65  
 
 66  30
         if ( element instanceof Member )
 66  15
         if ( element instanceof Member )
 67  
         {
 68  30
             type = ( (Member) element ).getDeclaringClass();
 68  15
             type = ( (Member) element ).getDeclaringClass();
 69  
         }
 70  
 
 71  30
         if ( type != null && !classes.contains( type ) )
 71  15
         if ( type != null && !classes.contains( type ) )
 72  
         {
 73  20
             if ( logger.isLoggable( Level.FINER ) )
 73  10
             if ( logger.isLoggable( Level.FINER ) )
 74  
             {
 75  12
                 logger.finer( "   Found injectable type: " + type );
 75  6
                 logger.finer( "   Found injectable type: " + type );
 76  
             }
 77  20
             classes.add( type );
 77  10
             classes.add( type );
 78  
         }
 79  30
     }
 79  15
     }
 80  
 
 81  
 }
- + \ No newline at end of file Modified: incubator/onami/site/test/cobertura/org.apache.onami.test.handler.GuiceModuleHandler.html URL: http://svn.apache.org/viewvc/incubator/onami/site/test/cobertura/org.apache.onami.test.handler.GuiceModuleHandler.html?rev=1435582&r1=1435581&r2=1435582&view=diff ============================================================================== --- incubator/onami/site/test/cobertura/org.apache.onami.test.handler.GuiceModuleHandler.html (original) +++ incubator/onami/site/test/cobertura/org.apache.onami.test.handler.GuiceModuleHandler.html Sat Jan 19 16:24:05 2013 @@ -17,8 +17,7 @@
 
- - + @@ -93,25 +92,26 @@ - + + - + - - - - - + + + + + @@ -124,7 +124,7 @@ - + @@ -141,36 +141,36 @@ - + - + - + - - - + + - + + - +
 1  
 package org.apache.onami.test.handler;
 1  5
 package org.apache.onami.test.handler;
 2  
 
 3  
  * @see ClassVisitor
 38  
  */
 39  10
 public final class GuiceModuleHandler
 39  
 public final class GuiceModuleHandler
 40  
     implements ClassHandler<GuiceModules>
 41  
 {
 42  
 
 43  2
     private static final Logger logger = Logger.getLogger( GuiceModuleHandler.class.getName() );
 43  1
     private static final Logger logger = Logger.getLogger( GuiceModuleHandler.class.getName() );
 44  
 
 45  
     final private List<Module> modules;
 46  
 
 47  
     public GuiceModuleHandler()
 48  24
     {
 49  24
         modules = new ArrayList<Module>( 1 );
 50  24
     }
 47  12
     public GuiceModuleHandler()
 48  
     {
 49  12
         modules = new ArrayList<Module>( 1 );
 50  12
     }
 51  
 
 52  
     public List<Module> getModules()
 56  
     {
 57  24
         return modules;
 57  12
         return modules;
 58  
     }
 59  
         throws HandleException
 65  
     {
 66  20
         for ( Class<? extends Module> module : annotation.value() )
 66  10
         for ( Class<? extends Module> module : annotation.value() )
 67  
         {
 68  10
             if ( logger.isLoggable( Level.FINER ) )
 68  5
             if ( logger.isLoggable( Level.FINER ) )
 69  
             {
 70  6
                 logger.finer( "   Try to create module: " + module );
 70  3
                 logger.finer( "   Try to create module: " + module );
 71  
             }
 72  
             try
 73  
             {
 74  10
                 modules.add( module.newInstance() );
 75  
             }
 74  5
                 modules.add( module.newInstance() );
 75  5
             }
 76  0
             catch ( Exception e )
 77  
             {
 78  0
                 throw new HandleException( e );
 79  10
             }
 79  
             }
 80  
         }
 81  10
     }
 81  5
     }
 82  
 
 83  
 }
- + \ No newline at end of file Modified: incubator/onami/site/test/cobertura/org.apache.onami.test.handler.GuiceProvidedModuleHandler.html URL: http://svn.apache.org/viewvc/incubator/onami/site/test/cobertura/org.apache.onami.test.handler.GuiceProvidedModuleHandler.html?rev=1435582&r1=1435581&r2=1435582&view=diff ============================================================================== --- incubator/onami/site/test/cobertura/org.apache.onami.test.handler.GuiceProvidedModuleHandler.html (original) +++ incubator/onami/site/test/cobertura/org.apache.onami.test.handler.GuiceProvidedModuleHandler.html Sat Jan 19 16:24:05 2013 @@ -12,15 +12,14 @@
 
- - - + + +
Classes in this File Line Coverage Branch Coverage Complexity
GuiceProvidedModuleHandler
89%
25/28
83%
15/18
4
GuiceProvidedModuleHandler$1
100%
1/1
N/A
4
GuiceProvidedModuleHandler$2
100%
1/1
N/A
4
GuiceProvidedModuleHandler
76%
39/51
83%
15/18
4.25
GuiceProvidedModuleHandler$1
100%
2/2
N/A
4.25
GuiceProvidedModuleHandler$2
100%
2/2
N/A
4.25
 
- - + @@ -105,17 +104,17 @@ - + - + - + @@ -128,7 +127,7 @@ - + @@ -147,108 +146,122 @@ - + - + - - - + + + + + + + + + - + - - + + - - + + - + - - + + - + - - - - - - - - - - - - + + + - - - - - + + + - - - - - - - - + + + + + + - - + + - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + - - + + - + - + - - + + - - + + - - + + - + - + - - + + - - + + - - - - + +
 1  
 package org.apache.onami.test.handler;
 1  2
 package org.apache.onami.test.handler;
 2  
 
 3  
  * @see GuiceProvidedModules
 43  
  */
 44  32
 public final class GuiceProvidedModuleHandler
 44  24
 public final class GuiceProvidedModuleHandler
 45  
     implements MethodHandler<GuiceProvidedModules>
 46  
 {
 47  
 
 48  2
     private static Logger logger = Logger.getLogger( GuiceProvidedModuleHandler.class.getName() );
 48  1
     private static Logger logger = Logger.getLogger( GuiceProvidedModuleHandler.class.getName() );
 49  
 
 50  24
     final private List<Module> modules = new ArrayList<Module>();
 50  12
     final private List<Module> modules = new ArrayList<Module>();
 51  
 
 52  
     public List<Module> getModules()
 56  
     {
 57  24
         return modules;
 57  12
         return modules;
 58  
     }
 59  
         throws HandleException
 66  
     {
 67  8
         final Class<?> returnType = method.getReturnType();
 67  4
         final Class<?> returnType = method.getReturnType();
 68  
 
 69  8
         if ( logger.isLoggable( Level.FINER ) )
 69  4
         if ( logger.isLoggable( Level.FINER ) )
 70  
         {
 71  2
             logger.finer( "  Found " + GuiceProvidedModules.class.getSimpleName()
 72  
                 + " annotated method, checking if return type '" + returnType.getName() + "' is one of (''|''|'')..." );
 73  
 72  1
                 + " annotated method, checking if return type '" + returnType.getName() + "' is one of " 
 73  1
                 + " ('" 
 74  1
                 + Module.class.getName() 
 75  1
                 + "' | '" 
 76  1
                 + "Iterable<" + Module.class.getName() + ">" 
 77  1
                 + "' | '" 
 78  1
                 + Module.class.getName() + "[]" +
 79  1
                 "' )");
 80  
         }
 74  
 81  
 
 75  8
         if ( !Modifier.isPublic( method.getModifiers() ) || !Modifier.isStatic( method.getModifiers() ) )
 76  
 82  4
         if ( !Modifier.isPublic( method.getModifiers() ) || !Modifier.isStatic( method.getModifiers() ) )
 83  
         {
 77  0
             throw new HandleException( "Impossible to invoke method: " + method + ", it has to be static and public" );
 78  
 84  0
             throw new HandleException( "Impossible to invoke method: " + method + ", it has to be static and public" );
 85  
         }
 79  
 86  
 
 80  8
         final Class<?> type = method.getDeclaringClass();
 81  
 87  4
         final Class<?> type = method.getDeclaringClass();
 88  
 
 82  
 89  
         try
 83  
         {
 84  8
             if ( Module.class.isAssignableFrom( returnType ) )
 85  
             {
 86  4
                 modules.add( (Module) method.invoke( type ) );
 87  
             }
 88  4
             else if ( MoreTypes.getRawType( new TypeLiteral<Iterable<Module>>()
 89  4
             {
 90  
             }.getType() ).isAssignableFrom( returnType ) )
 91  
         {
 91  4
             if ( Module.class.isAssignableFrom( returnType ) )
 92  
             {
 92  2
                 addModules( (Iterable<Module>) method.invoke( type ) );
 93  
             }
 94  2
             else if ( MoreTypes.getRawType( new TypeLiteral<Module[]>()
 95  2
             {
 93  2
                 modules.add( (Module) method.invoke( type ) );
 94  2
             }
 95  2
             else if ( MoreTypes.getRawType( new TypeLiteral<Iterable<Module>>()
 96  
             }.getType() ).isAssignableFrom( returnType ) )
 97  
             {
 98  2
                 addModules( (Module[]) method.invoke( type ) );
 99  
             }
 100  
         }
 101  0
         catch ( Exception e )
 97  4
             }.getType() ).isAssignableFrom( returnType ) )
 98  
             {
 99  1
                 addModules( (Iterable<Module>) method.invoke( type ) );
 100  1
             }
 101  1
             else if ( MoreTypes.getRawType( new TypeLiteral<Module[]>()
 102  
         {
 103  0
             throw new HandleException( "Error invoking method: " + method + "please make sure it is static and public",
             {
 103  2
             }.getType() ).isAssignableFrom( returnType ) )
 104  
                                        e );
 105  8
         }
 106  
 
 107  8
         if ( logger.isLoggable( Level.FINER ) )
             {
 105  1
                 addModules( (Module[]) method.invoke( type ) );
 106  1
             }
 107  
             else
 108  
             {
 109  0
                 throw new ClassCastException("Incompatible return type: '" + returnType.getName() + "' of method '"  
 110  0
                         + method.getName() + "'. \nThe return type must be one of " 
 111  0
                         + " ('" 
 112  0
                         + Module.class.getName() 
 113  0
                         + "' | '" 
 114  0
                         + "Iterable<" + Module.class.getName() + ">" 
 115  0
                         + "' | '" 
 116  0
                         + Module.class.getName() + "[]" +
 117  0
                         "' )" );
 118  
             }
 119  
             
 120  4
             if ( logger.isLoggable( Level.FINER ) )
 121  
             {
 122  1
                 logger.finer( "  Invoked method: " + method.toGenericString() );
 123  
             }
 124  1
         }
 125  0
         catch ( Exception e )
 126  
         {
 109  2
             logger.finer( "  Invoked method: " + method.toGenericString() );
 110  
 127  0
             throw new HandleException( e );
 128  
         }
 111  8
     }
 112  
 129  4
     }
 130  
 
 113  
 131  
     private void addModules( Iterable<Module> modules )
 114  
 132  
     {
 115  2
         for ( Module module : modules )
 116  
 133  3
         for ( Module module : modules )
 134  
         {
 117  2
             this.modules.add( module );
 118  
 135  1
             this.modules.add( module );
 136  
         }
 119  2
     }
 120  
 137  1
     }
 138  
 
 121  
 139  
     private void addModules( Module... modules )
 122  
 140  
     {
 123  4
         for ( Module module : modules )
 124  
 141  2
         for ( Module module : modules )
 142  
         {
 125  2
             this.modules.add( module );
 126  
 143  1
             this.modules.add( module );
 144  
         }
 127  2
     }
 128  
 
 129  
 145  1
     }
 146  
 }
- + \ No newline at end of file