@@ -1991,8 +1991,9 @@ public String toJsonJavaString() {
19911991 return Json .toJsonJavaString ((Collection ) getIterable ());
19921992 }
19931993
1994- public static Object fromXml (final String xml ) {
1995- return Xml .fromXml (xml );
1994+ @ SuppressWarnings ("unchecked" )
1995+ public static <T > T fromXml (final String xml ) {
1996+ return (T ) Xml .fromXml (xml );
19961997 }
19971998
19981999 public static Map <String , Object > fromXmlMap (final String xml ) {
@@ -2012,24 +2013,29 @@ public static Map<String, Object> fromXmlMap(final String xml, final Xml.FromTyp
20122013 return result ;
20132014 }
20142015
2015- public static Object fromXml (final String xml , final Xml .FromType fromType ) {
2016- return Xml .fromXml (xml , fromType );
2016+ @ SuppressWarnings ("unchecked" )
2017+ public static <T > T fromXml (final String xml , final Xml .FromType fromType ) {
2018+ return (T ) Xml .fromXml (xml , fromType );
20172019 }
20182020
2019- public static Object fromXmlMakeArrays (final String xml ) {
2020- return Xml .fromXmlMakeArrays (xml );
2021+ @ SuppressWarnings ("unchecked" )
2022+ public static <T > T fromXmlMakeArrays (final String xml ) {
2023+ return (T ) Xml .fromXmlMakeArrays (xml );
20212024 }
20222025
2023- public static Object fromXmlWithoutNamespaces (final String xml ) {
2024- return Xml .fromXmlWithoutNamespaces (xml );
2026+ @ SuppressWarnings ("unchecked" )
2027+ public static <T > T fromXmlWithoutNamespaces (final String xml ) {
2028+ return (T ) Xml .fromXmlWithoutNamespaces (xml );
20252029 }
20262030
2027- public static Object fromXmlWithoutAttributes (final String xml ) {
2028- return Xml .fromXmlWithoutAttributes (xml );
2031+ @ SuppressWarnings ("unchecked" )
2032+ public static <T > T fromXmlWithoutAttributes (final String xml ) {
2033+ return (T ) Xml .fromXmlWithoutAttributes (xml );
20292034 }
20302035
2031- public static Object fromXmlWithoutNamespacesAndAttributes (final String xml ) {
2032- return Xml .fromXmlWithoutNamespacesAndAttributes (xml );
2036+ @ SuppressWarnings ("unchecked" )
2037+ public static <T > T fromXmlWithoutNamespacesAndAttributes (final String xml ) {
2038+ return (T ) Xml .fromXmlWithoutNamespacesAndAttributes (xml );
20332039 }
20342040
20352041 public static String toXml (Collection collection ) {
@@ -2040,8 +2046,9 @@ public static String toXml(Map map) {
20402046 return Xml .toXml (map );
20412047 }
20422048
2043- public static Object fromJson (String string ) {
2044- return Json .fromJson (string );
2049+ @ SuppressWarnings ("unchecked" )
2050+ public static <T > T fromJson (String string ) {
2051+ return (T ) Json .fromJson (string );
20452052 }
20462053
20472054 public Object fromJson () {
0 commit comments