private static String getName(Method m, int i) { for (Header h : getAnnotations(Header.class, m, i)) { if (! h.name().isEmpty()) return h.name(); if (! h.value().isEmpty()) return h.value(); } throw new InternalServerError("@Header used without name or value on method ''{0}'' parameter ''{1}''.", m, i); }
private static String getName(Method m, int i) { for (Header h : getAnnotations(Header.class, m, i)) { if (! h.name().isEmpty()) return h.name(); if (! h.value().isEmpty()) return h.value(); } throw new InternalServerError("@Header used without name or value on method ''{0}'' parameter ''{1}''.", m, i); }
private static String getName(Method m, int i) { for (Header h : getAnnotations(Header.class, m, i)) { if (! h.name().isEmpty()) return h.name(); if (! h.value().isEmpty()) return h.value(); } throw new InternalServerError("@Header used without name or value on method ''{0}'' parameter ''{1}''.", m, i); }
Header h = (Header)a; if (h._default().length > 0) defaultRequestHeaders.put(firstNonEmpty(h.name(), h.value()), parseAnything(joinnl(h._default()))); } else if (a instanceof Query) { Query q = (Query)a;
Header h = (Header)a; if (h._default().length > 0) defaultRequestHeaders.put(firstNonEmpty(h.name(), h.value()), parseAnything(joinnl(h._default()))); } else if (a instanceof Query) { Query q = (Query)a;
Header h = (Header)a; if (h._default().length > 0) defaultRequestHeaders.put(firstNonEmpty(h.name(), h.value()), parseAnything(joinnl(h._default()))); } else if (a instanceof Query) { Query q = (Query)a;
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(Header a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a._enum(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(Header a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a._enum(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
/** * Returns <jk>true</jk> if the specified annotation contains all default values. * * @param a The annotation to check. * @return <jk>true</jk> if the specified annotation contains all default values. */ public static boolean empty(Header a) { if (a == null) return true; return allEmpty(a.description(), a._default(), a._enum(), a.example(), a.api()) && allEmpty(a.name(), a.value(), a.type(), a.format(), a.pattern(), a.collectionFormat(), a.maximum(), a.minimum(), a.multipleOf()) && allFalse(a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems()) && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems()) && empty(a.items()); }
HttpPartSchemaBuilder apply(Header a) { name(a.value()); name(a.name()); required(a.required()); type(a.type()); format(a.format()); allowEmptyValue(a.allowEmptyValue()); items(a.items()); collectionFormat(a.collectionFormat()); _default(a._default().length == 0 ? null : joinnl(a._default())); maximum(HttpPartSchema.toNumber(a.maximum())); exclusiveMaximum(a.exclusiveMaximum()); minimum(HttpPartSchema.toNumber(a.minimum())); exclusiveMinimum(a.exclusiveMinimum()); maxLength(a.maxLength()); minLength(a.minLength()); pattern(a.pattern()); maxItems(a.maxItems()); minItems(a.minItems()); uniqueItems(a.uniqueItems()); _enum(HttpPartSchema.toSet(a._enum())); multipleOf(HttpPartSchema.toNumber(a.multipleOf())); skipIfEmpty(a.skipIfEmpty()); parser(a.parser()); serializer(a.serializer()); return this; }
HttpPartSchemaBuilder apply(Header a) { name(a.value()); name(a.name()); required(a.required()); type(a.type()); format(a.format()); allowEmptyValue(a.allowEmptyValue()); items(a.items()); collectionFormat(a.collectionFormat()); _default(a._default().length == 0 ? null : joinnl(a._default())); maximum(HttpPartSchema.toNumber(a.maximum())); exclusiveMaximum(a.exclusiveMaximum()); minimum(HttpPartSchema.toNumber(a.minimum())); exclusiveMinimum(a.exclusiveMinimum()); maxLength(a.maxLength()); minLength(a.minLength()); pattern(a.pattern()); maxItems(a.maxItems()); minItems(a.minItems()); uniqueItems(a.uniqueItems()); _enum(HttpPartSchema.toSet(a._enum())); multipleOf(HttpPartSchema.toNumber(a.multipleOf())); skipIfEmpty(a.skipIfEmpty()); parser(a.parser()); serializer(a.serializer()); return this; }
HttpPartSchemaBuilder apply(Header a) { name(a.value()); name(a.name()); required(a.required()); type(a.type()); format(a.format()); allowEmptyValue(a.allowEmptyValue()); items(a.items()); collectionFormat(a.collectionFormat()); _default(a._default().length == 0 ? null : joinnl(a._default())); maximum(HttpPartSchema.toNumber(a.maximum())); exclusiveMaximum(a.exclusiveMaximum()); minimum(HttpPartSchema.toNumber(a.minimum())); exclusiveMinimum(a.exclusiveMinimum()); maxLength(a.maxLength()); minLength(a.minLength()); pattern(a.pattern()); maxItems(a.maxItems()); minItems(a.minItems()); uniqueItems(a.uniqueItems()); _enum(HttpPartSchema.toSet(a._enum())); multipleOf(HttpPartSchema.toNumber(a.multipleOf())); skipIfEmpty(a.skipIfEmpty()); parser(a.parser()); serializer(a.serializer()); return this; }