/** * This class counts the number of variables appearing in the given formula. * */ class MethodDeclarationCounter extends TUCombinerFloatAdd { Float apply(MethodDeclaration v) { System.out.println("in apply Literal; return 1"); return 1.0f; } static Float countMethodDeclarations(Object o){ return traverse(o, new MethodDeclarationCounter()); } }