boon/src/main/java/org/boon/validation/readers/PropertiesFileValidatorMetaDataReader.java
private Properties loadMetaDataPropsFile(
            Class<?> clazzWhoseValidationMetaDataWeAreReading ) {
        String className = clazzWhoseValidationMetaDataWeAreReading.getName();

        /*
         * If the class is proxied there will be a $CGLIB on the end of it.
         * Remove this.
         */
        className = className.split( "[$]" )[ 0 ];
        
        /*
         * The resourceName is as follows: If the class name is com.foo.Foo Then
         * the resource name is com.foo.Foo.properties.
         */
        String[] sourceParts = className.split( "[.]" );
        String resourceName = ( sourceParts[ sourceParts.length - 1 ] ) + ".properties";

        /* Check to see if this properties file was already loaded. */
        Properties validationMetaDataProps = metaDataPropsCache.get( resourceName );

        /* If the properties file was not loaded, then load it. */
        if ( validationMetaDataProps == null ) {
            validationMetaDataProps = new Properties();
            try {
                /*
                 * Try to load the properties file that contains the validation
                 * meta-data.
                 */
                validationMetaDataProps.load( this.getClass()
                        .getClassLoader()
                        .getResourceAsStream( resourceName ) );
            } catch ( IOException ioex ) {
                /*
                 * This can happen and is not an error. It just means there is
                 * no validation for this guy. Maybe we should log this.
                 * Note self... addObject logging capability to this project!.
                 */
            }
            /*
             * Put the properties file into the cache so we don't have to read
             * it again.
             */
            metaDataPropsCache.put( resourceName, validationMetaDataProps );
        }
        assert validationMetaDataProps != null :
                "Properties for validation meta-data were loaded";
        return validationMetaDataProps;
    }
private Properties loadMetaDataPropsFile(
            Class<?> clazzWhoseValidationMetaDataWeAreReading ) {
        String className = clazzWhoseValidationMetaDataWeAreReading.getName();

        /*
         * If the class is proxied there will be a $CGLIB on the end of it.
         * Remove this.
         */
        className = className.split( "[$]" )[ 0 ];
        
        /*
         * The resourceName is as follows: If the class name is com.foo.Foo Then
         * the resource name is com.foo.Foo.properties.
         */
        String[] sourceParts = className.split( "[.]" );
        String resourceName = ( sourceParts[ sourceParts.length - 1 ] ) + ".properties";

        /* Check to see if this properties file was already loaded. */
        Properties validationMetaDataProps = metaDataPropsCache.get( resourceName );

        /* If the properties file was not loaded, then load it. */
        if ( validationMetaDataProps == null ) {
            validationMetaDataProps = new Properties();
            try {
                /*
                 * Try to load the properties file that contains the validation
                 * meta-data.
                 */
                validationMetaDataProps.load( this.getClass()
                        .getClassLoader()
                        .getResourceAsStream( resourceName ) );
            } catch ( IOException ioex ) {
                /*
                 * This can happen and is not an error. It just means there is
                 * no validation for this guy. Maybe we should log this.
                 * Note self... addObject logging capability to this project!.
                 */
            }
            /*
             * Put the properties file into the cache so we don't have to read
             * it again.
             */
            metaDataPropsCache.put( resourceName, validationMetaDataProps );
        }
        assert validationMetaDataProps != null :
                "Properties for validation meta-data were loaded";
        return validationMetaDataProps;
    }
private Properties loadMetaDataPropsFile ( Class < ? > clazzWhoseValidationMetaDataWeAreReading ) { String className = clazzWhoseValidationMetaDataWeAreReading . getName ( ) ; /*
         * If the class is proxied there will be a $CGLIB on the end of it.
         * Remove this.
         */ className = className . split ( "[$]" ) [ 0 ] ; /*
         * The resourceName is as follows: If the class name is com.foo.Foo Then
         * the resource name is com.foo.Foo.properties.
         */ String [ ] sourceParts = className . split ( "[.]" ) ; String resourceName = ( sourceParts [ sourceParts . length - 1 ] ) + ".properties" ; /* Check to see if this properties file was already loaded. */ Properties validationMetaDataProps = metaDataPropsCache . get ( resourceName ) ; /* If the properties file was not loaded, then load it. */ if ( validationMetaDataProps == null ) { validationMetaDataProps = new Properties ( ) ; try { /*
                 * Try to load the properties file that contains the validation
                 * meta-data.
                 */ validationMetaDataProps . load ( this . getClass ( ) . getClassLoader ( ) . getResourceAsStream ( resourceName ) ) ; } catch ( IOException ioex ) { /*
                 * This can happen and is not an error. It just means there is
                 * no validation for this guy. Maybe we should log this.
                 * Note self... addObject logging capability to this project!.
                 */ } /*
             * Put the properties file into the cache so we don't have to read
             * it again.
             */ metaDataPropsCache . put ( resourceName , validationMetaDataProps ) ; } assert validationMetaDataProps != null : "Properties for validation meta-data were loaded" ; return validationMetaDataProps ; }
This method loads the MetaData properties file. The Properties are cached
in <b>metaDataPropsCache</b> and will not be reloaded twice.

@param clazzWhoseValidationMetaDataWeAreReading
The class whose property meta-data we are retrieving.
@return
This method loads the MetaData properties file . The Properties are cached in <b > metaDataPropsCache< / b > and will not be reloaded twice .