layering-cache-aspectj/src/main/java/com/github/zomin/support/SimpleKeyGenerator.java
/**
     * Generate a key based on the specified parameters.
     *
     * @param params params
     * @return Object
     */
Generate a key based on the specified parameters.
@param params params
@return Object
Generate a key based on the specified parameters . @param params params @return Object
public static Object generateKey(Object... params) {
        if (params.length == 0) {
            return SimpleKey.EMPTY;
        }
        if (params.length == 1) {
            Object param = params[0];
            if (param != null && !param.getClass().isArray()) {
                return param;
            }
        }
        return new SimpleKey(params);
    }
public static Object generateKey ( Object ... params ) { if ( params . length == 0 ) { return SimpleKey . EMPTY ; } if ( params . length == 1 ) { Object param = params [ 0 ] ; if ( param != null && ! param . getClass ( ) . isArray ( ) ) { return param ; } } return new SimpleKey ( params ) ; }
Generate a key based on the specified parameters.
Generate a key based on the specified parameters .