* and a trace
*
* @author Matthew Khouzam
- * @since 3.0
*/
public class TraceTypeHelper {
+ private static final String SEP = " : "; //$NON-NLS-1$
+
private final String fName;
private final String fCategoryName;
private final String fTraceTypeId;
return fCategoryName;
}
+ /**
+ * Get the trace type label "category : name".
+ *
+ * @return the trace type label
+ */
+ public String getLabel() {
+ if (fCategoryName.isEmpty()) {
+ return fName;
+ }
+ return fCategoryName + SEP + fName;
+ }
+
/**
* Get the trace type id
*
* @param path
* the trace to validate
* @return the confidence level (0 is lowest) or -1 if validation fails
- * @since 3.0
*/
public int validateWithConfidence(String path) {
int result = -1;
/**
* Get an object of the trace type
* @return an object of the trace type
- * @since 2.1
*/
public ITmfTrace getTrace() {
return fTrace;
* Get the class associated with this trace type
*
* @return The trace class
- * @since 3.0
*/
public Class<? extends ITmfTrace> getTraceClass() {
return fTrace.getClass();