/** * Get the TypeQualifierAnnotation directly applied to given method * parameter. * * @param xmethod * a method * @param parameter * a parameter (0 == first parameter) * @param typeQualifierValue * the kind of TypeQualifierValue we are looking for * @return TypeQualifierAnnotation directly applied to the parameter, or * null if there is no directly applied TypeQualifierAnnotation */ public static @CheckForNull @CheckReturnValue TypeQualifierAnnotation getDirectTypeQualifierAnnotation(XMethod xmethod, int parameter, TypeQualifierValue<?> typeQualifierValue) { XMethod bridge = xmethod.bridgeTo(); if (bridge != null) { xmethod = bridge; } Set<TypeQualifierAnnotation> applications = new HashSet<>(); getDirectApplications(applications, xmethod, parameter); if (DEBUG_METHOD != null && DEBUG_METHOD.equals(xmethod.getName())) { System.out.println(" Direct applications are: " + applications); } return findMatchingTypeQualifierAnnotation(applications, typeQualifierValue); }
XMethod m2 = m.bridgeTo(); if (m2 != null) { m = m2;
/** * Get the TypeQualifierAnnotation directly applied to given method * parameter. * * @param xmethod * a method * @param parameter * a parameter (0 == first parameter) * @param typeQualifierValue * the kind of TypeQualifierValue we are looking for * @return TypeQualifierAnnotation directly applied to the parameter, or * null if there is no directly applied TypeQualifierAnnotation */ public static @CheckForNull @CheckReturnValue TypeQualifierAnnotation getDirectTypeQualifierAnnotation(XMethod xmethod, int parameter, TypeQualifierValue<?> typeQualifierValue) { XMethod bridge = xmethod.bridgeTo(); if (bridge != null) { xmethod = bridge; } Set<TypeQualifierAnnotation> applications = new HashSet<TypeQualifierAnnotation>(); getDirectApplications(applications, xmethod, parameter); if (DEBUG_METHOD != null && DEBUG_METHOD.equals(xmethod.getName())) { System.out.println(" Direct applications are: " + applications); } return findMatchingTypeQualifierAnnotation(applications, typeQualifierValue); }
XMethod m2 = m.bridgeTo(); if (m2 != null) { m = m2;