/** * Same as {@link #getAnnotationsMap(Class, Type)} except returns results in parent-to-child order. * * @param <T> The annotation class type. * @param a The annotation class type. * @param t The class being searched. * @return The found matches, or an empty map if annotation was not found. */ public static <T extends Annotation> LinkedHashMap<Class<?>,T> getAnnotationsMapParentFirst(Class<T> a, Type t) { return CollectionUtils.reverse(getAnnotationsMap(a, t)); }
private static Map doView(Map m, List<String> view) { if (m instanceof DelegateMap) ((DelegateMap)m).filterKeys(view); else ((DelegateBeanMap)m).filterKeys(view); return m; }
private String section(String section) { assertFieldNotNull(section, "section"); if (isEmpty(section)) return ""; return section; }
/** * Constructor. * * @param message The {@link MessageFormat}-style message. * @param args Optional {@link MessageFormat}-style arguments. */ public FormattedException(String message, Object...args) { super(format(message, args)); }
@Override /* Object */ public String toString() { return StringUtils.join(typeRanges, ','); } }
/** * Constructor. * * @param args Arguments passed in as a raw command line. */ public Args(String args) { this(StringUtils.splitQuoted(args)); }
/** * Constructor. * * @param value The raw header value. */ protected HeaderString(String value) { this.value = StringUtils.trim(value); }
BeanPropertyMeta.Builder setExtraKeys(Method extraKeys) { setAccessible(extraKeys, false); this.extraKeys = extraKeys; return this; }
/** * Creates a builder for an ASCII set. * * @return A new builder. */ public static AsciiSet.Builder create() { return new Builder(); }
/** * Create a new {@link AsciiSet} object with the contents of this builder. * * @return A new {link AsciiSet} object. */ public AsciiSet build() { return new AsciiSet(store); } }
/** * Constructor. * * @param raw The raw header value. */ protected HeaderDate(String raw) { this.raw = raw; this.date = DateUtils.parseDate(raw); }
/** * Converts a value to an Integer. * * @param o The value to convert. * @return The converted value, or <jk>null</jk> if the input was null. */ public static Integer toInteger(Object o) { return ObjectUtils.toInteger(o); }
/** * Registers the specified serializers with this group. * * @param s The serializers to append to this group. * @return This object (for method chaining). */ public SerializerGroupBuilder append(Class<?>...s) { addReverse(serializers, s); return this; }
private String section(String section) { assertFieldNotNull(section, "section"); if (isEmpty(section)) return ""; return section; }
/** * Same as {@link #getAnnotationsMap(Class, Type)} except returns results in parent-to-child order. * * @param <T> The annotation class type. * @param a The annotation class type. * @param t The class being searched. * @return The found matches, or an empty map if annotation was not found. */ public static <T extends Annotation> LinkedHashMap<Class<?>,T> getAnnotationsMapParentFirst(Class<T> a, Type t) { return CollectionUtils.reverse(getAnnotationsMap(a, t)); }
private static Map doView(Map m, List<String> view) { if (m instanceof DelegateMap) ((DelegateMap)m).filterKeys(view); else ((DelegateBeanMap)m).filterKeys(view); return m; }
/** * Copies an existing {@link AsciiSet} so that you can augment it with additional values. * * @return A builder initialized to the same characters in the copied set. */ public AsciiSet.Builder copy() { Builder b = new Builder(); for (int i = 0; i < 128; i++) b.store[i] = store[i]; return b; }
private String section(String section) { assertFieldNotNull(section, "section"); if (isEmpty(section)) return ""; return section; }
/** * Same as {@link #getAnnotationsMap(Class, Type)} except returns results in parent-to-child order. * * @param <T> The annotation class type. * @param a The annotation class type. * @param t The class being searched. * @return The found matches, or an empty map if annotation was not found. */ public static <T extends Annotation> LinkedHashMap<Class<?>,T> getAnnotationsMapParentFirst(Class<T> a, Type t) { return CollectionUtils.reverse(getAnnotationsMap(a, t)); }
private static Map doView(Map m, List<String> view) { if (m instanceof DelegateMap) ((DelegateMap)m).filterKeys(view); else ((DelegateBeanMap)m).filterKeys(view); return m; }