/** * @return the calculated map of classes to annotations */ private Map<Class<?>, Annotation> getAllAnnotationMapCalculated(){ final HashMap<Class<?>, Annotation> result = new HashMap<Class<?>, Annotation>(); final Class<?> superClass = getTheClass().getSuperclass(); // Get the superclass's annotations if (superClass != null) { fillAnnotationsForOneClass(result, superClass); } // Get the superinterfaces' annotations for (final Class<?> c : getTheClass().getInterfaces()) { fillAnnotationsForOneClass(result, c); } // Get its own annotations. They have preferece to inherited annotations. for (final Annotation annotation : getTheClass().getDeclaredAnnotations()) { result.put(annotation.getClass().getInterfaces()[0], annotation); } return result; }
/** * @return the calculated map of classes to annotations */ private Map<Class<?>, Annotation> getAllAnnotationMapCalculated(){ final HashMap<Class<?>, Annotation> result = new HashMap<Class<?>, Annotation>(); final Class<?> superClass = getTheClass().getSuperclass(); // Get the superclass's annotations if (superClass != null) { fillAnnotationsForOneClass(result, superClass); } // Get the superinterfaces' annotations for (final Class<?> c : getTheClass().getInterfaces()) { fillAnnotationsForOneClass(result, c); } // Get its own annotations. They have preferece to inherited annotations. for (final Annotation annotation : getTheClass().getDeclaredAnnotations()) { result.put(annotation.getClass().getInterfaces()[0], annotation); } return result; }
/** * @return the calculated map of classes to annotations */ private Map<Class<?>, Annotation> getAllAnnotationMapCalculated(){ final HashMap<Class<?>, Annotation> result = new HashMap<Class<?>, Annotation>(); final Class<?> superClass = getTheClass().getSuperclass(); // Get the superclass's annotations if (superClass != null) { fillAnnotationsForOneClass(result, superClass); } // Get the superinterfaces' annotations for (final Class<?> c : getTheClass().getInterfaces()) { fillAnnotationsForOneClass(result, c); } // Get its own annotations. They have preferece to inherited annotations. for (final Annotation annotation : getTheClass().getDeclaredAnnotations()) { result.put(annotation.getClass().getInterfaces()[0], annotation); } return result; }