/** * Returns the names of unique annotations on the field. * * @return The names of unique annotations on the field, or the empty list if none. */ public List<String> getAnnotationNames() { return annotationInfo == null ? Collections.<String> emptyList() : Arrays.asList(AnnotationInfo.getUniqueAnnotationNamesSorted(annotationInfo)); }
/** * Returns the names of annotations on the method. * * @return The names of annotations on this method, or the empty list if none. */ public List<String> getAnnotationNames() { return annotationInfo == null ? Collections.<String> emptyList() : Arrays.asList(AnnotationInfo.getUniqueAnnotationNamesSorted(annotationInfo)); }
/** * Returns the unique annotation names for annotations on each method parameter, if any parameters have * annotations, else returns null. * * Note that it is always faster to call {@link #getParameterInfo()} and get the parameter information from the * returned list of {@link MethodParameterInfo} objects, since this method calls that to compile its results. * * @return The method parameter annotation names, as an array of Strings, or null if no parameter annotations * are presest. */ public String[][] getParameterAnnotationNames() { final AnnotationInfo[][] paramAnnotationInfo = getParameterAnnotationInfo(); if (paramAnnotationInfo == null) { return null; } final String[][] paramAnnotationNames = new String[paramAnnotationInfo.length][]; for (int i = 0; i < paramAnnotationInfo.length; i++) { paramAnnotationNames[i] = AnnotationInfo.getUniqueAnnotationNamesSorted(paramAnnotationInfo[i]); } return paramAnnotationNames; }