package org.avaje.metric;

/**
 * The name of the metric.
 */
public interface MetricName extends Comparable<MetricName> {

  /**
   * Returns the group to which the metric belongs. For class-based metrics, this will be the
   * package name.
   */
  String getGroup();

  /**
   * Returns the type to which the Metric belongs. For class-based metrics, this will be the simple
   * class name.
   */
  String getType();

  /**
   * Returns the name of the metric.
   */
  String getName();

  /**
   * Return a simple java like name.
   */
  String getSimpleName();

  /**
   * Create and return another MetricName based on this instance with an additional suffix added to
   * the name.
   * 
   * @param nameSuffix
   *          The addition text added to this metrics name.
   */
  MetricName withSuffix(String nameSuffix);
}
@@ -117,16 +117,884 @@
 ame%3E %7B%0A%0A
+  /**%0A   * Create a Metric name by parsing a name that is expected to include periods (dot notation%0A   * similar to package.Class.method).%0A   */%0A  static MetricName of(String name) %7B%0A    return MetricManager.name(name);%0A  %7D%0A%0A  /**%0A   * Create a MetricName based on a class and name.%0A   * %3Cp%3E%0A   * Often the name maps to a method name.%0A   */%0A  static MetricName of(Class%3C?%3E cls, String name) %7B%0A    return MetricManager.name(cls, name);%0A  %7D%0A%0A  /**%0A   * Create a Metric name based on group, type and name.%0A   *%0A   * @param group%0A   *          The group which often maps to a package name.%0A   * @param type%0A   *          The type which often maps to a simple class name.%0A   * @param name%0A   *          The name which often maps to a method name.%0A   */%0A  static MetricName of(String group, String type, String name) %7B%0A    return MetricManager.name(group, type, name);%0A  %7D%0A%0A
   /**%0A  

Add MetricName.of() helper methods #9