public Message getMessage ( MessageId id ) { // Performance note: this method uses a lazy initialization pattern. When // a MessageId is first requested, we fetch the data from the ResourceBundle // and create a new Message object, which is then cached. On the next // request, we'll use the cached version instead. Message message ; if ( cachedMessages . containsKey ( id ) ) { message = cachedMessages . get ( id ) ; } else { message = new Message ( id , defaultSeverities . get ( id ) , getMessageAsString ( id ) , getSuggestion ( id ) ) ; cachedMessages . put ( id , message ) ; } return message ; }
Gets the message for the given id .