/** * retrieve the name of the file containing this rule * @return the name of the file containing this rule */ public String getFile() { return ruleScript.getFile(); }
/** * retrieve the name of the file containing this rule * @return the name of the file containing this rule */ public String getFile() { return ruleScript.getFile(); }
warning("WARNING : Cannot type check <clinit> rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); return; error("ERROR : Invalid target method <init> for interface rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); return; } else { error("ERROR : Invalid target method <init> for overriding rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); return; rule.compile(); } catch (TypeWarningException te) { typeWarning("WARNING : Unable to type check rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine(), te); System.out.println(te); System.out.println(); return; } catch (TypeException te) { typeError("ERROR : Failed to type check rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine(), te); System.out.println(te); System.out.println(); return; } catch (CompileException ce) { typeError("ERROR : Failed to compile rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine(), ce); System.out.println(ce); System.out.println(); return; } catch (Throwable th) { error("ERROR : Failed to process rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine(), th); return;
warning("WARNING : Cannot type check <clinit> rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); return; error("ERROR : Invalid target method <init> for interface rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); return; } else { error("ERROR : Invalid target method <init> for overriding rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); return; rule.compile(); } catch (TypeWarningException te) { typeWarning("WARNING : Unable to type check rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine(), te); System.out.println(te); System.out.println(); return; } catch (TypeException te) { typeError("ERROR : Failed to type check rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine(), te); System.out.println(te); System.out.println(); return; } catch (CompileException ce) { typeError("ERROR : Failed to compile rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine(), ce); System.out.println(ce); System.out.println(); return; } catch (Throwable th) { error("ERROR : Failed to process rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine(), th); return;
error("ERROR : Could not load class " + targetClassName + " declared in rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); continue; error("ERROR : Found class instead of interface for rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); continue; error("ERROR : Found interface instead of class for rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); continue; error("ERROR : Could not load bytecode for class " + targetClassName + " declared in rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); continue; error("ERROR : Could not load bytecode for class " + targetClassName + " declared in rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine(), e); continue; parseError("ERROR : Failed to parse rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine(), throwable); } else if (throwable instanceof TypeWarningException) { typeWarning("WARNING : Problem type checking rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine() + (methodName == null ? "" : " against method " + methodName), throwable); } else if (throwable instanceof TypeException) { typeError("ERROR : Failed to type check rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine() + (methodName == null ? "" : " against method " + methodName), throwable); } else { error("ERROR : Unexpected exception transforming class " + targetClassName + " using rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine() + (methodName == null ? "" : " against method " + methodName), throwable); infoMessage += "# File " + script.getFile() + " line " + script.getLine() + "\n"; infoMessage += rule; rule.compile(); } catch (TypeWarningException te) { typeWarning("WARNING : Unable to type check rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine() + (methodName == null ? "" : " against method " + methodName), te);
error("ERROR : Could not load class " + targetClassName + " declared in rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); continue; error("ERROR : Found class instead of interface for rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); continue; error("ERROR : Found interface instead of class for rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); continue; error("ERROR : Could not load bytecode for class " + targetClassName + " declared in rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine()); continue; error("ERROR : Could not load bytecode for class " + targetClassName + " declared in rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine(), e); continue; parseError("ERROR : Failed to parse rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine(), throwable); } else if (throwable instanceof TypeWarningException) { typeWarning("WARNING : Problem type checking rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine() + (methodName == null ? "" : " against method " + methodName), throwable); } else if (throwable instanceof TypeException) { typeError("ERROR : Failed to type check rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine() + (methodName == null ? "" : " against method " + methodName), throwable); } else { error("ERROR : Unexpected exception transforming class " + targetClassName + " using rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine() + (methodName == null ? "" : " against method " + methodName), throwable); infoMessage += "# File " + script.getFile() + " line " + script.getLine() + "\n"; infoMessage += rule; rule.compile(); } catch (TypeWarningException te) { typeWarning("WARNING : Unable to type check rule \"" + script.getName() + "\" loaded from " + script.getFile() + " line " + script.getLine() + (methodName == null ? "" : " against method " + methodName), te);
protected void dumpScript(RuleScript ruleScript) { String file = ruleScript.getFile(); int line = ruleScript.getLine(); if (file != null) { Helper.out("# " + file + " line " + line); } Helper.out("RULE " + ruleScript.getName()); if (ruleScript.isInterface()) { Helper.out("INTERFACE " + ruleScript.getTargetClass()); } else { Helper.out("CLASS " + ruleScript.getTargetClass()); } Helper.out("METHOD " + ruleScript.getTargetMethod()); if (ruleScript.getTargetHelper() != null) { Helper.out("HELPER " + ruleScript.getTargetHelper()); } Helper.out(ruleScript.getTargetLocation() + ""); Helper.out(ruleScript.getRuleText()); Helper.out("ENDRULE"); }
protected void dumpScript(RuleScript ruleScript) { String file = ruleScript.getFile(); int line = ruleScript.getLine(); if (file != null) { Helper.out("# " + file + " line " + line); } Helper.out("RULE " + ruleScript.getName()); if (ruleScript.isInterface()) { Helper.out("INTERFACE " + ruleScript.getTargetClass()); } else { Helper.out("CLASS " + ruleScript.getTargetClass()); } Helper.out("METHOD " + ruleScript.getTargetMethod()); if (ruleScript.getTargetHelper() != null) { Helper.out("HELPER " + ruleScript.getTargetHelper()); } Helper.out(ruleScript.getTargetLocation() + ""); Helper.out(ruleScript.getRuleText()); Helper.out("ENDRULE"); }