This is an automated email from the ASF dual-hosted git repository.

davsclaus pushed a commit to branch bean
in repository https://gitbox.apache.org/repos/asf/camel.git

commit 768112280cd4d85073eea9659373b55714319214
Author: Claus Ibsen <claus.ib...@gmail.com>
AuthorDate: Thu Apr 25 10:11:51 2019 +0200

    CAMEL-13449: camel3 - Move bean component out of camel-core
---
 .../apache/camel/component/bean/ParameterInfo.java   | 18 ++----------------
 .../aggregate/AggregationStrategyBeanInfo.java       |  1 -
 .../aggregate/AggregationStrategyMethodInfo.java     |  1 -
 .../camel/processor/aggregate}/ParameterInfo.java    | 20 +++-----------------
 4 files changed, 5 insertions(+), 35 deletions(-)

diff --git 
a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ParameterInfo.java
 
b/components/camel-bean/src/main/java/org/apache/camel/component/bean/ParameterInfo.java
index b747271..163ebfc 100644
--- 
a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ParameterInfo.java
+++ 
b/components/camel-bean/src/main/java/org/apache/camel/component/bean/ParameterInfo.java
@@ -24,16 +24,14 @@ import org.apache.camel.Expression;
 /**
  * Parameter information to be used for method invocation.
  */
-public class ParameterInfo {
-
-    // TODO: Move to camel-support
+final class ParameterInfo {
 
     private final int index;
     private final Class<?> type;
     private final Annotation[] annotations;
     private Expression expression;
 
-    public ParameterInfo(int index, Class<?> type, Annotation[] annotations, 
Expression expression) {
+    ParameterInfo(int index, Class<?> type, Annotation[] annotations, 
Expression expression) {
         this.index = index;
         this.type = type;
         this.annotations = annotations;
@@ -60,18 +58,6 @@ public class ParameterInfo {
         this.expression = expression;
     }
 
-    public <T extends Annotation> T hasAnnotation(T type) {
-        if (annotations == null) {
-            return null;
-        }
-        for (Annotation ann : annotations) {
-            if (ann.annotationType().isAssignableFrom(type.annotationType())) {
-                return (T) ann;
-            }
-        }
-        return null;
-    }
-
     @Override
     public String toString() {
         final StringBuilder sb = new StringBuilder();
diff --git 
a/core/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategyBeanInfo.java
 
b/core/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategyBeanInfo.java
index 11dadb2..53dd1c2 100644
--- 
a/core/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategyBeanInfo.java
+++ 
b/core/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategyBeanInfo.java
@@ -23,7 +23,6 @@ import java.util.List;
 
 import org.apache.camel.Expression;
 import org.apache.camel.builder.ExpressionBuilder;
-import org.apache.camel.component.bean.ParameterInfo;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
diff --git 
a/core/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategyMethodInfo.java
 
b/core/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategyMethodInfo.java
index 06f7d48..3ad8fb1 100644
--- 
a/core/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategyMethodInfo.java
+++ 
b/core/camel-core/src/main/java/org/apache/camel/processor/aggregate/AggregationStrategyMethodInfo.java
@@ -21,7 +21,6 @@ import java.util.ArrayList;
 import java.util.List;
 
 import org.apache.camel.Exchange;
-import org.apache.camel.component.bean.ParameterInfo;
 
 /**
  * Method information about the POJO method to call when using the {@link 
AggregationStrategyBeanAdapter}.
diff --git 
a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ParameterInfo.java
 
b/core/camel-core/src/main/java/org/apache/camel/processor/aggregate/ParameterInfo.java
similarity index 79%
copy from 
components/camel-bean/src/main/java/org/apache/camel/component/bean/ParameterInfo.java
copy to 
core/camel-core/src/main/java/org/apache/camel/processor/aggregate/ParameterInfo.java
index b747271..c781927 100644
--- 
a/components/camel-bean/src/main/java/org/apache/camel/component/bean/ParameterInfo.java
+++ 
b/core/camel-core/src/main/java/org/apache/camel/processor/aggregate/ParameterInfo.java
@@ -14,7 +14,7 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-package org.apache.camel.component.bean;
+package org.apache.camel.processor.aggregate;
 
 import java.lang.annotation.Annotation;
 import java.util.Arrays;
@@ -24,16 +24,14 @@ import org.apache.camel.Expression;
 /**
  * Parameter information to be used for method invocation.
  */
-public class ParameterInfo {
-
-    // TODO: Move to camel-support
+final class ParameterInfo {
 
     private final int index;
     private final Class<?> type;
     private final Annotation[] annotations;
     private Expression expression;
 
-    public ParameterInfo(int index, Class<?> type, Annotation[] annotations, 
Expression expression) {
+    ParameterInfo(int index, Class<?> type, Annotation[] annotations, 
Expression expression) {
         this.index = index;
         this.type = type;
         this.annotations = annotations;
@@ -60,18 +58,6 @@ public class ParameterInfo {
         this.expression = expression;
     }
 
-    public <T extends Annotation> T hasAnnotation(T type) {
-        if (annotations == null) {
-            return null;
-        }
-        for (Annotation ann : annotations) {
-            if (ann.annotationType().isAssignableFrom(type.annotationType())) {
-                return (T) ann;
-            }
-        }
-        return null;
-    }
-
     @Override
     public String toString() {
         final StringBuilder sb = new StringBuilder();

Reply via email to