/** * Shortcut for calling <code>getAnnotations(a,m,<jk>true</jk>,<jk>true</jk>,<jk>true</jk>)</code> * * @param a The annotation to look for. * @param m The method being inspected. * @return All instances of the annotation with the */ public static <T extends Annotation> List<T> getAnnotationsParentFirst(Class<T> a, Method m) { return getAnnotations(a, m, true, true, true); }
/** * Shortcut for calling <code>getAnnotations(a, m, index, <jk>true</jk>, <jk>true</jk>, <jk>false</jk>);</code> * * @param a The annotation to look for. * @param m The method containing the parameter. * @param index The parameter index. * @return All instances of the annotation with the */ public static <T extends Annotation> List<T> getAnnotations(Class<T> a, Method m, int index) { return getAnnotations(a, m, index, true, true, false); }
/** * Shortcut for calling <code>getAnnotations(a, m, index, <jk>true</jk>, <jk>true</jk>, <jk>true</jk>);</code> * * @param a The annotation to look for. * @param m The method containing the parameter. * @param index The parameter index. * @return All instances of the annotation with the */ public static <T extends Annotation> List<T> getAnnotationsParentFirst(Class<T> a, Method m, int index) { return getAnnotations(a, m, index, true, true, true); }
/** * Shortcut for calling <code>getAnnotations(a, m, index, <jk>true</jk>, <jk>true</jk>, <jk>false</jk>);</code> * * @param a The annotation to look for. * @param m The method containing the parameter. * @param index The parameter index. * @return All instances of the annotation with the */ public static <T extends Annotation> List<T> getAnnotations(Class<T> a, Method m, int index) { return getAnnotations(a, m, index, true, true, false); }
/** * Shortcut for calling <code>getAnnotations(a,m,<jk>true</jk>,<jk>true</jk>,<jk>true</jk>)</code> * * @param a The annotation to look for. * @param m The method being inspected. * @return All instances of the annotation with the */ public static <T extends Annotation> List<T> getAnnotationsParentFirst(Class<T> a, Method m) { return getAnnotations(a, m, true, true, true); }
/** * Shortcut for calling <code>getAnnotations(a, m, index, <jk>true</jk>, <jk>true</jk>, <jk>false</jk>);</code> * * @param a The annotation to look for. * @param m The method containing the parameter. * @param index The parameter index. * @return All instances of the annotation with the */ public static <T extends Annotation> List<T> getAnnotations(Class<T> a, Method m, int index) { return getAnnotations(a, m, index, true, true, false); }
/** * Shortcut for calling <code>getAnnotations(a, m, index, <jk>true</jk>, <jk>true</jk>, <jk>true</jk>);</code> * * @param a The annotation to look for. * @param m The method containing the parameter. * @param index The parameter index. * @return All instances of the annotation with the */ public static <T extends Annotation> List<T> getAnnotationsParentFirst(Class<T> a, Method m, int index) { return getAnnotations(a, m, index, true, true, true); }
/** * Same as {@link #getAnnotations(Class, Type)} but returns the list in parent-to-child order. * * @param a The annotation class type. * @param t The class being searched. * @return The found matches, or an empty array if annotation was not found. */ public static <T extends Annotation> List<T> getAnnotationsParentFirst(Class<T> a, Type t) { List<T> l = getAnnotations(a, t); Collections.reverse(l); return l; }
/** * Same as {@link #getAnnotations(Class, Type)} but returns the list in parent-to-child order. * * @param a The annotation class type. * @param t The class being searched. * @return The found matches, or an empty array if annotation was not found. */ public static <T extends Annotation> List<T> getAnnotationsParentFirst(Class<T> a, Type t) { List<T> l = getAnnotations(a, t); Collections.reverse(l); return l; }
private static Namespace findNamespace(Class<?> c) { if (c == null) return null; List<Xml> xmls = getAnnotations(Xml.class, c); List<XmlSchema> schemas = getAnnotations(XmlSchema.class, c); return XmlUtils.findNamespace(xmls, schemas); } }
private static Namespace findNamespace(Class<?> c) { if (c == null) return null; List<Xml> xmls = getAnnotations(Xml.class, c); List<XmlSchema> schemas = getAnnotations(XmlSchema.class, c); return XmlUtils.findNamespace(xmls, schemas); } }
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); }
private static String getName(Method m, int i) { for (ResponseHeader h : getAnnotations(ResponseHeader.class, m, i)) { if (! h.name().isEmpty()) return h.name(); if (! h.value().isEmpty()) return h.value(); } throw new InternalServerError("@ResponseHeader used without name or value on method ''{0}'' parameter ''{1}''.", m, i); }
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); }
private static String getName(Method m, int i) { for (HasQuery h : getAnnotations(HasQuery.class, m, i)) { if (! h.name().isEmpty()) return h.name(); if (! h.value().isEmpty()) return h.value(); } throw new InternalServerError("@HasQuery used without name or value on method ''{0}'' parameter ''{1}''.", m, i); }
private static String getName(Method m, int i) { for (HasFormData h : getAnnotations(HasFormData.class, m, i)) { if (! h.name().isEmpty()) return h.name(); if (! h.value().isEmpty()) return h.value(); } throw new InternalServerError("@HasFormData 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 (ResponseHeader h : getAnnotations(ResponseHeader.class, m, i)) { if (! h.name().isEmpty()) return h.name(); if (! h.value().isEmpty()) return h.value(); } throw new InternalServerError("@ResponseHeader used without name or value on method ''{0}'' parameter ''{1}''.", m, i); }
private static String getName(Method m, int i) { for (FormData h : getAnnotations(FormData.class, m, i)) { if (! h.name().isEmpty()) return h.name(); if (! h.value().isEmpty()) return h.value(); } throw new InternalServerError("@FormData used without name or value on method ''{0}'' parameter ''{1}''.", m, i); }
private static String getName(Method m, int i) { for (HasQuery h : getAnnotations(HasQuery.class, m, i)) { if (! h.name().isEmpty()) return h.name(); if (! h.value().isEmpty()) return h.value(); } throw new InternalServerError("@HasQuery used without name or value on method ''{0}'' parameter ''{1}''.", m, i); }