code: public String getText(String key, Object... args) throws MissingResourceException {
          if (messageRB == null) {
              try {
                  messageRB = ResourceBundle.getBundle(resourcelocation);
              } catch (MissingResourceException e) {
                  throw new Error("Fatal: Resource (" + resourcelocation +
                                      ") for javadoc doclets is missing.");
              }
          }
          String message = messageRB.getString(key);
          return MessageFormat.format(message, args);
      }
docs: Get and format message string from resource
  
  @param key selects message from resource
  @param args arguments to be replaced in the message.
  @throws MissingResourceException when the key does not
  exist in the properties file.