* @param objects\r
* @return the element or null if none could be found\r
*/\r
+ @SuppressWarnings("unchecked")\r
private <T> T getPossibleElement(Class<T> type, List<Object> objects) {\r
for (Object obj : objects) {\r
if (obj.getClass().equals(type)) {\r
* @param objects\r
* @return a list of elements (empty if none could be found)\r
*/\r
- private <T> List<T> getElements(Class<T> type, List<Object> objects) {\r
+ @SuppressWarnings("unchecked")\r
+ private <T> List<T> getElements(Class<T> type, List<Object> objects) {\r
List<T> elements = new ArrayList<T>();\r
for (Object obj : objects) {\r
if (obj.getClass().equals(type)) {\r
return elements;\r
}\r
\r
+ @SuppressWarnings("unchecked")\r
private <T> T getPossibleJAXBElement(Class<T> type, String name, List<Object> objects) {\r
- for (JAXBElement je : getElements(JAXBElement.class, objects)) {\r
+ for (JAXBElement<?> je : getElements(JAXBElement.class, objects)) {\r
if (je.getName().getLocalPart().equals(name) && je.getDeclaredType().equals(type)) {\r
return (T)je.getValue();\r
}\r
return null;\r
}\r
\r
+ @SuppressWarnings("unchecked")\r
private <T> List<T> getJAXBElements(Class<T> type, String name, List<Object> objects) {\r
List<T> elements = new ArrayList<T>();\r
- for (JAXBElement je : getElements(JAXBElement.class, objects)) {\r
+ for (JAXBElement<?> je : getElements(JAXBElement.class, objects)) {\r
if (je.getName().getLocalPart().equals(name) && je.getDeclaredType().equals(type)) {\r
elements.add((T)je.getValue());\r
}\r