/** * Builds a String for a toString method excluding the given field names. * * @param object * The object to "toString". * @param excludeFieldNames * The field names to exclude * @return The toString value. */ public static String toStringExclude(final Object object, final String... excludeFieldNames) { return new ReflectionToStringBuilder(object).setExcludeFieldNames(excludeFieldNames).toString(); }
@Override public String toString() { // Used in error messages, etc. return new ReflectionToStringBuilder(this, SHORT_PREFIX_STYLE) .setExcludeFieldNames(FIELDS_TO_EXCLUDE_FROM_TO_STRING) .toString(); }
@Override public String toString() { return new ReflectionToStringBuilder(this, ToStringStyle.SIMPLE_STYLE) .setExcludeFieldNames("tracer", "clock") .toString(); }
@Override public String toString() { ReflectionToStringBuilder builder = getBuilder(); builder.setExcludeFieldNames("suggestionsPackage", "log"); return builder.toString(); }
/** * Builds a String for a toString method excluding the given field names. * * @param object * The object to "toString". * @param excludeFieldNames * The field names to exclude * @return The toString value. */ public static String toStringExclude(final Object object, final String... excludeFieldNames) { return new ReflectionToStringBuilder(object).setExcludeFieldNames(excludeFieldNames).toString(); }
@Override public String toString() { return new ReflectionToStringBuilder(this, ToStringStyle.SIMPLE_STYLE) .setExcludeFieldNames("acceptQueue", "executor", "flushTask", "senderTask") .toString(); }
@Override public String toString() { return new ReflectionToStringBuilder(this, ToStringStyle.SIMPLE_STYLE) .setExcludeFieldNames("metrics") .toString(); }
@Override public String toString() { ReflectionToStringBuilder builder = getBuilder(); builder.setExcludeFieldNames("log"); return builder.build(); } }
/** * Builds a String for a toString method excluding the given field names. * * @param object * The object to "toString". * @param excludeFieldNames * The field names to exclude * @return The toString value. */ public static String toStringExclude(final Object object, final String... excludeFieldNames) { return new ReflectionToStringBuilder(object).setExcludeFieldNames(excludeFieldNames).toString(); }
/** * Builds a String for a toString method excluding the given field names. * * @param object * The object to "toString". * @param excludeFieldNames * The field names to exclude * @return The toString value. */ public static String toStringExclude(final Object object, final String... excludeFieldNames) { return new ReflectionToStringBuilder(object).setExcludeFieldNames(excludeFieldNames).toString(); }
@Override public String toString() { return new ReflectionToStringBuilder(this, ToStringStyle.SIMPLE_STYLE) .setExcludeFieldNames("clock", "activeSource") .toString(); }
@Override public String toString() { return new ReflectionToStringBuilder(this, SdkDefaults.TO_STRING_STYLE) //important to not log passwords .setExcludeFieldNames("password", "newPassword", "currentPassword", "oldPassword", "access_token", "accessToken") .build(); } }
+ new ReflectionToStringBuilder(packageInfo, ToStringStyle.SHORT_PREFIX_STYLE).setExcludeFieldNames( new String[] { "description" }) .toString());