Package org.jibx.util

Class ReflectionUtilities


  • public class ReflectionUtilities
    extends java.lang.Object
    Support methods for using reflection access to values.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.Map applyKeyValueMap​(java.util.Map map, java.lang.Object obj)
      Apply a key/value map to an object instance.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ReflectionUtilities

        public ReflectionUtilities()
    • Method Detail

      • applyKeyValueMap

        public static java.util.Map applyKeyValueMap​(java.util.Map map,
                                                     java.lang.Object obj)
        Apply a key/value map to an object instance. This uses reflection to match the keys to either set methods (with names of the form setZZZText taking a single String parameter, or setZZZ taking a single String or primitive wrapper parameter) or fields (named m_ZZZ). The ZZZ in the names is based on the key name, with hyphenation converted to camel case (leading upper camel case, for the method names).
        Parameters:
        map -
        obj -
        Returns:
        map for key/values not found in the supplied object