edu.uchsc.ccp.iaa.matcher
Class SubclassMatcher

java.lang.Object
  extended by edu.uchsc.ccp.iaa.matcher.SubclassMatcher
All Implemented Interfaces:
Matcher

public class SubclassMatcher
extends Object
implements Matcher

This matcher is very similar to ClassMatcher.

Author:
Compaq_Owner

Constructor Summary
SubclassMatcher(ClassHierarchy hierarchy)
           
 
Method Summary
 String getDescription()
           
 String getIAAClass()
           
 String getName()
           
 Set<String> getSubclasses()
           
 Annotation match(Annotation annotation, String compareSetName, Set<Annotation> excludeAnnotations, IAA iaa, MatchResult matchResult)
          This method will return a match from ClassMatcher.
 boolean returnsTrivials()
           
 void setIAAClass(String className)
          Sets the class of the
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubclassMatcher

public SubclassMatcher(ClassHierarchy hierarchy)
Method Detail

match

public Annotation match(Annotation annotation,
                        String compareSetName,
                        Set<Annotation> excludeAnnotations,
                        IAA iaa,
                        MatchResult matchResult)
This method will return a match from ClassMatcher. If one does not exist, then match for Otherwise, null is returned.

Specified by:
match in interface Matcher
Parameters:
annotation -
compareSetName -
excludeAnnotations -
iaa -
matchResult - will be set to NONTRIVIAL_MATCH, NONTRIVIAL_NONMATCH, or TRIVIAL_NONMATCH. Trivial non-matches occur when the annotation is not of the class specified by setIAAClass or a subclass of it. Trivial non-matches should be ignored and not counted in any IAA metrics.
Returns:
the annotation that was matched. If none exists then return null.
See Also:
Matcher.match(Annotation, String, Set, IAA, MatchResult), MatchResult.NONTRIVIAL_MATCH, MatchResult.NONTRIVIAL_NONMATCH, MatchResult.TRIVIAL_NONMATCH, Annotation.getShortestAnnotation(Collection), setIAAClass(String)

setIAAClass

public void setIAAClass(String className)
Sets the class of the

Parameters:
className -

getIAAClass

public String getIAAClass()

getName

public String getName()
Specified by:
getName in interface Matcher

getDescription

public String getDescription()
Specified by:
getDescription in interface Matcher

returnsTrivials

public boolean returnsTrivials()
Specified by:
returnsTrivials in interface Matcher

getSubclasses

public Set<String> getSubclasses()