public < T > T getProperty ( final String name , final Class < T > clazz ) { if ( containsProperty ( name ) ) { val item = this . properties . get ( name ) ; if ( item == null ) { return null ; } if ( ! clazz . isAssignableFrom ( item . getClass ( ) ) ) { throw new ClassCastException ( "Object [" + item + " is of type " + item . getClass ( ) + " when we were expecting " + clazz ) ; } return ( T ) item ; } return null ; }
Gets property .