public class ToStringBuilderTest extends Object
ToStringBuilder.| Constructor and Description |
|---|
ToStringBuilderTest() |
public ToStringBuilderTest()
public void after()
public void testConstructorEx1()
public void testConstructorEx2()
public void testConstructorEx3()
public void testGetSetDefault()
public void testSetDefaultEx()
public void testBlank()
public void testReflectionInteger()
public void testReflectionCharacter()
public void testReflectionBoolean()
public void assertReflectionArray(String expected, Object actual)
public void testReflectionObjectArray()
public void testReflectionLongArray()
public void testReflectionIntArray()
public void testReflectionShortArray()
public void testReflectionyteArray()
public void testReflectionCharArray()
public void testReflectionDoubleArray()
public void testReflectionFloatArray()
public void testReflectionBooleanArray()
public void testReflectionFloatArrayArray()
public void testReflectionLongArrayArray()
public void testReflectionIntArrayArray()
public void testReflectionhortArrayArray()
public void testReflectionByteArrayArray()
public void testReflectionCharArrayArray()
public void testReflectionDoubleArrayArray()
public void testReflectionBooleanArrayArray()
public void testReflectionHierarchyArrayList()
public void testReflectionHierarchy()
public void testInnerClassReflection()
public void testReflectionArrayCycle() throws Exception
Exceptionpublic void testReflectionArrayCycleLevel2() throws Exception
Exceptionpublic void testReflectionArrayArrayCycle() throws Exception
Exceptionpublic void testSimpleReflectionObjectCycle() throws Exception
Exceptionpublic void testSelfInstanceVarReflectionObjectCycle() throws Exception
Exceptionpublic void testSelfInstanceTwoVarsReflectionObjectCycle() throws Exception
Exceptionpublic void testReflectionObjectCycle() throws Exception
Exceptionpublic void testReflectionArrayAndObjectCycle() throws Exception
Exceptionpublic void testAppendSuper()
public void testAppendToString()
public void testObject()
public void testObjectBuild()
public void testLong()
public void testInt()
public void testShort()
public void testChar()
public void testByte()
public void testDouble()
public void testFloat()
public void testBoolean()
public void testObjectArray()
public void testLongArray()
public void testIntArray()
public void testShortArray()
public void testByteArray()
public void testCharArray()
public void testDoubleArray()
public void testFloatArray()
public void testBooleanArray()
public void testLongArrayArray()
public void testIntArrayArray()
public void testShortArrayArray()
public void testByteArrayArray()
public void testCharArrayArray()
public void testDoubleArrayArray()
public void testFloatArrayArray()
public void testBooleanArrayArray()
public void testObjectCycle()
public void testSimpleReflectionStatics()
public void testReflectionStatics()
public void testInheritedReflectionStatics()
public <T> String toStringWithStatics(T object, ToStringStyle style, Class<? super T> reflectUpToClass)
This method uses reflection to build a suitable
toString value which includes static fields.
It uses AccessibleObject.setAccessible to gain access to private
fields. This means that it will throw a security exception if run
under a security manager, if the permissions are not set up correctly.
It is also not as efficient as testing explicitly.
Transient fields are not output.
Superclass fields will be appended up to and including the specified superclass.
A null superclass is treated as java.lang.Object.
If the style is null, the default
ToStringStyle is used.
object - the Object to be outputstyle - the style of the toString to create,
may be nullreflectUpToClass - the superclass to reflect up to (inclusive),
may be nullIllegalArgumentException - if the Object is nullpublic void test_setUpToClass_valid()
public void test_setUpToClass_invalid()
public void testReflectionNull()
public void testAppendToStringUsingMultiLineStyle()
Copyright © 2001-2013 The Apache Software Foundation. All Rights Reserved.