Search in sources :

Example 1 with PrependingTypeNameValuesStringBuilder

use of com.googlecode.jmxtrans.model.naming.typename.PrependingTypeNameValuesStringBuilder in project jmxtrans by jmxtrans.

the class Query method makeTypeNameValuesStringBuilder.

private TypeNameValuesStringBuilder makeTypeNameValuesStringBuilder() {
    String separator = isAllowDottedKeys() ? "." : TypeNameValuesStringBuilder.DEFAULT_SEPARATOR;
    Set<String> typeNames = getTypeNames();
    if (isUseAllTypeNames()) {
        return new UseAllTypeNameValuesStringBuilder(separator);
    } else if (typeNames != null && !typeNames.isEmpty()) {
        return new PrependingTypeNameValuesStringBuilder(separator, new ArrayList<>(typeNames));
    } else {
        return new TypeNameValuesStringBuilder(separator);
    }
}
Also used : UseAllTypeNameValuesStringBuilder(com.googlecode.jmxtrans.model.naming.typename.UseAllTypeNameValuesStringBuilder) ArrayList(java.util.ArrayList) Lists.newArrayList(com.google.common.collect.Lists.newArrayList) UseAllTypeNameValuesStringBuilder(com.googlecode.jmxtrans.model.naming.typename.UseAllTypeNameValuesStringBuilder) PrependingTypeNameValuesStringBuilder(com.googlecode.jmxtrans.model.naming.typename.PrependingTypeNameValuesStringBuilder) TypeNameValuesStringBuilder(com.googlecode.jmxtrans.model.naming.typename.TypeNameValuesStringBuilder) PrependingTypeNameValuesStringBuilder(com.googlecode.jmxtrans.model.naming.typename.PrependingTypeNameValuesStringBuilder) ToString(lombok.ToString)

Aggregations

Lists.newArrayList (com.google.common.collect.Lists.newArrayList)1 PrependingTypeNameValuesStringBuilder (com.googlecode.jmxtrans.model.naming.typename.PrependingTypeNameValuesStringBuilder)1 TypeNameValuesStringBuilder (com.googlecode.jmxtrans.model.naming.typename.TypeNameValuesStringBuilder)1 UseAllTypeNameValuesStringBuilder (com.googlecode.jmxtrans.model.naming.typename.UseAllTypeNameValuesStringBuilder)1 ArrayList (java.util.ArrayList)1 ToString (lombok.ToString)1