The Comparer is used to compare annotations on the attributes of that annotation. Unlike the equals method, this can ignore some attributes based on the name of the attributes. This is useful if some annotations have overridden values, such as the field or method name.
Exemple #1
0
 /// <summary>
 /// Constructor for the <c>Scanner</c> object. This is used
 /// to scan the provided class for annotations that are used to
 /// build a schema for an XML file to follow.
 /// </summary>
 /// <param name="type">
 /// this is the type that is scanned for a schema
 /// </param>
 public Scanner(Class type) {
    this.scanner = new ClassScanner(type);
    this.attributes = new LabelMap(this);
    this.elements = new LabelMap(this);
    this.comparer = new Comparer();
    this.type = type;
    this.Scan(type);
 }
 /// <summary>
 /// Constructor for the <c>AnnotationHandler</c> object. This
 /// is used to create a handler for invocations on a synthetic
 /// annotation. The annotation type wrapped must be provided.
 /// </summary>
 /// <param name="type">
 /// this is the annotation type that this is wrapping
 /// </param>
 public AnnotationHandler(Class type) {
    this.comparer = new Comparer();
    this.type = type;
 }