aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From alien11...@apache.org
Subject svn commit: r1765491 - in /aries/trunk/blueprint: blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/ blueprint-maven-plugin/src/main/java/org/apache/ar...
Date Tue, 18 Oct 2016 18:28:24 GMT
Author: alien11689
Date: Tue Oct 18 18:28:24 2016
New Revision: 1765491

URL: http://svn.apache.org/viewvc?rev=1765491&view=rev
Log:
[ARIES-1619] Add javadoc in blueprint maven plugin spi

Added:
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/AnnotationHandler.java
Removed:
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/CustomFactoryMethodAnnotationHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/resources/META-INF/services/org.apache.aries.blueprint.plugin.spi.CustomFactoryMethodAnnotationHandler
Modified:
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/Activation.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanAnnotationHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanEnricher.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanFinder.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BlueprintConfiguration.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ContextEnricher.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ContextInitializationHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/CustomDependencyAnnotationHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/FactoryMethodFinder.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/FieldAnnotationHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/InjectLikeHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/MethodAnnotationHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/NamedLikeHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/QualifingAnnotationFinder.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ValueInjectionHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/XmlWriter.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/Extensions.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/ConfigPropertyInjectionHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/NamedBeanFinder.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/PersistenceContextHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/PersistenceUnitHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/ProducesHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/SingletonBeanFinder.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Context.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Property.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/pax/OsgiServiceProviderHandler.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/spring/ComponentBeanFinder.java
    aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/spring/ValueInjectionHandler.java

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/Activation.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/Activation.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/Activation.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/Activation.java Tue Oct 18 18:28:24 2016
@@ -18,6 +18,9 @@
  */
 package org.apache.aries.blueprint.plugin.spi;
 
