* Find all the findings that apply to an annotated AST.
* @param annotation - the annotated AST.
*/
ArrayList<UnknownTreeFinding> findMatches(CmcEmitter.JBurgAnnotation annotation)
{
IASNode node = annotation.getNode();
ArrayList<UnknownTreeFinding.Template> candidates = new ArrayList<UnknownTreeFinding.Template>();
ArrayList<UnknownTreeFinding> result = new ArrayList<UnknownTreeFinding>();
// Get the initial set of findings: all findings filed
// under this node's ASTNodeID, and all findings filed
// under "Unknown" which means "any" in this context.
if ( UnknownTreeHandlerPatterns.allTemplates.containsKey(node.getNodeID()) )
candidates.addAll(UnknownTreeHandlerPatterns.allTemplates.get(node.getNodeID()));
if ( UnknownTreeHandlerPatterns.allTemplates.containsKey(UnknownID) )
candidates.addAll(UnknownTreeHandlerPatterns.allTemplates.get(UnknownID) );
for ( UnknownTreeFinding.Template candidate: candidates )