public void testSelfInstanceTwoVarsReflectionObjectCycle() throws Exception(Code)
Test a class that defines an ivar pointing to itself. This test was
created to show that handling cyclical object resulted in a missing endFieldSeparator call.
throws: Exception -
testSelfInstanceVarReflectionObjectCycle
public void testSelfInstanceVarReflectionObjectCycle() throws Exception(Code)
Test a class that defines an ivar pointing to itself.
throws: Exception -
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.
Parameters: object - the Object to be output Parameters: style - the style of the toString to create,may be null Parameters: reflectUpToClass - the superclass to reflect up to (inclusive),may be null the String result throws: IllegalArgumentException - if the Object is null