@SuppressWarnings({ "unchecked", "rawtypes" })
    public static Object getPropertyValueOfNewInstance(Class clazz, String propertyName, Class<?> propertyType) {
        // validate
        if (clazz == null || !StringUtils.hasText(propertyName)) {
            return null;
        }

        try {
            return getPropertyOrStaticPropertyOrFieldValue(BeanUtils.instantiateClass(clazz), propertyName);
        }
        catch (BeanInstantiationException e) {
            return null;
        }
    }
@ SuppressWarnings ( { "unchecked" , "rawtypes" } ) public static Object getPropertyValueOfNewInstance ( Class clazz , String propertyName , Class < ? > propertyType ) { if ( clazz == null || ! StringUtils . hasText ( propertyName ) ) { return null ; } try { return getPropertyOrStaticPropertyOrFieldValue ( BeanUtils . instantiateClass ( clazz ) , propertyName ) ; } catch ( BeanInstantiationException e ) { return null ; } }
Returns the value of the specified property and type from an instance of the specified Grails class

@param clazz The name of the class which contains the property
@param propertyName The property name
@param propertyType The property type

@return The value of the property or null if none exists