question: public < T > T asClass ( Class < T > clazz , T defaultValue ) { if ( value == null ) return defaultValue ; try { return clazz . cast ( value ) ; } catch ( ClassCastException e ) { return defaultValue ; } }
target:  Convert the variant value to any class. If it cannot be converted returns defaultValue. 