@ VisibleForTesting public static boolean register ( PropertyKey key ) { String name = key . getName ( ) ; String [ ] aliases = key . getAliases ( ) ; if ( DEFAULT_KEYS_MAP . containsKey ( name ) ) { if ( DEFAULT_KEYS_MAP . get ( name ) . isBuiltIn ( ) || ! key . isBuiltIn ( ) ) { return false ; } } DEFAULT_KEYS_MAP . put ( name , key ) ; if ( aliases != null ) { for ( String alias : aliases ) { DEFAULT_ALIAS_MAP . put ( alias , key ) ; } } return true ; }
Registers the given key to the global key map .