static TaskType getTaskType(String type) {
        if (type == null || type.isEmpty()) {
          return ALL;
        }
        type = type.toLowerCase();
        for (TaskType taskType : values()) {
          if (taskType.toString().equals(type)) {
            return taskType;
          }
        }
        return ALL;
      }
An InvocationHandler that simply passes through calls to the original object.
hbase-server/src/main/java/org/apache/hadoop/hbase/monitoring/TaskMonitor.java