@Test public void testCreateBshMethod() throws Throwable { BSHMethod result = BSHMethod.createBshMethod(null); assertNull(result, "result"); }
public static BSHMethod createBshMethod(Element e) throws IOException { if (e == null) { return null; } String file = QFactory.getAttributeValue(e, "file"); String bsh; if (file != null) { boolean cache = false; String cacheAtt = QFactory.getAttributeValue(e, "cache"); if (cacheAtt != null) { cache = cacheAtt.equalsIgnoreCase("true"); } if (!cache) { return new BSHMethod(file, true); } else { bsh = ""; FileReader f = new FileReader(file); int c; while ( (c = f.read()) != -1) { bsh += (char) c; } f.close(); return new BSHMethod(bsh, false); } } else { bsh = e.getTextTrim(); if (bsh == null || bsh.equals("")) { return null; } return new BSHMethod(bsh, false); } }
BSHMethod { public static BSHMethod createBshMethod(Element e) throws IOException { if (e == null) { return null; } String file = QFactory.getAttributeValue(e, "file"); String bsh; if (file != null) { boolean cache = false; String cacheAtt = QFactory.getAttributeValue(e, "cache"); if (cacheAtt != null) { cache = cacheAtt.equalsIgnoreCase("true"); } if (!cache) { return new BSHMethod(file, true); } else { bsh = ""; FileReader f = new FileReader(file); int c; while ( (c = f.read()) != -1) { bsh += (char) c; } f.close(); return new BSHMethod(bsh, false); } } else { bsh = e.getTextTrim(); if (bsh == null || bsh.equals("")) { return null; } return new BSHMethod(bsh, false); } } }
BSHMethod { public static BSHMethod createBshMethod(Element e) throws IOException { if (e == null) { return null; } String file = QFactory.getAttributeValue(e, "file"); String bsh; if (file != null) { boolean cache = false; String cacheAtt = QFactory.getAttributeValue(e, "cache"); if (cacheAtt != null) { cache = cacheAtt.equalsIgnoreCase("true"); } if (!cache) { return new BSHMethod(file, true); } else { bsh = ""; FileReader f = new FileReader(file); int c; while ( (c = f.read()) != -1) { bsh += (char) c; } f.close(); return new BSHMethod(bsh, false); } } else { bsh = e.getTextTrim(); if (bsh == null || bsh.equals("")) { return null; } return new BSHMethod(bsh, false); } } BSHMethod(String bshData, boolean source); }
BSHMethod { public static BSHMethod createBshMethod(Element e) throws IOException { if (e == null) { return null; } String file = QFactory.getAttributeValue(e, "file"); String bsh; if (file != null) { boolean cache = false; String cacheAtt = QFactory.getAttributeValue(e, "cache"); if (cacheAtt != null) { cache = cacheAtt.equalsIgnoreCase("true"); } if (!cache) { return new BSHMethod(file, true); } else { bsh = ""; FileReader f = new FileReader(file); int c; while ( (c = f.read()) != -1) { bsh += (char) c; } f.close(); return new BSHMethod(bsh, false); } } else { bsh = e.getTextTrim(); if (bsh == null || bsh.equals("")) { return null; } return new BSHMethod(bsh, false); } } BSHMethod(String bshData, boolean source); static BSHMethod createBshMethod(Element e); Object execute(Map arguments, String resultName); Map execute(Map arguments, Collection returnNames); String toString(); }
BSHMethod { public static BSHMethod createBshMethod(Element e) throws IOException { if (e == null) { return null; } String file = QFactory.getAttributeValue(e, "file"); String bsh; if (file != null) { boolean cache = false; String cacheAtt = QFactory.getAttributeValue(e, "cache"); if (cacheAtt != null) { cache = cacheAtt.equalsIgnoreCase("true"); } if (!cache) { return new BSHMethod(file, true); } else { bsh = ""; FileReader f = new FileReader(file); int c; while ( (c = f.read()) != -1) { bsh += (char) c; } f.close(); return new BSHMethod(bsh, false); } } else { bsh = e.getTextTrim(); if (bsh == null || bsh.equals("")) { return null; } return new BSHMethod(bsh, false); } } BSHMethod(String bshData, boolean source); static BSHMethod createBshMethod(Element e); Object execute(Map arguments, String resultName); Map execute(Map arguments, Collection returnNames); String toString();  }