1 16 package com.google.gwt.dev.cfg; 17 18 import com.google.gwt.core.ext.GeneratorContext; 19 import com.google.gwt.core.ext.TreeLogger; 20 import com.google.gwt.core.ext.UnableToCompleteException; 21 22 import java.util.Iterator ; 23 24 28 public class ConditionNone extends CompoundCondition { 29 30 public ConditionNone() { 31 } 32 33 protected boolean doEval(TreeLogger logger, GeneratorContext context, 34 String testType) throws UnableToCompleteException { 35 for (Iterator iter = getConditions().iterator(); iter.hasNext();) { 36 Condition condition = (Condition) iter.next(); 37 if (condition.isTrue(logger, context, testType)) { 38 return false; 39 } 40 } 41 return true; 42 } 43 44 protected String getEvalAfterMessage(String testType, boolean result) { 45 if (result) { 46 return "Yes: All subconditions were false"; 47 } else { 48 return "No: One or more subconditions was true"; 49 } 50 } 51 52 protected String getEvalBeforeMessage(String testType) { 53 return "Checking if all subconditions are false (<none>)"; 54 } 55 } 56 | Popular Tags |