You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2015/01/19 11:25:12 UTC

[1/2] camel git commit: CAMEL-7999: apt compiler to better grab javadoc from builder pattern for the json schema documentation.

Repository: camel
Updated Branches:
  refs/heads/master 5d5c0a2ed -> bd3218774


CAMEL-7999: apt compiler to better grab javadoc from builder pattern for the json schema documentation.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/4a4188e1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/4a4188e1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/4a4188e1

Branch: refs/heads/master
Commit: 4a4188e10bff1af694d5339b1dfa04bdb921db80
Parents: 5d5c0a2
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Jan 19 11:06:02 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Jan 19 11:06:02 2015 +0100

----------------------------------------------------------------------
 .../tools/apt/AbstractAnnotationProcessor.java  | 17 ++++++++-
 .../camel/tools/apt/EipAnnotationProcessor.java | 40 ++++++++++----------
 .../tools/apt/EndpointAnnotationProcessor.java  |  4 +-
 3 files changed, 37 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/4a4188e1/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java
index 66df71a..8a9f72d 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java
@@ -49,7 +49,7 @@ import static org.apache.camel.tools.apt.Strings.isNullOrEmpty;
  */
 public abstract class AbstractAnnotationProcessor extends AbstractProcessor {
 
-    protected String findJavaDoc(Elements elementUtils, Element element, String fieldName, TypeElement classElement, boolean builderPattern) {
+    protected String findJavaDoc(Elements elementUtils, Element element, String fieldName, String name, TypeElement classElement, boolean builderPattern) {
         String answer = null;
         if (element != null) {
             answer = elementUtils.getDocComment(element);
@@ -98,8 +98,21 @@ public abstract class AbstractAnnotationProcessor extends AbstractProcessor {
 
             // lets try builder pattern
             if (answer == null && builderPattern) {
-                // lets find the getter
                 methods = ElementFilter.methodsIn(classElement.getEnclosedElements());
+                // lets try the builder pattern using annotation name (optional) as the method name
+                if (name != null) {
+                    for (ExecutableElement method : methods) {
+                        String methodName = method.getSimpleName().toString();
+                        if (name.equals(methodName) && method.getParameters().size() == 1) {
+                            String doc = elementUtils.getDocComment(method);
+                            if (!isNullOrEmpty(doc)) {
+                                answer = doc;
+                                break;
+                            }
+                        }
+                    }
+                }
+                // lets try builder pattern using fieldName as the method name
                 for (ExecutableElement method : methods) {
                     String methodName = method.getSimpleName().toString();
                     if (fieldName.equals(methodName) && method.getParameters().size() == 1) {

http://git-wip-us.apache.org/repos/asf/camel/blob/4a4188e1/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
index eda4bcb..4414f87 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EipAnnotationProcessor.java
@@ -294,7 +294,7 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
         String fieldTypeName = fieldType.toString();
         TypeElement fieldTypeElement = findTypeElement(roundEnv, fieldTypeName);
 
-        String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, classElement, true);
+        String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, name, classElement, true);
         boolean required = attribute.required();
 
         // gather enums
@@ -337,7 +337,7 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
             String fieldTypeName = fieldType.toString();
             TypeElement fieldTypeElement = findTypeElement(roundEnv, fieldTypeName);
 
-            String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, classElement, true);
+            String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, name, classElement, true);
             boolean required = element.required();
 
             // gather enums
@@ -396,7 +396,7 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
             TypeMirror fieldType = fieldElement.asType();
             String fieldTypeName = fieldType.toString();
 
-            String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, classElement, true);
+            String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, name, classElement, true);
             boolean required = true;
 
             // gather oneOf of the elements
@@ -417,52 +417,52 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
         Elements elementUtils = processingEnv.getElementUtils();
 
         // group
-        String docComment = findJavaDoc(elementUtils, null, "group", classElement, true);
+        String docComment = findJavaDoc(elementUtils, null, "group", null, classElement, true);
         EipOption ep = new EipOption("group", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // group
-        docComment = findJavaDoc(elementUtils, null, "streamCache", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "streamCache", null, classElement, true);
         ep = new EipOption("streamCache", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // trace
-        docComment = findJavaDoc(elementUtils, null, "trace", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "trace", null, classElement, true);
         ep = new EipOption("trace", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // trace
-        docComment = findJavaDoc(elementUtils, null, "messageHistory", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "messageHistory", null, classElement, true);
         ep = new EipOption("messageHistory", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // trace
-        docComment = findJavaDoc(elementUtils, null, "handleFault", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "handleFault", null, classElement, true);
         ep = new EipOption("handleFault", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // delayer
-        docComment = findJavaDoc(elementUtils, null, "delayer", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "delayer", null, classElement, true);
         ep = new EipOption("delayer", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // autoStartup
-        docComment = findJavaDoc(elementUtils, null, "autoStartup", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "autoStartup", null, classElement, true);
         ep = new EipOption("autoStartup", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // startupOrder
-        docComment = findJavaDoc(elementUtils, null, "startupOrder", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "startupOrder", null, classElement, true);
         ep = new EipOption("startupOrder", "attribute", "java.lang.Integer", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // errorHandlerRef
-        docComment = findJavaDoc(elementUtils, null, "errorHandlerRef", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "errorHandlerRef", null, classElement, true);
         ep = new EipOption("errorHandlerRef", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // routePolicyRef
-        docComment = findJavaDoc(elementUtils, null, "routePolicyRef", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "routePolicyRef", null, classElement, true);
         ep = new EipOption("routePolicyRef", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
@@ -470,7 +470,7 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
         Set<String> enums = new LinkedHashSet<String>();
         enums.add("Default");
         enums.add("Defer");
-        docComment = findJavaDoc(elementUtils, null, "shutdownRoute", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "shutdownRoute", null, classElement, true);
         ep = new EipOption("shutdownRoute", "attribute", "org.apache.camel.ShutdownRoute", false, "", docComment, false, true, enums, false, null);
         eipOptions.add(ep);
 
@@ -478,14 +478,14 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
         enums = new LinkedHashSet<String>();
         enums.add("CompleteCurrentTaskOnly");
         enums.add("CompleteAllTasks");
-        docComment = findJavaDoc(elementUtils, null, "shutdownRunningTask", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "shutdownRunningTask", null, classElement, true);
         ep = new EipOption("shutdownRunningTask", "attribute", "org.apache.camel.ShutdownRunningTask", false, "", docComment, false, true, enums, false, null);
         eipOptions.add(ep);
 
         // inputs
         Set<String> oneOfTypes = new TreeSet<String>();
         oneOfTypes.add("from");
-        docComment = findJavaDoc(elementUtils, null, "inputs", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "inputs", null, classElement, true);
         ep = new EipOption("inputs", "element", "java.util.List<org.apache.camel.model.FromDefinition>", true, "", docComment, false, false, null, true, oneOfTypes);
         eipOptions.add(ep);
 
@@ -510,7 +510,7 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
         // remove some types which are not intended as an output in eips
         oneOfTypes.remove("route");
 
-        docComment = findJavaDoc(elementUtils, null, "outputs", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "outputs", null, classElement, true);
         ep = new EipOption("outputs", "element", "java.util.List<org.apache.camel.model.ProcessorDefinition<?>>", true, "", docComment, false, false, null, true, oneOfTypes);
         eipOptions.add(ep);
     }
@@ -524,19 +524,19 @@ public class EipAnnotationProcessor extends AbstractAnnotationProcessor {
         Elements elementUtils = processingEnv.getElementUtils();
 
         // id
-        String docComment = findJavaDoc(elementUtils, null, "id", classElement, true);
+        String docComment = findJavaDoc(elementUtils, null, "id", null, classElement, true);
         EipOption ep = new EipOption("id", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // description
-        docComment = findJavaDoc(elementUtils, null, "description", classElement, true);
+        docComment = findJavaDoc(elementUtils, null, "description", null, classElement, true);
         ep = new EipOption("description", "element", "org.apache.camel.model.DescriptionDefinition", false, "", docComment, false, false, null, false, null);
         eipOptions.add(ep);
 
         // lets skip custom id as it has no value for end users to configure
         if (!skipUnwanted) {
             // custom id
-            docComment = findJavaDoc(elementUtils, null, "customId", classElement, true);
+            docComment = findJavaDoc(elementUtils, null, "customId", null, classElement, true);
             ep = new EipOption("customId", "attribute", "java.lang.String", false, "", docComment, false, false, null, false, null);
             eipOptions.add(ep);
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/4a4188e1/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
index 1af9fe6..39b4156 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/EndpointAnnotationProcessor.java
@@ -346,7 +346,7 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
                     String fieldTypeName = fieldType.toString();
                     TypeElement fieldTypeElement = findTypeElement(roundEnv, fieldTypeName);
 
-                    String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, classElement, false);
+                    String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, name, classElement, false);
                     if (isNullOrEmpty(docComment)) {
                         docComment = path.description();
                     }
@@ -398,7 +398,7 @@ public class EndpointAnnotationProcessor extends AbstractAnnotationProcessor {
                         }
                         findClassProperties(writer, roundEnv, endpointPaths, endpointOptions, fieldTypeElement, nestedPrefix);
                     } else {
-                        String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, classElement, false);
+                        String docComment = findJavaDoc(elementUtils, fieldElement, fieldName, name, classElement, false);
                         if (isNullOrEmpty(docComment)) {
                             docComment = param.description();
                         }


[2/2] camel git commit: CAMEL-8195: Add javadoc to model classes so we have EIP documentation out of the box

Posted by da...@apache.org.
CAMEL-8195: Add javadoc to model classes so we have EIP documentation out of the box


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

Branch: refs/heads/master
Commit: bd3218774c56973489d1c1e838f7412f32487ec8
Parents: 4a4188e
Author: Claus Ibsen <da...@apache.org>
Authored: Mon Jan 19 11:24:37 2015 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Mon Jan 19 11:24:37 2015 +0100

----------------------------------------------------------------------
 .../apache/camel/model/AggregateDefinition.java | 169 ++++++++++++-------
 .../tools/apt/AbstractAnnotationProcessor.java  |  24 +++
 2 files changed, 136 insertions(+), 57 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/bd321877/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java b/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java
index 39c316d..97fe0bf 100644
--- a/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java
+++ b/camel-core/src/main/java/org/apache/camel/model/AggregateDefinition.java
@@ -20,7 +20,6 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.concurrent.ExecutorService;
 import java.util.concurrent.ScheduledExecutorService;
-
 import javax.xml.bind.annotation.XmlAccessType;
 import javax.xml.bind.annotation.XmlAccessorType;
 import javax.xml.bind.annotation.XmlAttribute;
@@ -332,6 +331,13 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
         return aggregationStrategy;
     }
 
+    /**
+     * The AggregationStrategy to use.
+     * <p/>
+     * Configuring an AggregationStrategy is required, and is used to merge the incoming Exchange with the existing already merged exchanges.
+     * At first call the oldExchange parameter is null.
+     * On subsequent invocations the oldExchange contains the merged exchanges and newExchange is of course the new incoming Exchange.
+     */
     public void setAggregationStrategy(AggregationStrategy aggregationStrategy) {
         this.aggregationStrategy = aggregationStrategy;
     }
@@ -340,14 +346,39 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
         return strategyRef;
     }
 
+    /**
+     * A reference to lookup the AggregationStrategy in the Registry.
+     * <p/>
+     * Configuring an AggregationStrategy is required, and is used to merge the incoming Exchange with the existing already merged exchanges.
+     * At first call the oldExchange parameter is null.
+     * On subsequent invocations the oldExchange contains the merged exchanges and newExchange is of course the new incoming Exchange.
+     */
     public void setAggregationStrategyRef(String aggregationStrategyRef) {
         this.strategyRef = aggregationStrategyRef;
     }
 
+    public String getStrategyRef() {
+        return strategyRef;
+    }
+
+    /**
+     * A reference to lookup the AggregationStrategy in the Registry.
+     * <p/>
+     * Configuring an AggregationStrategy is required, and is used to merge the incoming Exchange with the existing already merged exchanges.
+     * At first call the oldExchange parameter is null.
+     * On subsequent invocations the oldExchange contains the merged exchanges and newExchange is of course the new incoming Exchange.
+     */
+    public void setStrategyRef(String strategyRef) {
+        this.strategyRef = strategyRef;
+    }
+
     public String getAggregationStrategyMethodName() {
         return strategyMethodName;
     }
 
+    /**
+     * This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy.
+     */
     public void setAggregationStrategyMethodName(String strategyMethodName) {
         this.strategyMethodName = strategyMethodName;
     }
@@ -356,10 +387,40 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
         return strategyMethodAllowNull;
     }
 
+    public String getStrategyMethodName() {
+        return strategyMethodName;
+    }
+
+    /**
+     * This option can be used to explicit declare the method name to use, when using POJOs as the AggregationStrategy.
+     */
+    public void setStrategyMethodName(String strategyMethodName) {
+        this.strategyMethodName = strategyMethodName;
+    }
+
+    /**
+     * If this option is false then the aggregate method is not used for the very first aggregation.
+     * If this option is true then null values is used as the oldExchange (at the very first aggregation),
+     * when using POJOs as the AggregationStrategy.
+     */
     public void setStrategyMethodAllowNull(Boolean strategyMethodAllowNull) {
         this.strategyMethodAllowNull = strategyMethodAllowNull;
     }
 
+    /**
+     * The expression used to calculate the correlation key to use for aggregation.
+     * The Exchange which has the same correlation key is aggregated together.
+     * If the correlation key could not be evaluated an Exception is thrown.
+     * You can disable this by using the ignoreBadCorrelationKeys option.
+     */
+    public void setCorrelationExpression(ExpressionSubElementDefinition correlationExpression) {
+        this.correlationExpression = correlationExpression;
+    }
+
+    public ExpressionSubElementDefinition getCorrelationExpression() {
+        return correlationExpression;
+    }
+
     public Integer getCompletionSize() {
         return completionSize;
     }
@@ -488,22 +549,6 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
         this.executorServiceRef = executorServiceRef;
     }
 
-    public String getStrategyRef() {
-        return strategyRef;
-    }
-
-    public void setStrategyRef(String strategyRef) {
-        this.strategyRef = strategyRef;
-    }
-
-    public String getStrategyMethodName() {
-        return strategyMethodName;
-    }
-
-    public void setStrategyMethodName(String strategyMethodName) {
-        this.strategyMethodName = strategyMethodName;
-    }
-
     public Boolean getEagerCheckCompletion() {
         return eagerCheckCompletion;
     }
@@ -580,6 +625,19 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
         return timeoutCheckerExecutorServiceRef;
     }
 
+
+    public Boolean getForceCompletionOnStop() {
+        return forceCompletionOnStop;
+    }
+
+    public boolean isForceCompletionOnStop() {
+        return forceCompletionOnStop != null && forceCompletionOnStop;
+    }
+
+    public void setForceCompletionOnStop(Boolean forceCompletionOnStop) {
+        this.forceCompletionOnStop = forceCompletionOnStop;
+    }
+
     // Fluent API
     //-------------------------------------------------------------------------
 
@@ -775,8 +833,6 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
     /**
      * Enables grouped exchanges, so the aggregator will group all aggregated exchanges into a single
      * combined Exchange holding all the aggregated exchanges in a {@link java.util.List}.
-     *
-     * @return the builder
      */
     public AggregateDefinition groupExchanges() {
         setGroupExchanges(true);
@@ -787,9 +843,6 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
 
     /**
      * Sets the predicate used to determine if the aggregation is completed
-     *
-     * @param predicate  the predicate
-     * @return the builder
      */
     public AggregateDefinition completionPredicate(Predicate predicate) {
         checkNoCompletedPredicate();
@@ -797,83 +850,79 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
         return this;
     }
 
-     /**
-     * Sets the force completion on stop flag, which considers the current group as complete
-     * and sends out the aggregated exchange when the stop event is executed
-     *
-     * @return builder
+    /**
+     * Indicates to complete all current aggregated exchanges when the context is stopped
      */
     public AggregateDefinition forceCompletionOnStop() {
         setForceCompletionOnStop(true);
         return this;
     }
 
-    public Boolean getForceCompletionOnStop() {
-        return forceCompletionOnStop;
-    }
-
-    public boolean isForceCompletionOnStop() {
-        return forceCompletionOnStop != null && forceCompletionOnStop;
-    }
-
-    public void setForceCompletionOnStop(Boolean forceCompletionOnStop) {
-        this.forceCompletionOnStop = forceCompletionOnStop;
-    }
-
     /**
-     * Sending the aggregated output in parallel
-     *
-     * @return the builder
+     * When aggregated are completed they are being send out of the aggregator.
+     * This option indicates whether or not Camel should use a thread pool with multiple threads for concurrency.
+     * If no custom thread pool has been specified then Camel creates a default pool with 10 concurrent threads.
      */
     public AggregateDefinition parallelProcessing() {
         setParallelProcessing(true);
         return this;
     }
 
+    /**
+     * Turns on using optimistic locking, which requires the aggregationRepository being used,
+     * is supporting this by implementing {@link org.apache.camel.spi.OptimisticLockingAggregationRepository}.
+     */
     public AggregateDefinition optimisticLocking() {
         setOptimisticLocking(true);
         return this;
     }
 
+    /**
+     * Allows to configure retry settings when using optimistic locking.
+     */
     public AggregateDefinition optimisticLockRetryPolicy(OptimisticLockRetryPolicy policy) {
         setOptimisticLockRetryPolicy(policy);
         return this;
     }
-    
+
+    /**
+     * If using parallelProcessing you can specify a custom thread pool to be used.
+     * In fact also if you are not using parallelProcessing this custom thread pool is used to send out aggregated exchanges as well.
+     */
     public AggregateDefinition executorService(ExecutorService executorService) {
         setExecutorService(executorService);
         return this;
     }
 
+    /**
+     * If using parallelProcessing you can specify a custom thread pool to be used.
+     * In fact also if you are not using parallelProcessing this custom thread pool is used to send out aggregated exchanges as well.
+     */
     public AggregateDefinition executorServiceRef(String executorServiceRef) {
         setExecutorServiceRef(executorServiceRef);
         return this;
     }
 
+    /**
+     * If using either of the completionTimeout, completionTimeoutExpression, or completionInterval options a
+     * background thread is created to check for the completion for every aggregator.
+     * Set this option to provide a custom thread pool to be used rather than creating a new thread for every aggregator.
+     */
     public AggregateDefinition timeoutCheckerExecutorService(ScheduledExecutorService executorService) {
         setTimeoutCheckerExecutorService(executorService);
         return this;
     }
 
+    /**
+     * If using either of the completionTimeout, completionTimeoutExpression, or completionInterval options a
+     * background thread is created to check for the completion for every aggregator.
+     * Set this option to provide a custom thread pool to be used rather than creating a new thread for every aggregator.
+     */
     public AggregateDefinition timeoutCheckerExecutorServiceRef(String executorServiceRef) {
         setTimeoutCheckerExecutorServiceRef(executorServiceRef);
         return this;
     }
     
-    protected void checkNoCompletedPredicate() {
-        if (getCompletionPredicate() != null) {
-            throw new IllegalArgumentException("There is already a completionPredicate defined for this aggregator: " + this);
-        }
-    }
-
-    public void setCorrelationExpression(ExpressionSubElementDefinition correlationExpression) {
-        this.correlationExpression = correlationExpression;
-    }
-
-    public ExpressionSubElementDefinition getCorrelationExpression() {
-        return correlationExpression;
-    }
-
     // Section - Methods from ExpressionNode
     // Needed to copy methods from ExpressionNode here so that I could specify the
     // correlation expression as optional in JAXB
@@ -889,6 +938,12 @@ public class AggregateDefinition extends ProcessorDefinition<AggregateDefinition
         this.expression = expression;
     }
 
+    protected void checkNoCompletedPredicate() {
+        if (getCompletionPredicate() != null) {
+            throw new IllegalArgumentException("There is already a completionPredicate defined for this aggregator: " + this);
+        }
+    }
+
     @Override
     public List<ProcessorDefinition<?>> getOutputs() {
         return outputs;

http://git-wip-us.apache.org/repos/asf/camel/blob/bd321877/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java
----------------------------------------------------------------------
diff --git a/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java b/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java
index 8a9f72d..2238583 100644
--- a/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java
+++ b/tooling/apt/src/main/java/org/apache/camel/tools/apt/AbstractAnnotationProcessor.java
@@ -111,6 +111,18 @@ public abstract class AbstractAnnotationProcessor extends AbstractProcessor {
                             }
                         }
                     }
+                    // there may be builder pattern with no-parameter methods, such as more common for boolean types
+                    // so lets try those as well
+                    for (ExecutableElement method : methods) {
+                        String methodName = method.getSimpleName().toString();
+                        if (name.equals(methodName) && method.getParameters().size() == 0) {
+                            String doc = elementUtils.getDocComment(method);
+                            if (!isNullOrEmpty(doc)) {
+                                answer = doc;
+                                break;
+                            }
+                        }
+                    }
                 }
                 // lets try builder pattern using fieldName as the method name
                 for (ExecutableElement method : methods) {
@@ -123,6 +135,18 @@ public abstract class AbstractAnnotationProcessor extends AbstractProcessor {
                         }
                     }
                 }
+                // there may be builder pattern with no-parameter methods, such as more common for boolean types
+                // so lets try those as well
+                for (ExecutableElement method : methods) {
+                    String methodName = method.getSimpleName().toString();
+                    if (fieldName.equals(methodName) && method.getParameters().size() == 0) {
+                        String doc = elementUtils.getDocComment(method);
+                        if (!isNullOrEmpty(doc)) {
+                            answer = doc;
+                            break;
+                        }
+                    }
+                }
             }
         }
         return answer;