/** * Gets a copy of the Java source for the runtime class. The * script must have been compiled before calling this method. * * @param scriptInDocs whether to include the original Jiffle script * in the class javadocs * * @return source for the runtime class * * @throws JiffleException if the script has not been compiled or if errors * occur in creating the runtime source code */ public String getRuntimeSource(boolean scriptInDocs) throws it.geosolutions.jaiext.jiffle.JiffleException { return getRuntimeSource(RuntimeModel.DIRECT, scriptInDocs); }
/** * Gets a copy of the Java source for the runtime class. The * script must have been compiled before calling this method. * * @param scriptInDocs whether to include the original Jiffle script * in the class javadocs * * @return source for the runtime class * * @throws JiffleException if the script has not been compiled or if errors * occur in creating the runtime source code */ public String getRuntimeSource(boolean scriptInDocs) throws it.geosolutions.jaiext.jiffle.JiffleException { return getRuntimeSource(RuntimeModel.DIRECT, scriptInDocs); }
/** * Gets the Java run-time class code generated from the compiled script. * * @return the run-time source code * * @throws JiffleException if the script has not been set yet or if * compilation errors occur */ public String getRuntimeSource() throws JiffleException { if (script == null) { throw new IllegalStateException("Jiffle script has not been set yet"); } Jiffle jiffle = new Jiffle(script, imageParams); return jiffle.getRuntimeSource(Jiffle.RuntimeModel.DIRECT, true); }
/** * Gets the Java run-time class code generated from the compiled script. * * @return the run-time source code * * @throws JiffleException if the script has not been set yet or if * compilation errors occur */ public String getRuntimeSource() throws JiffleException { if (script == null) { throw new IllegalStateException("Jiffle script has not been set yet"); } Jiffle jiffle = new Jiffle(script, imageParams); return jiffle.getRuntimeSource(Jiffle.RuntimeModel.DIRECT, true); }
public void getSourceFromJiffleObject(String script) throws JiffleException { Jiffle jiffle = new Jiffle(); jiffle.setScript(script); // You have to compile the script before getting the runtime // source otherwise an Exception will be thrown jiffle.compile(); // Get the Java source. The boolean argument specifies that we // want the input script copied into the class javadocs String runtimeSource = jiffle.getRuntimeSource(true); } // docs end getSourceFromJiffleObject