use of lucee.runtime.util.Creation in project Lucee by lucee.
the class Arch method sizeOf.
public static Size sizeOf(Object obj) throws PageException {
Creation creator = CFMLEngineFactory.getInstance().getCreationUtil();
Size size = new Size(0, 0);
sizeOf(creator, size, obj, new HashSet<Object>());
return size;
}
use of lucee.runtime.util.Creation in project Lucee by lucee.
the class DevNullOutputStream method _invoke.
private Object _invoke(final String methodName, final Object[] args, HttpServletRequest req, HttpServletResponse rsp, OutputStream out) throws PageException {
final CFMLEngine engine = CFMLEngineFactory.getInstance();
final Creation creator = engine.getCreationUtil();
final PageContext originalPC = engine.getThreadPageContext();
// no OutputStream
if (out == null)
out = DevNullOutputStream.DEV_NULL_OUTPUT_STREAM;
// no Request
if (req == null)
// TODO new File
req = creator.createHttpServletRequest(new File("."), "Lucee", "/", "", null, null, null, null, null);
// noRespone
if (rsp == null)
rsp = creator.createHttpServletResponse(out);
final PageContext pc = creator.createPageContext(req, rsp, out);
try {
engine.registerThreadPageContext(pc);
initCFC(pc);
return cfc.call(pc, methodName, args);
} finally {
if (autoFlush)
try {
pc.getRootWriter().flush();
} catch (final Throwable t) {
}
engine.registerThreadPageContext(originalPC);
}
}
Aggregations