org.apache.juneau.http.annotation.Query.name()方法的使用及代码示例

x33g5p2x  于2022-01-28 转载在 其他  
字(6.3k)|赞(0)|评价(0)|浏览(153)

本文整理了Java中org.apache.juneau.http.annotation.Query.name方法的一些代码示例,展示了Query.name的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Query.name方法的具体详情如下:
包路径:org.apache.juneau.http.annotation.Query
类名称:Query
方法名:name

Query.name介绍

暂无

代码示例

代码示例来源:origin: org.apache.juneau/juneau-rest-server

private static String getName(Method m, int i) {
  for (Query h : getAnnotations(Query.class, m, i)) {
    if (! h.name().isEmpty())
      return h.name();
    if (! h.value().isEmpty())
      return h.value();
  }
  throw new InternalServerError("@Query used without name or value on method ''{0}'' parameter ''{1}''.", m, i);
}

代码示例来源:origin: apache/juneau

private static String getName(Method m, int i) {
  for (Query h : getAnnotations(Query.class, m, i)) {
    if (! h.name().isEmpty())
      return h.name();
    if (! h.value().isEmpty())
      return h.value();
  }
  throw new InternalServerError("@Query used without name or value on method ''{0}'' parameter ''{1}''.", m, i);
}

代码示例来源:origin: apache/juneau

private static String getName(Method m, int i) {
  for (Query h : getAnnotations(Query.class, m, i)) {
    if (! h.name().isEmpty())
      return h.name();
    if (! h.value().isEmpty())
      return h.value();
  }
  throw new InternalServerError("@Query used without name or value on method ''{0}'' parameter ''{1}''.", m, i);
}

代码示例来源:origin: org.apache.juneau/juneau-rest-server

Query q = (Query)a;
  if (q._default().length > 0)
    defaultQuery.put(firstNonEmpty(q.name(), q.value()), parseAnything(joinnl(q._default())));
} else if (a instanceof FormData) {
  FormData f = (FormData)a;

代码示例来源:origin: apache/juneau

Query q = (Query)a;
  if (q._default().length > 0)
    defaultQuery.put(firstNonEmpty(q.name(), q.value()), parseAnything(joinnl(q._default())));
} else if (a instanceof FormData) {
  FormData f = (FormData)a;

代码示例来源:origin: apache/juneau

Query q = (Query)a;
  if (q._default().length > 0)
    defaultQuery.put(firstNonEmpty(q.name(), q.value()), parseAnything(joinnl(q._default())));
} else if (a instanceof FormData) {
  FormData f = (FormData)a;

代码示例来源:origin: org.apache.juneau/juneau-marshall

/**
 * 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(Query a) {
  if (a == null)
    return true;
  return
    allEmpty(a.description(), a._default(), 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.allowEmptyValue(), a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems())
    && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems())
    && empty(a.items());
}

代码示例来源:origin: apache/juneau

/**
 * 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(Query a) {
  if (a == null)
    return true;
  return
    allEmpty(a.description(), a._default(), 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.allowEmptyValue(), a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems())
    && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems())
    && empty(a.items());
}

代码示例来源:origin: apache/juneau

/**
 * 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(Query a) {
  if (a == null)
    return true;
  return
    allEmpty(a.description(), a._default(), 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.allowEmptyValue(), a.exclusiveMaximum(), a.exclusiveMinimum(), a.required(), a.uniqueItems())
    && allMinusOne(a.maxLength(), a.minLength(), a.maxItems(), a.minItems())
    && empty(a.items());
}

代码示例来源:origin: apache/juneau

HttpPartSchemaBuilder apply(Query 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;
}

代码示例来源:origin: org.apache.juneau/juneau-marshall

HttpPartSchemaBuilder apply(Query 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;
}

代码示例来源:origin: apache/juneau

HttpPartSchemaBuilder apply(Query 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;
}

相关文章