+/**
+ * Activation mode for bean
+ */
 public enum Activation {
     EAGER,
     LAZY;

Added: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/AnnotationHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/AnnotationHandler.java?rev=1765491&view=auto
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/AnnotationHandler.java (added)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/AnnotationHandler.java Tue Oct 18 18:28:24 2016
@@ -0,0 +1,31 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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 org.apache.aries.blueprint.plugin.spi;
+
+import java.lang.annotation.Annotation;
+
+/**
+ * Base annotation handler interface
+ */
+public interface AnnotationHandler<A extends Annotation> {
+    /**
+     * @return annotation class
+     */
+    Class<A> getAnnotation();
+}

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanAnnotationHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanAnnotationHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanAnnotationHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanAnnotationHandler.java Tue Oct 18 18:28:24 2016
@@ -21,8 +21,15 @@ package org.apache.aries.blueprint.plugi
 import java.lang.annotation.Annotation;
 import java.lang.reflect.AnnotatedElement;
 
-public interface BeanAnnotationHandler<A extends Annotation> {
-    Class<A> getAnnotation();
-
+/**
+ * Annotation A allows for enriching blueprint XML or add new bean to context when bean class or factory method is marked with such annotation
+ */
+public interface BeanAnnotationHandler<A extends Annotation> extends AnnotationHandler<A> {
+    /**
+     * Handle annotation A on bean or factory method
+     * @param annotatedElement bean class or factory method
+     * @param id id of bean
+     * @param contextEnricher context enricher
+     */
     void handleBeanAnnotation(AnnotatedElement annotatedElement, String id, ContextEnricher contextEnricher, BeanEnricher beanEnricher);
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanEnricher.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanEnricher.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanEnricher.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanEnricher.java Tue Oct 18 18:28:24 2016
@@ -18,7 +18,22 @@
  */
 package org.apache.aries.blueprint.plugin.spi;
 
+/**
+ * Interface allows for adding custom XML or adding attributes to bean element
+ * Instance of this interface is provided by plugin.
+ */
 public interface BeanEnricher {
+    /**
+     * Add attribute to bean element
+     * @param key name of attribute
+     * @param value value of attribute
+     */
     void addAttribute(String key, String value);
+
+    /**
+     * Add custom XML inside bean element
+     * @param id identifier of writer instance (should be unique)
+     * @param blueprintWriter callback used to write custom XML
+     */
     void addBeanContentWriter(String id, XmlWriter blueprintWriter);
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanFinder.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanFinder.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanFinder.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BeanFinder.java Tue Oct 18 18:28:24 2016
@@ -6,9 +6,9 @@
  * 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
- *
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
  * 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
@@ -20,8 +20,13 @@ package org.apache.aries.blueprint.plugi
 
 import java.lang.annotation.Annotation;
 
-public interface BeanFinder<A extends Annotation> {
-    Class<A> beanAnnotation();
+/**
+ * Annotation A on class generates bean from this class
+ */
+public interface BeanFinder<A extends Annotation> extends AnnotationHandler<A> {
 
+    /**
+     * @return true if bean annotated with A should be generated in singleton scope, false otherwise
+     */
     boolean isSingleton();
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BlueprintConfiguration.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BlueprintConfiguration.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BlueprintConfiguration.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/BlueprintConfiguration.java Tue Oct 18 18:28:24 2016
@@ -1,10 +1,42 @@
+/**
+ * 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
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
+ * 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 org.apache.aries.blueprint.plugin.spi;
 
 import java.util.Map;
 import java.util.Set;
 
+/**
+ * Blueprint plugin configuration from pom.xml
+ */
 public interface BlueprintConfiguration {
+    /**
+     * @return values of namespaces parameter
+     */
     Set<String> getNamespaces();
+
+    /**
+     * @return value of default activation parameter
+     */
     Activation getDefaultActivation();
+
+    /**
+     * @return custom parameters
+     */
     Map<String, String> getCustomParameters();
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ContextEnricher.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ContextEnricher.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ContextEnricher.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ContextEnricher.java Tue Oct 18 18:28:24 2016
@@ -18,8 +18,27 @@
  */
 package org.apache.aries.blueprint.plugin.spi;
 
+/**
+ * Interface allows for adding custom XML or adding beans to bean search context
+ * Instance of this interface is provided by plugin.
+ */
 public interface ContextEnricher {
+    /**
+     * Add bean to search context (id should be unique)
+     * @param id name of bean
+     * @param clazz class of bean
+     */
     void addBean(String id, Class<?> clazz);
+
+    /**
+     * Add custom XML to blueprint
+     * @param id identifier of writer instance (should be unique)
+     * @param blueprintWriter callback used to write custom XML
+     */
     void addBlueprintContentWriter(String id, XmlWriter blueprintWriter);
+
+    /**
+     * @return plugin configuration from pom.xml
+     */
     BlueprintConfiguration getBlueprintConfiguration();
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ContextInitializationHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ContextInitializationHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ContextInitializationHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ContextInitializationHandler.java Tue Oct 18 18:28:24 2016
@@ -1,5 +1,12 @@
 package org.apache.aries.blueprint.plugin.spi;
 
+/**
+ * Handler called at the beginning of blueprint XML creation
+ */
 public interface ContextInitializationHandler {
+    /**
+     * Add custom XML or add bean to context
+     * @param contextEnricher context enricher
+     */
     void initContext(ContextEnricher contextEnricher);
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/CustomDependencyAnnotationHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/CustomDependencyAnnotationHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/CustomDependencyAnnotationHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/CustomDependencyAnnotationHandler.java Tue Oct 18 18:28:24 2016
@@ -21,10 +21,24 @@ package org.apache.aries.blueprint.plugi
 import java.lang.annotation.Annotation;
 import java.lang.reflect.AnnotatedElement;
 
-public interface CustomDependencyAnnotationHandler<A extends Annotation> {
-    Class<A> getAnnotation();
-
+/**
+ * Annotation A allows for enriching blueprint XML or add new bean to context when injecting bean, e. g. for generating in bean which could be injected
+ */
+public interface CustomDependencyAnnotationHandler<A extends Annotation> extends AnnotationHandler<A> {
+    /**
+     * @param annotatedElement field or setter method
+     * @param name name of bean to inject (null if bean name is not provided)
+     * @param contextEnricher context enricher
+     * @return name of generated bean which should be injected or null
+     */
     String handleDependencyAnnotation(AnnotatedElement annotatedElement, String name, ContextEnricher contextEnricher);
 
+    /**
+     * @param clazz class of constructor parameter or setter parameter
+     * @param annotation instance of annotation A
+     * @param name name of bean to inject (null if bean name is not provided)
+     * @param contextEnricher context enricher
+     * @return name of generated bean which should be injected or null
+     */
     String handleDependencyAnnotation(Class<?> clazz, A annotation, String name, ContextEnricher contextEnricher);
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/FactoryMethodFinder.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/FactoryMethodFinder.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/FactoryMethodFinder.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/FactoryMethodFinder.java Tue Oct 18 18:28:24 2016
@@ -20,6 +20,8 @@ package org.apache.aries.blueprint.plugi
 
 import java.lang.annotation.Annotation;
 
-public interface FactoryMethodFinder<A extends Annotation> {
-    Class<A> factoryMethodAnnotation();
+/**
+ * Annotation A on method marks this method as factory method
+ */
+public interface FactoryMethodFinder<A extends Annotation> extends AnnotationHandler<A> {
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/FieldAnnotationHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/FieldAnnotationHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/FieldAnnotationHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/FieldAnnotationHandler.java Tue Oct 18 18:28:24 2016
@@ -22,8 +22,16 @@ import java.lang.annotation.Annotation;
 import java.lang.reflect.Field;
 import java.util.List;
 
-public interface FieldAnnotationHandler<A extends Annotation> {
-    Class<A> getAnnotation();
-
-    void handleMethodAnnotation(Class<?> clazz, List<Field> fields, ContextEnricher contextEnricher, BeanEnricher beanEnricher);
+/**
+ * Annotation A on field could write custom XML in blueprint or add bean to blueprint context
+ */
+public interface FieldAnnotationHandler<A extends Annotation> extends AnnotationHandler<A> {
+    /**
+     * Handle annotations A on methods
+     * @param clazz class which contains annotated fields\
+     * @param fields fields annotated with annotation A
+     * @param contextEnricher context enricher
+     * @param beanEnricher bean enricher
+     */
+    void handleFieldAnnotation(Class<?> clazz, List<Field> fields, ContextEnricher contextEnricher, BeanEnricher beanEnricher);
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/InjectLikeHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/InjectLikeHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/InjectLikeHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/InjectLikeHandler.java Tue Oct 18 18:28:24 2016
@@ -6,9 +6,9 @@
  * 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
- *
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
  * 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
@@ -20,6 +20,8 @@ package org.apache.aries.blueprint.plugi
 
 import java.lang.annotation.Annotation;
 
-public interface InjectLikeHandler<A extends Annotation> {
-    Class<A> getAnnotation();
+/**
+ * Annotation A on constructor, setter or field adds inject beans into annotated element.
+ */
+public interface InjectLikeHandler<A extends Annotation> extends AnnotationHandler<A> {
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/MethodAnnotationHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/MethodAnnotationHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/MethodAnnotationHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/MethodAnnotationHandler.java Tue Oct 18 18:28:24 2016
@@ -22,8 +22,16 @@ import java.lang.annotation.Annotation;
 import java.lang.reflect.Method;
 import java.util.List;
 
-public interface MethodAnnotationHandler<A extends Annotation> {
-    Class<A> getAnnotation();
-
+/**
+ * Annotation A on method could write custom XML in blueprint or add bean to blueprint context
+ */
+public interface MethodAnnotationHandler<A extends Annotation> extends AnnotationHandler<A> {
+    /**
+     * Handle annotations A on methods
+     * @param clazz class which contains annotated methods
+     * @param methods methods annotated with annotation A
+     * @param contextEnricher context enricher
+     * @param beanEnricher bean enricher
+     */
     void handleMethodAnnotation(Class<?> clazz, List<Method> methods, ContextEnricher contextEnricher, BeanEnricher beanEnricher);
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/NamedLikeHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/NamedLikeHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/NamedLikeHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/NamedLikeHandler.java Tue Oct 18 18:28:24 2016
@@ -6,9 +6,9 @@
  * 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
- *
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
  * 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
@@ -18,12 +18,26 @@
  */
 package org.apache.aries.blueprint.plugin.spi;
 
+import java.lang.annotation.Annotation;
 import java.lang.reflect.AnnotatedElement;
 
-public interface NamedLikeHandler {
-    Class getAnnotation();
-
+/**
+ * Annotation A on class provides id of bean in blueprint XML created from this class. Annotation could be also used to inject bean with provided id in constructor, setter or field.
+ */
+public interface NamedLikeHandler<A extends Annotation> extends AnnotationHandler<A> {
+    /**
+     * @param clazz depends on annotated element - if it is class then clazz is class itself, if setter then class of method argument and if field then class of field
+     * @param annotatedElement class, method, field annotated with A
+     * @return name of bean
+     */
     String getName(Class clazz, AnnotatedElement annotatedElement);
 
+    /**
+     * Using to get name of bean based only on annotation when:
+     * - inject via constructor
+     * - inject via setter
+     * @param annotation instance of A annotation
+     * @return name of bean
+     */
     String getName(Object annotation);
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/QualifingAnnotationFinder.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/QualifingAnnotationFinder.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/QualifingAnnotationFinder.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/QualifingAnnotationFinder.java Tue Oct 18 18:28:24 2016
@@ -6,9 +6,9 @@
  * 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
- *
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
  * 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
@@ -20,6 +20,8 @@ package org.apache.aries.blueprint.plugi
 
 import java.lang.annotation.Annotation;
 
-public interface QualifingAnnotationFinder<A extends Annotation> {
-    Class<A> getAnnotation();
+/**
+ * Annotation A is qualifying another annotation, so such marked annotation could be used to inject beans which class are also annotated with this annotation
+ */
+public interface QualifingAnnotationFinder<A extends Annotation> extends AnnotationHandler<A> {
 }
\ No newline at end of file

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ValueInjectionHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ValueInjectionHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ValueInjectionHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/ValueInjectionHandler.java Tue Oct 18 18:28:24 2016
@@ -6,9 +6,9 @@
  * 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
- *
+ * <p>
+ * http://www.apache.org/licenses/LICENSE-2.0
+ * <p>
  * 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
@@ -19,12 +19,16 @@
 package org.apache.aries.blueprint.plugin.spi;
 
 import java.lang.annotation.Annotation;
-import java.lang.reflect.AnnotatedElement;
-
-public interface ValueInjectionHandler<A extends Annotation> {
-    Class<A> getAnnotation();
-
-    String getValue(Class clazz, AnnotatedElement annotatedElement);
 
+/**
+ * Annotation on field, setter or constructor argument is used to generate argument or property elements with value attribute inside bean
+ */
+public interface ValueInjectionHandler<A extends Annotation> extends AnnotationHandler<A> {
+    /**
+     * Interpret annotation instance and create value of argument's or property's value attribute
+     *
+     * @param annotation instance of annotation A
+     * @return value of
+     */
     String getValue(Object annotation);
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/XmlWriter.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/XmlWriter.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/XmlWriter.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin-spi/src/main/java/org/apache/aries/blueprint/plugin/spi/XmlWriter.java Tue Oct 18 18:28:24 2016
@@ -3,6 +3,14 @@ package org.apache.aries.blueprint.plugi
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamWriter;
 
+/**
+ * Write custom part of blueprint XML depends on context (inside bean or blueprint element)
+ */
 public interface XmlWriter {
+    /**
+     * Write custom XML
+     * @param xmlStreamWriter xml writer provided by plugin
+     * @throws XMLStreamException when exception occurred during writing XML
+     */
     void write(XMLStreamWriter xmlStreamWriter) throws XMLStreamException;
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/Extensions.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/Extensions.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/Extensions.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/Extensions.java Tue Oct 18 18:28:24 2016
@@ -22,7 +22,6 @@ import org.apache.aries.blueprint.plugin
 import org.apache.aries.blueprint.plugin.spi.BeanFinder;
 import org.apache.aries.blueprint.plugin.spi.ContextInitializationHandler;
 import org.apache.aries.blueprint.plugin.spi.CustomDependencyAnnotationHandler;
-import org.apache.aries.blueprint.plugin.spi.CustomFactoryMethodAnnotationHandler;
 import org.apache.aries.blueprint.plugin.spi.FactoryMethodFinder;
 import org.apache.aries.blueprint.plugin.spi.FieldAnnotationHandler;
 import org.apache.aries.blueprint.plugin.spi.InjectLikeHandler;
@@ -43,7 +42,6 @@ public class Extensions {
     public static final List<NamedLikeHandler> namedLikeHandlers = new ArrayList<>();
     public static final List<ValueInjectionHandler<? extends Annotation>> valueInjectionHandlers = new ArrayList<>();
     public static final List<BeanAnnotationHandler<? extends Annotation>> BEAN_ANNOTATION_HANDLERs = new ArrayList<>();
-    public static final List<CustomFactoryMethodAnnotationHandler<? extends Annotation>> customFactoryMethodAnnotationHandlers = new ArrayList<>();
     public static final List<CustomDependencyAnnotationHandler<? extends Annotation>> customDependencyAnnotationHandlers = new ArrayList<>();
     public static final List<MethodAnnotationHandler<? extends Annotation>> methodAnnotationHandlers = new ArrayList<>();
     public static final List<FieldAnnotationHandler<? extends Annotation>> fieldAnnotationHandlers = new ArrayList<>();
@@ -53,9 +51,9 @@ public class Extensions {
 
     static {
         for (BeanFinder beanFinder : ServiceLoader.load(BeanFinder.class)) {
-            beanMarkingAnnotationClasses.add(beanFinder.beanAnnotation());
+            beanMarkingAnnotationClasses.add(beanFinder.getAnnotation());
             if (beanFinder.isSingleton()) {
-                singletons.add(beanFinder.beanAnnotation());
+                singletons.add(beanFinder.getAnnotation());
             }
         }
 
@@ -75,10 +73,6 @@ public class Extensions {
             BEAN_ANNOTATION_HANDLERs.add(beanAnnotationHandler);
         }
 
-        for (CustomFactoryMethodAnnotationHandler<? extends Annotation> customFactoryMethodAnnotationHandler : ServiceLoader.load(CustomFactoryMethodAnnotationHandler.class)) {
-            customFactoryMethodAnnotationHandlers.add(customFactoryMethodAnnotationHandler);
-        }
-
         for (CustomDependencyAnnotationHandler<? extends Annotation> customDependencyAnnotationHandler : ServiceLoader.load(CustomDependencyAnnotationHandler.class)) {
             customDependencyAnnotationHandlers.add(customDependencyAnnotationHandler);
         }
@@ -92,7 +86,7 @@ public class Extensions {
         }
 
         for (FactoryMethodFinder<? extends Annotation> factoryMethodFinder : ServiceLoader.load(FactoryMethodFinder.class)) {
-            factoryMethodAnnotationClasses.add((Class<? extends Annotation>) factoryMethodFinder.factoryMethodAnnotation());
+            factoryMethodAnnotationClasses.add((Class<? extends Annotation>) factoryMethodFinder.getAnnotation());
         }
 
         for (QualifingAnnotationFinder<? extends Annotation> qualifingAnnotationFinder : ServiceLoader.load(QualifingAnnotationFinder.class)) {

Modified: aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/ConfigPropertyInjectionHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/ConfigPropertyInjectionHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/ConfigPropertyInjectionHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/ConfigPropertyInjectionHandler.java Tue Oct 18 18:28:24 2016
@@ -18,8 +18,6 @@
  */
 package org.apache.aries.blueprint.plugin.javax;
 
-import java.lang.reflect.AnnotatedElement;
-
 import org.apache.aries.blueprint.api.config.ConfigProperty;
 
 public class ConfigPropertyInjectionHandler implements org.apache.aries.blueprint.plugin.spi.ValueInjectionHandler<ConfigProperty> {
@@ -29,13 +27,6 @@ public class ConfigPropertyInjectionHand
         return ConfigProperty.class;
     }
 
-    @SuppressWarnings("rawtypes")
-    @Override
-    public String getValue(Class clazz, AnnotatedElement annotatedElement) {
-        ConfigProperty annotation = annotatedElement.getAnnotation(ConfigProperty.class);
-        return annotation.value();
-    }
-
     @Override
     public String getValue(Object annotation) {
         return ((ConfigProperty)annotation).value();

Modified: aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/NamedBeanFinder.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/NamedBeanFinder.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/NamedBeanFinder.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/NamedBeanFinder.java Tue Oct 18 18:28:24 2016
@@ -22,7 +22,7 @@ import javax.inject.Named;
 
 public class NamedBeanFinder implements org.apache.aries.blueprint.plugin.spi.BeanFinder<Named> {
     @Override
-    public Class<Named> beanAnnotation() {
+    public Class<Named> getAnnotation() {
         return Named.class;
     }
 

Modified: aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/PersistenceContextHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/PersistenceContextHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/PersistenceContextHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/PersistenceContextHandler.java Tue Oct 18 18:28:24 2016
@@ -41,7 +41,7 @@ public class PersistenceContextHandler i
     }
 
     @Override
-    public void handleMethodAnnotation(Class<?> clazz, List<Field> fields, ContextEnricher contextEnricher, BeanEnricher beanEnricher) {
+    public void handleFieldAnnotation(Class<?> clazz, List<Field> fields, ContextEnricher contextEnricher, BeanEnricher beanEnricher) {
         final String nsJpa1 = getNamespaceByPattern(contextEnricher.getBlueprintConfiguration().getNamespaces(), PATTERN_NS_JPA1);
         if (nsJpa1 != null) {
             for (final Field field : fields) {

Modified: aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/PersistenceUnitHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/PersistenceUnitHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/PersistenceUnitHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/PersistenceUnitHandler.java Tue Oct 18 18:28:24 2016
@@ -41,7 +41,7 @@ public class PersistenceUnitHandler impl
     }
 
     @Override
-    public void handleMethodAnnotation(Class<?> clazz, List<Field> fields, ContextEnricher contextEnricher, BeanEnricher beanEnricher) {
+    public void handleFieldAnnotation(Class<?> clazz, List<Field> fields, ContextEnricher contextEnricher, BeanEnricher beanEnricher) {
         final String nsJpa1 = getNamespaceByPattern(contextEnricher.getBlueprintConfiguration().getNamespaces(), PATTERN_NS_JPA1);
         if (nsJpa1 != null) {
             for (final Field field : fields) {

Modified: aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/ProducesHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/ProducesHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/ProducesHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/ProducesHandler.java Tue Oct 18 18:28:24 2016
@@ -24,7 +24,7 @@ import javax.enterprise.inject.Produces;
 
 public class ProducesHandler implements FactoryMethodFinder<Produces> {
     @Override
-    public Class<Produces> factoryMethodAnnotation() {
+    public Class<Produces> getAnnotation() {
         return Produces.class;
     }
 }

Modified: aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/SingletonBeanFinder.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/SingletonBeanFinder.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/SingletonBeanFinder.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/javax/SingletonBeanFinder.java Tue Oct 18 18:28:24 2016
@@ -22,7 +22,7 @@ import javax.inject.Singleton;
 
 public class SingletonBeanFinder implements org.apache.aries.blueprint.plugin.spi.BeanFinder<Singleton> {
     @Override
-    public Class<Singleton> beanAnnotation() {
+    public Class<Singleton> getAnnotation() {
         return Singleton.class;
     }
 

Modified: aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Bean.java Tue Oct 18 18:28:24 2016
@@ -26,7 +26,6 @@ import org.apache.aries.blueprint.plugin
 import org.apache.aries.blueprint.plugin.spi.FieldAnnotationHandler;
 import org.apache.aries.blueprint.plugin.spi.InjectLikeHandler;
 import org.apache.aries.blueprint.plugin.spi.MethodAnnotationHandler;
-import org.apache.aries.blueprint.plugin.spi.NamedLikeHandler;
 import org.apache.aries.blueprint.plugin.spi.XmlWriter;
 
 import java.lang.annotation.Annotation;
@@ -43,6 +42,7 @@ import java.util.Set;
 import java.util.SortedSet;
 import java.util.TreeSet;
 
+import static org.apache.aries.blueprint.plugin.model.AnnotationHelper.findName;
 import static org.apache.aries.blueprint.plugin.model.AnnotationHelper.findValue;
 
 public class Bean extends BeanRef implements BeanEnricher {
@@ -89,7 +89,7 @@ public class Bean extends BeanRef implem
         for (FieldAnnotationHandler fieldAnnotationHandler : Extensions.fieldAnnotationHandlers) {
             List<Field> fields = introspector.fieldsWith(fieldAnnotationHandler.getAnnotation());
             if (fields.size() > 0) {
-                fieldAnnotationHandler.handleMethodAnnotation(clazz, fields, contextEnricher, this);
+                fieldAnnotationHandler.handleFieldAnnotation(clazz, fields, contextEnricher, this);
             }
         }
     }
@@ -191,19 +191,6 @@ public class Bean extends BeanRef implem
         }
     }
 
-    private String findName(Annotation[] annotations) {
-        for (NamedLikeHandler namedLikeHandler : Extensions.namedLikeHandlers) {
-            Object annotation = AnnotationHelper.findAnnotation(annotations, namedLikeHandler.getAnnotation());
-            if (annotation != null) {
-                String name = namedLikeHandler.getName(annotation);
-                if (name != null) {
-                    return name;
-                }
-            }
-        }
-        return null;
-    }
-
     @Override
     public String toString() {
         return clazz.getName();

Modified: aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Context.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Context.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Context.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Context.java Tue Oct 18 18:28:24 2016
@@ -22,7 +22,6 @@ import org.apache.aries.blueprint.plugin
 import org.apache.aries.blueprint.plugin.spi.BlueprintConfiguration;
 import org.apache.aries.blueprint.plugin.spi.ContextEnricher;
 import org.apache.aries.blueprint.plugin.spi.ContextInitializationHandler;
-import org.apache.aries.blueprint.plugin.spi.CustomFactoryMethodAnnotationHandler;
 import org.apache.aries.blueprint.plugin.spi.XmlWriter;
 
 import java.lang.annotation.Annotation;
@@ -86,11 +85,6 @@ public class Context implements Blueprin
                 beanFromFactory.setSingleton();
             }
             reg.add(beanFromFactory);
-            for (CustomFactoryMethodAnnotationHandler customFactoryMethodAnnotationHandler : Extensions.customFactoryMethodAnnotationHandlers) {
-                if (AnnotationHelper.findAnnotation(method.getAnnotations(), customFactoryMethodAnnotationHandler.getAnnotation()) != null) {
-                    customFactoryMethodAnnotationHandler.handleFactoryMethodAnnotation(method, beanFromFactory.id, this);
-                }
-            }
         }
     }
 

Modified: aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Property.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Property.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Property.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/model/Property.java Tue Oct 18 18:28:24 2016
@@ -27,6 +27,8 @@ import java.lang.reflect.AnnotatedElemen
 import java.lang.reflect.Field;
 import java.lang.reflect.Method;
 
+import static org.apache.aries.blueprint.plugin.model.AnnotationHelper.findName;
+
 public class Property implements Comparable<Property> {
     public final String name;
     public final String ref;
@@ -83,7 +85,7 @@ public class Property implements Compara
         if (needsInject(method)) {
             String ref = getForcedRefName(method);
             if (ref == null) {
-                ref = getForcedRefName(method.getParameterAnnotations()[0]);
+                ref = findName(method.getParameterAnnotations()[0]);
             }
             for (CustomDependencyAnnotationHandler customDependencyAnnotationHandler : Extensions.customDependencyAnnotationHandlers) {
                 Annotation annotation = (Annotation) AnnotationHelper.findAnnotation(method.getAnnotations(), customDependencyAnnotationHandler.getAnnotation());
@@ -159,19 +161,6 @@ public class Property implements Compara
                 if (name != null) {
                     return name;
                 }
-            }
-        }
-        return null;
-    }
-
-    private static String getForcedRefName(Annotation[] annotations) {
-        for (NamedLikeHandler namedLikeHandler : Extensions.namedLikeHandlers) {
-            Annotation annotation = (Annotation) AnnotationHelper.findAnnotation(annotations, namedLikeHandler.getAnnotation());
-            if (annotation != null) {
-                String name = namedLikeHandler.getName(annotation);
-                if (name != null) {
-                    return name;
-                }
             }
         }
         return null;

Modified: aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/pax/OsgiServiceProviderHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/pax/OsgiServiceProviderHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/pax/OsgiServiceProviderHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/pax/OsgiServiceProviderHandler.java Tue Oct 18 18:28:24 2016
@@ -23,7 +23,6 @@ import com.google.common.collect.Lists;
 import org.apache.aries.blueprint.plugin.spi.BeanAnnotationHandler;
 import org.apache.aries.blueprint.plugin.spi.BeanEnricher;
 import org.apache.aries.blueprint.plugin.spi.ContextEnricher;
-import org.apache.aries.blueprint.plugin.spi.CustomFactoryMethodAnnotationHandler;
 import org.apache.aries.blueprint.plugin.spi.XmlWriter;
 import org.ops4j.pax.cdi.api.OsgiServiceProvider;
 import org.ops4j.pax.cdi.api.Properties;
@@ -36,18 +35,13 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 
-public class OsgiServiceProviderHandler implements BeanAnnotationHandler<OsgiServiceProvider>, CustomFactoryMethodAnnotationHandler<OsgiServiceProvider> {
+public class OsgiServiceProviderHandler implements BeanAnnotationHandler<OsgiServiceProvider> {
     @Override
     public Class<OsgiServiceProvider> getAnnotation() {
         return OsgiServiceProvider.class;
     }
 
     @Override
-    public void handleFactoryMethodAnnotation(AnnotatedElement annotatedElement, String id, ContextEnricher contextEnricher) {
-        handleAnnotation(annotatedElement, id, contextEnricher);
-    }
-
-    @Override
     public void handleBeanAnnotation(AnnotatedElement annotatedElement, final String id, ContextEnricher contextEnricher, BeanEnricher beanEnricher) {
         handleAnnotation(annotatedElement, id, contextEnricher);
     }

Modified: aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/spring/ComponentBeanFinder.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/spring/ComponentBeanFinder.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/spring/ComponentBeanFinder.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/spring/ComponentBeanFinder.java Tue Oct 18 18:28:24 2016
@@ -24,7 +24,7 @@ import org.springframework.stereotype.Co
 public class ComponentBeanFinder implements BeanFinder<Component> {
 
     @Override
-    public Class<Component> beanAnnotation() {
+    public Class<Component> getAnnotation() {
         return Component.class;
     }
 

Modified: aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/spring/ValueInjectionHandler.java
URL: http://svn.apache.org/viewvc/aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/spring/ValueInjectionHandler.java?rev=1765491&r1=1765490&r2=1765491&view=diff
==============================================================================
--- aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/spring/ValueInjectionHandler.java (original)
+++ aries/trunk/blueprint/blueprint-maven-plugin/src/main/java/org/apache/aries/blueprint/plugin/spring/ValueInjectionHandler.java Tue Oct 18 18:28:24 2016
@@ -20,8 +20,6 @@ package org.apache.aries.blueprint.plugi
 
 import org.springframework.beans.factory.annotation.Value;
 
-import java.lang.reflect.AnnotatedElement;
-
 public class ValueInjectionHandler implements org.apache.aries.blueprint.plugin.spi.ValueInjectionHandler<Value> {
 
     @Override
@@ -30,12 +28,6 @@ public class ValueInjectionHandler imple
     }
 
     @Override
-    public String getValue(Class clazz, AnnotatedElement annotatedElement) {
-        Value annotation = annotatedElement.getAnnotation(Value.class);
-        return annotation.value().replaceAll("\\:.*\\}", "}");
-    }
-
-    @Override
     public String getValue(Object annotation) {
         Value value = Value.class.cast(annotation);
         return value.value().replaceAll("\\:.*\\}", "}");



Mime
View raw message