class ClassBasedTransformer implements Transformer {

    @Override
    public Map<String, String> getTags(String metricsName) {
        Map<String, String> tags = new HashMap<String, String>();
        tags.put("metricName", metricsName);

        Matcher packageMatcher = PACKAGE.matcher(metricsName);
        if(packageMatcher.find()) {
            tags.put("package", packageMatcher.group(1));
        }
        Matcher classMatcher = CLASS_NAME.matcher(metricsName);
        if(classMatcher.find()) {
            tags.put("className", classMatcher.group(1));
        }
        Matcher methodMatcher = METHOD.matcher(metricsName);
        if(methodMatcher.find()) {
            tags.put("method", methodMatcher.group(1));
        }
        return tags;
    }

}