@Override protected void appendDetail(final StringBuffer buffer, final String fieldName, final int[] array) { spaces += INDENT; resetIndent(); super.appendDetail(buffer, fieldName, array); spaces -= INDENT; resetIndent(); }
@Override protected void reflectionAppendArrayDetail(final StringBuffer buffer, final String fieldName, final Object array) { spaces += INDENT; resetIndent(); super.reflectionAppendArrayDetail(buffer, fieldName, array); spaces -= INDENT; resetIndent(); }
/** * <p> * Append to the <code>toString</code> an <code>Object</code> array. * </p> * * @param array * the array to add to the <code>toString</code> * @return this */ public ReflectionToStringBuilder reflectionAppendArray(final Object array) { this.getStyle().reflectionAppendArrayDetail(this.getStringBuffer(), null, array); return this; }
@Override public DiffResult diff(final SimpleClass obj) { return new DiffBuilder(this, obj, ToStringStyle.SHORT_PREFIX_STYLE) .append(getFieldName(), booleanField, obj.booleanField) .build(); } }
@Test public void test_toStringExcludeArrayWithNull() { final String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), new String[]{null}); this.validateSecretFieldPresent(toString); }
@Test public void test_toStringExcludeArray() { final String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), SECRET_FIELD); this.validateSecretFieldAbsent(toString); }
@Override protected void appendDetail(final StringBuffer buffer, final String fieldName, final double[] array) { spaces += INDENT; resetIndent(); super.appendDetail(buffer, fieldName, array); spaces -= INDENT; resetIndent(); }
@Test public void test_toStringExcludeEmptyArray() { final String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), ArrayUtils.EMPTY_STRING_ARRAY); this.validateSecretFieldPresent(toString); }
@Override protected void appendDetail(final StringBuffer buffer, final String fieldName, final short[] array) { spaces += INDENT; resetIndent(); super.appendDetail(buffer, fieldName, array); spaces -= INDENT; resetIndent(); }
@Test public void test_toStringExcludeNullCollection() { final String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), (Collection<String>) null); this.validateSecretFieldPresent(toString); }
@Override protected void appendDetail(final StringBuffer buffer, final String fieldName, final byte[] array) { spaces += INDENT; resetIndent(); super.appendDetail(buffer, fieldName, array); spaces -= INDENT; resetIndent(); }
@Test public void test_toStringExcludeArrayWithNulls() { final String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), null, null); this.validateSecretFieldPresent(toString); }
@Override protected void appendDetail(final StringBuffer buffer, final String fieldName, final Object[] array) { spaces += INDENT; resetIndent(); super.appendDetail(buffer, fieldName, array); spaces -= INDENT; resetIndent(); }
@Test public void test_toStringExcludeNullArray() { final String toString = ReflectionToStringBuilder.toStringExclude(new TestFixture(), (String[]) null); this.validateSecretFieldPresent(toString); }
@Override protected void appendDetail(final StringBuffer buffer, final String fieldName, final long[] array) { spaces += INDENT; resetIndent(); super.appendDetail(buffer, fieldName, array); spaces -= INDENT; resetIndent(); }
@Override protected void appendDetail(final StringBuffer buffer, final String fieldName, final boolean[] array) { spaces += INDENT; resetIndent(); super.appendDetail(buffer, fieldName, array); spaces -= INDENT; resetIndent(); }
@Override protected void appendDetail(final StringBuffer buffer, final String fieldName, final char[] array) { spaces += INDENT; resetIndent(); super.appendDetail(buffer, fieldName, array); spaces -= INDENT; resetIndent(); }
@Override protected void appendDetail(final StringBuffer buffer, final String fieldName, final float[] array) { spaces += INDENT; resetIndent(); super.appendDetail(buffer, fieldName, array); spaces -= INDENT; resetIndent(); }