/** * Get all class annotations * @param name The name of the class annotation or <code>null</code> * for all class annotations. * @return A list of matching annotations or an empty list. */ public List<ClassAnnotation> getClassAnnotations(final String name) { final List<ClassAnnotation> list = new ArrayList<ClassAnnotation>(); for(final ScannedAnnotation desc : descriptions ) { if ( desc instanceof ClassAnnotation ) { if ( name == null || desc.getName().equals(name) ) { list.add( (ClassAnnotation)desc); } } } return list; }
/** * Get all method annotations * @param name The name of the method annotation or <code>null</code> * for all method annotations. * @return A list of matching annotations or an empty list. */ public List<MethodAnnotation> getMethodAnnotations(final String name) { final List<MethodAnnotation> list = new ArrayList<MethodAnnotation>(); for(final ScannedAnnotation desc : descriptions ) { if ( desc instanceof MethodAnnotation ) { if ( name == null || desc.getName().equals(name) ) { list.add( (MethodAnnotation)desc); } } } return list; } }
/** * Get all field annotations * @param name The name of the field annotation or <code>null</code> * for all field annotations. * @return A list of matching annotations or an empty list. */ public List<FieldAnnotation> getFieldAnnotations(final String name) { final List<FieldAnnotation> list = new ArrayList<FieldAnnotation>(); for(final ScannedAnnotation desc : descriptions ) { if ( desc instanceof FieldAnnotation ) { if ( name == null || desc.getName().equals(name) ) { list.add( (FieldAnnotation)desc); } } } return list; }