polygene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From nic...@apache.org
Subject [27/50] [abbrv] zest-qi4j git commit: Core Runtime: fixed compilation for JDK 8
Date Fri, 17 Apr 2015 16:05:47 GMT
Core Runtime: fixed compilation for JDK 8


Project: http://git-wip-us.apache.org/repos/asf/zest-qi4j/repo
Commit: http://git-wip-us.apache.org/repos/asf/zest-qi4j/commit/11666730
Tree: http://git-wip-us.apache.org/repos/asf/zest-qi4j/tree/11666730
Diff: http://git-wip-us.apache.org/repos/asf/zest-qi4j/diff/11666730

Branch: refs/heads/master
Commit: 1166673061e33d0c7bcdbec43f8c0f7728c32e3f
Parents: d9c9aae
Author: Paul Merlin <paul@nosphere.org>
Authored: Fri Feb 15 10:43:13 2013 +0100
Committer: Paul Merlin <paul@nosphere.org>
Committed: Fri Feb 15 10:43:13 2013 +0100

----------------------------------------------------------------------
 .../runtime/composite/CompositeMethodModel.java | 25 ++++++++++++++++++++
 1 file changed, 25 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/zest-qi4j/blob/11666730/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeMethodModel.java
----------------------------------------------------------------------
diff --git a/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeMethodModel.java
b/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeMethodModel.java
index baeb8b6..32c5202 100644
--- a/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeMethodModel.java
+++ b/core/runtime/src/main/java/org/qi4j/runtime/composite/CompositeMethodModel.java
@@ -16,6 +16,7 @@ package org.qi4j.runtime.composite;
 
 import java.lang.annotation.Annotation;
 import java.lang.reflect.AnnotatedElement;
+import java.lang.reflect.Array;
 import java.lang.reflect.InvocationHandler;
 import java.lang.reflect.Method;
 import java.util.ArrayList;
@@ -23,6 +24,7 @@ import java.util.Arrays;
 import java.util.List;
 import org.qi4j.api.common.ConstructionException;
 import org.qi4j.api.composite.MethodDescriptor;
+import org.qi4j.api.util.NullArgumentException;
 import org.qi4j.functional.HierarchicalVisitor;
 import org.qi4j.functional.VisitableHierarchy;
 import org.qi4j.runtime.injection.Dependencies;
@@ -291,5 +293,28 @@ public final class CompositeMethodModel
         {
             return new Annotation[ 0 ];
         }
+
+        // @Override (Since JDK 8)
+        @SuppressWarnings( "unchecked" )
+        public <T extends Annotation> T[] getAnnotations( Class<T> annotationClass
)
+        {
+            NullArgumentException.validateNotNull( "annotationClass", annotationClass );
+            return (T[]) Array.newInstance( annotationClass, 0 );
+        }
+
+        // @Override (Since JDK 8)
+        public <T extends Annotation> T getDeclaredAnnotation( Class<T> annotationClass
)
+        {
+            NullArgumentException.validateNotNull( "annotationClass", annotationClass );
+            return null;
+        }
+
+        // @Override (Since JDK 8)
+        @SuppressWarnings( "unchecked" )
+        public <T extends Annotation> T[] getDeclaredAnnotations( Class<T> annotationClass
)
+        {
+            NullArgumentException.validateNotNull( "annotationClass", annotationClass );
+            return (T[]) Array.newInstance( annotationClass, 0 );
+        }
     }
 }


Mime
View raw message