Ejemplo n.º 1
0
        /// <summary>
        /// This is used to validate the object once all the get methods
        /// have been matched with a set method. This ensures that there
        /// is not a set method within the object that does not have a
        /// match, therefore violating the contract of a property.
        /// </summary>
        /// <param name="write">
        /// this is a get method that has been extracted
        /// </param>
        /// <param name="name">
        /// this is the Java Bean methods name to be matched
        /// </param>
        public void Validate(MethodPart write, String name)
        {
            MethodPart match  = read.Take(name);
            Method     method = write.getMethod();

            if (match == null)
            {
                throw new MethodException("No matching get method for %s in %s", method, type);
            }
        }