public static PropertySet populatePropertyHash(PropertySet toProperties, java.lang.Object toObject, IPropertySet toSecondary)
        {
            // Make a copy to protect from concurrent modification
            List<String> lcKeySet = new List(toProperties.keySet());
            for (String lcParam : lcKeySet)
            {
                /* Look for a property method, or a property type method, a property type method is a method
                 * of the same name which returns a value and takes no parameters
                 */
                Method loMethod = null;
                if (toObject != null)
                {
                    try
                    {
                        loMethod = Java.getMethod(toObject.getClass(), lcParam, new Class[0]);
                    }
                    catch (MethodNotFoundException ex)
                    {
                        try
                        {
                            loMethod = Java.getMethod(toObject.getClass(), "get" + lcParam, new Class[0]);
                        }
                        catch (MethodNotFoundException ex1)
                        {
                            // Do nothing here
                        }
                    }
                }
                Object loValue = null;
                if (loMethod != null && loMethod.getReturnType() != null)
                {
                    try
                    {
                        loValue = loMethod.invoke(toObject, (java.lang.Object[])null);
                    }
                    catch(Throwable ex)
                    {
                        // Do nothing here, the call wasn't valid
                    }
                }
                toProperties.setProperty(lcParam, loValue == null ? toSecondary != null ? toSecondary.getProperty(lcParam) : loValue : loValue);
            }
            return toProperties;
        }