/*Checks whether the input semi expression contains composition relationship * If it is present then the action method for composition is called */ public override bool test(CSsemi.CSemiExp semi) { List <string> variablecountlist = null; Repository repo_ = Repository.getInstance(); if (semi.count >= 2) { variablecountlist = semi.DetectVariables(); } if (variablecountlist != null && variablecountlist.Count == 2) { string currclassName = FindParentClass.getClassName(repo_.semi.lineCount); CSsemi.CSemiExp local = new CSsemi.CSemiExp(); local.displayNewLines = false; local.Add(variablecountlist[0]).Add(variablecountlist[1]).Add(currclassName); doActionsForComposition(local); return(true); } return(false); }