You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@deltaspike.apache.org by gp...@apache.org on 2018/03/29 21:25:18 UTC

deltaspike git commit: DELTASPIKE-1334 added javadoc for ConfigPreProcessor#beforeAddToConfig

Repository: deltaspike
Updated Branches:
  refs/heads/master 82596c574 -> b194bca4c


DELTASPIKE-1334 added javadoc for ConfigPreProcessor#beforeAddToConfig


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

Branch: refs/heads/master
Commit: b194bca4cce763322185b65e833615cf5931821f
Parents: 82596c5
Author: gpetracek <gp...@apache.org>
Authored: Thu Mar 29 23:19:38 2018 +0200
Committer: gpetracek <gp...@apache.org>
Committed: Thu Mar 29 23:19:38 2018 +0200

----------------------------------------------------------------------
 .../core/spi/config/view/ConfigPreProcessor.java        | 12 ++++++++++++
 1 file changed, 12 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/deltaspike/blob/b194bca4/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/spi/config/view/ConfigPreProcessor.java
----------------------------------------------------------------------
diff --git a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/spi/config/view/ConfigPreProcessor.java b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/spi/config/view/ConfigPreProcessor.java
index 1cce3a4..3d9f4b6 100644
--- a/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/spi/config/view/ConfigPreProcessor.java
+++ b/deltaspike/core/api/src/main/java/org/apache/deltaspike/core/spi/config/view/ConfigPreProcessor.java
@@ -30,5 +30,17 @@ import java.lang.annotation.Annotation;
  */
 public interface ConfigPreProcessor<T extends Annotation>
 {
+    /**
+     * @param metaData The annotation-instance which was found or the inherited instance.
+     *                 Since it's possible to override annotation-attributes alongside the inheritance-path,
+     *                 it can be a merged representation.
+     *                 To get rid of meta-data which is only inherited,
+     *                 it's required to check the presence of the physical annotation e.g. via
+     *                 ViewConfigNode#getSource#isAnnotationPresent
+     *                 and return a synthetic literal-instance (as a marker/placeholder),
+     *                 because 'null' isn't supported as return-value.
+     * @param viewConfigNode Instance which represents the current node
+     * @return The annotation-instance which should be used for the final meta-data
+     */
     T beforeAddToConfig(T metaData, ViewConfigNode viewConfigNode);
 }