The default implementation of this method accesses all declared
/// fields of this object and prints the values in the following syntax:
///
///
/// public String toString() {
/// return "start=" + startOffset + ",end=" + endOffset;
/// }
///
///
/// This method may be overridden by subclasses.
///
public override System.String ToString()
{
System.Text.StringBuilder buffer = new System.Text.StringBuilder();
System.Type clazz = this.GetType();
System.Reflection.FieldInfo[] fields = clazz.GetFields(System.Reflection.BindingFlags.Instance | System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.DeclaredOnly | System.Reflection.BindingFlags.Static);
try
{
for (int i = 0; i < fields.Length; i++)
{
System.Reflection.FieldInfo f = fields[i];
if (f.IsStatic)
continue;
//f.setAccessible(true); // {{Aroush-2.9}} java.lang.reflect.AccessibleObject.setAccessible
System.Object value_Renamed = f.GetValue(this);
if (buffer.Length > 0)
{
buffer.Append(',');
}
if (value_Renamed == null)
{
buffer.Append(f.Name + "=null");
}
else
{
buffer.Append(f.Name + "=" + value_Renamed);
}
}
}
catch (System.UnauthorizedAccessException e)
{
// this should never happen, because we're just accessing fields
// from 'this'
throw new System.SystemException(e.Message, e);
}
return buffer.ToString();
}
///