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 2013/12/10 09:56:27 UTC
git commit: DELTASPIKE-465 minor refactoring
Updated Branches:
refs/heads/master 09d70cbd3 -> 896bf88ae
DELTASPIKE-465 minor refactoring
Project: http://git-wip-us.apache.org/repos/asf/deltaspike/repo
Commit: http://git-wip-us.apache.org/repos/asf/deltaspike/commit/896bf88a
Tree: http://git-wip-us.apache.org/repos/asf/deltaspike/tree/896bf88a
Diff: http://git-wip-us.apache.org/repos/asf/deltaspike/diff/896bf88a
Branch: refs/heads/master
Commit: 896bf88aec664320cac026a87761ee28a4f12c2a
Parents: 09d70cb
Author: gpetracek <gp...@apache.org>
Authored: Tue Dec 10 09:50:31 2013 +0100
Committer: gpetracek <gp...@apache.org>
Committed: Tue Dec 10 09:53:44 2013 +0100
----------------------------------------------------------------------
.../DefaultViewConfigInheritanceStrategy.java | 33 ++++++++++++--------
1 file changed, 20 insertions(+), 13 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/deltaspike/blob/896bf88a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultViewConfigInheritanceStrategy.java
----------------------------------------------------------------------
diff --git a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultViewConfigInheritanceStrategy.java b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultViewConfigInheritanceStrategy.java
index 00e7f7a..486c294 100644
--- a/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultViewConfigInheritanceStrategy.java
+++ b/deltaspike/modules/jsf/impl/src/main/java/org/apache/deltaspike/jsf/impl/config/view/DefaultViewConfigInheritanceStrategy.java
@@ -80,7 +80,7 @@ public class DefaultViewConfigInheritanceStrategy implements ViewConfigInheritan
return inheritedAnnotations;
}
- private List<Annotation> addViewMetaData(Class currentClass)
+ protected List<Annotation> addViewMetaData(Class currentClass)
{
List<Annotation> result = new ArrayList<Annotation>();
@@ -93,25 +93,32 @@ public class DefaultViewConfigInheritanceStrategy implements ViewConfigInheritan
continue;
}
- if (annotationClass.isAnnotationPresent(ViewMetaData.class))
- {
- result.add(annotation);
- }
- else if (annotationClass.isAnnotationPresent(Stereotype.class))
+ addViewMetaData(annotation, result);
+ }
+ return result;
+ }
+
+ protected void addViewMetaData(Annotation currentAnnotation, List<Annotation> metaDataList)
+ {
+ Class<? extends Annotation> annotationClass = currentAnnotation.annotationType();
+
+ if (annotationClass.isAnnotationPresent(ViewMetaData.class))
+ {
+ metaDataList.add(currentAnnotation);
+ }
+ else if (annotationClass.isAnnotationPresent(Stereotype.class))
+ {
+ for (Annotation inheritedViaStereotype : annotationClass.getAnnotations())
{
- for (Annotation inheritedViaStereotype : annotationClass.getAnnotations())
+ if (inheritedViaStereotype.annotationType().isAnnotationPresent(ViewMetaData.class))
{
- if (inheritedViaStereotype.annotationType().isAnnotationPresent(ViewMetaData.class))
- {
- result.add(inheritedViaStereotype);
- }
+ metaDataList.add(inheritedViaStereotype);
}
}
}
- return result;
}
- private void addInterfaces(Set<Class> processedTypes, Stack<Class> classesToAnalyze, Class nextClass)
+ protected void addInterfaces(Set<Class> processedTypes, Stack<Class> classesToAnalyze, Class nextClass)
{
for (Class<?> interfaceToAdd : nextClass.getInterfaces())
{