/** * Returns a key for {@code type} annotated with {@code annotations}, * reporting failures against {@code subject}. * * @param annotations the annotations on a single method, field or parameter. * This array may contain at most one qualifier annotation. */ public static String get(Type type, Annotation[] annotations, Object subject) { return get(type, extractQualifier(annotations, subject)); }
/** * Returns a key for {@code type} annotated with {@code annotations}, * wrapped by {@code Set}, reporting failures against {@code subject}. * * @param annotations the annotations on a single method, field or parameter. * This array may contain at most one qualifier annotation. */ public static String getSetKey(Type type, Annotation[] annotations, Object subject) { Annotation qualifier = extractQualifier(annotations, subject); type = boxIfPrimitive(type); StringBuilder result = new StringBuilder(); if (qualifier != null) { result.append(qualifier).append("/"); } result.append(SET_PREFIX); typeToString(type, result, true); result.append(">"); return result.toString(); }
/** * Returns a key for {@code type} annotated with {@code annotations}, * reporting failures against {@code subject}. * * @param annotations the annotations on a single method, field or parameter. * This array may contain at most one qualifier annotation. */ public static String get(Type type, Annotation[] annotations, Object subject) { return get(type, extractQualifier(annotations, subject)); }
/** * Returns a key for {@code type} annotated with {@code annotations}, * wrapped by {@code Set}, reporting failures against {@code subject}. * * @param annotations the annotations on a single method, field or parameter. * This array may contain at most one qualifier annotation. */ public static String getElementKey(Type type, Annotation[] annotations, Object subject) { Annotation qualifier = extractQualifier(annotations, subject); type = boxIfPrimitive(type); StringBuilder result = new StringBuilder(); if (qualifier != null) { result.append(qualifier).append("/"); } result.append(SET_PREFIX); typeToString(type, result, true); result.append(">"); return result.toString(); }