20 namespace Lucene.Net.Util
36 public abstract void Clear();
49 public override System.String ToString()
51 System.Text.StringBuilder buffer =
new System.Text.StringBuilder();
52 System.Type clazz = this.GetType();
53 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);
56 for (
int i = 0; i < fields.Length; i++)
58 System.Reflection.FieldInfo f = fields[i];
62 System.Object value_Renamed = f.GetValue(
this);
63 if (buffer.Length > 0)
67 if (value_Renamed == null)
69 buffer.Append(f.Name +
"=null");
73 buffer.Append(f.Name +
"=" + value_Renamed);
77 catch (System.UnauthorizedAccessException e)
81 throw new System.SystemException(e.Message, e);
84 return buffer.ToString();
99 abstract public override int GetHashCode();
106 abstract public override bool Equals(System.Object other);
112 public abstract void CopyTo(
Attribute target);
117 public virtual System.Object Clone()
119 System.Object clone = null;
122 clone = base.MemberwiseClone();
124 catch (System.Exception e)
126 throw new System.SystemException(e.Message, e);