Search in sources :

Example 1 with Creation

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;
}
Also used : Creation(lucee.runtime.util.Creation)

Example 2 with Creation

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);
    }
}
Also used : Creation(lucee.runtime.util.Creation) PageContext(lucee.runtime.PageContext) CFMLEngine(lucee.loader.engine.CFMLEngine) File(java.io.File)

Aggregations

Creation (lucee.runtime.util.Creation)2 File (java.io.File)1 CFMLEngine (lucee.loader.engine.CFMLEngine)1 PageContext (lucee.runtime.PageContext)1