public void setClassTag ( String tag , Class type ) { if ( tag == null ) throw new IllegalArgumentException ( "tag cannot be null." ) ; if ( type == null ) throw new IllegalArgumentException ( "type cannot be null." ) ; classNameToTag . put ( type . getName ( ) , tag ) ; tagToClass . put ( tag , type ) ; }
Allows the specified tag to be used in YAML instead of the full class name .