static public String generateUniqueName ( Object src , String extension ) { StringBuilder builder = new StringBuilder ( ) ; builder . append ( UUID . randomUUID ( ) . toString ( ) ) ; if ( src != null ) { builder . append ( "-" ) ; builder . append ( src . getClass ( ) . getName ( ) ) ; builder . append ( "-" ) ; builder . append ( Integer . toHexString ( src . hashCode ( ) ) ) ; } if ( extension != null ) { builder . append ( extension ) ; } return builder . toString ( ) ; }
Generates a unique name suitable for using in the map methods for the URL parameter .