use of lucee.runtime.dump.SimpleDumpData in project Lucee by lucee.
the class IncludeCacheItem method toDumpData.
@Override
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties properties) {
DumpTable table = new DumpTable("#669999", "#ccffff", "#000000");
table.setTitle("IncludeCacheEntry");
table.appendRow(1, new SimpleDumpData("Output"), DumpUtil.toDumpData(new SimpleDumpData(output), pageContext, maxlevel, properties));
if (path != null)
table.appendRow(1, new SimpleDumpData("Path"), DumpUtil.toDumpData(new SimpleDumpData(path), pageContext, maxlevel, properties));
return table;
}
use of lucee.runtime.dump.SimpleDumpData in project Lucee by lucee.
the class UDFCacheItem method toDumpData.
@Override
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties properties) {
DumpTable table = new DumpTable("#669999", "#ccffff", "#000000");
table.setTitle("UDFCacheEntry");
table.appendRow(1, new SimpleDumpData("Return Value"), DumpUtil.toDumpData(returnValue, pageContext, maxlevel, properties));
table.appendRow(1, new SimpleDumpData("Output"), DumpUtil.toDumpData(new SimpleDumpData(output), pageContext, maxlevel, properties));
return table;
}
use of lucee.runtime.dump.SimpleDumpData in project Lucee by lucee.
the class WebserviceCacheItem method toDumpData.
@Override
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties properties) {
DumpTable table = new DumpTable("#669999", "#ccffff", "#000000");
table.setTitle("WebserviceCacheEntry");
table.appendRow(1, new SimpleDumpData("URL"), DumpUtil.toDumpData(new SimpleDumpData(url), pageContext, maxlevel, properties));
table.appendRow(1, new SimpleDumpData("Method Name"), DumpUtil.toDumpData(new SimpleDumpData(methodName), pageContext, maxlevel, properties));
return table;
}
use of lucee.runtime.dump.SimpleDumpData in project Lucee by lucee.
the class COMObject method toDumpData.
@Override
public DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp) {
DumpTable table = new DumpTable("com", "#ff3300", "#ff9966", "#660000");
table.appendRow(1, new SimpleDumpData("COM Object"), new SimpleDumpData(name));
return table;
}
use of lucee.runtime.dump.SimpleDumpData in project Lucee by lucee.
the class UDFUtil method toDumpData.
public static DumpData toDumpData(PageContext pageContext, int maxlevel, DumpProperties dp, UDF udf, short type) {
if (!dp.getShowUDFs()) {
if (TYPE_UDF == type)
return new SimpleDumpData("<UDF>");
if (TYPE_BIF == type)
return new SimpleDumpData("<BIF>");
if (TYPE_CLOSURE == type)
return new SimpleDumpData("<Closure>");
if (TYPE_LAMBDA == type)
return new SimpleDumpData("<Lambda>");
}
// arguments
FunctionArgument[] args = udf.getFunctionArguments();
DumpTable atts;
if (TYPE_UDF == type)
atts = new DumpTable("udf", "#ca5095", "#e9accc", "#000000");
else if (TYPE_CLOSURE == type)
atts = new DumpTable("udf", "#9cb770", "#c7e1ba", "#000000");
else if (TYPE_BIF == type)
atts = new DumpTable("udf", "#e1c039", "#f1e2a3", "#000000");
else
atts = new DumpTable("udf", "#f3d5bd", "#f6e4cc", "#000000");
atts.appendRow(new DumpRow(63, new DumpData[] { new SimpleDumpData("label"), new SimpleDumpData("name"), new SimpleDumpData("required"), new SimpleDumpData("type"), new SimpleDumpData("default"), new SimpleDumpData("hint") }));
for (int i = 0; i < args.length; i++) {
FunctionArgument arg = args[i];
DumpData def;
try {
Object oa = udf.getDefaultValue(pageContext, i, null);
if (oa == null)
oa = "null";
def = new SimpleDumpData(Caster.toString(oa));
} catch (PageException e) {
def = new SimpleDumpData("");
}
atts.appendRow(new DumpRow(0, new DumpData[] { new SimpleDumpData(arg.getDisplayName()), new SimpleDumpData(arg.getName().getString()), new SimpleDumpData(arg.isRequired()), new SimpleDumpData(arg.getTypeAsString()), def, new SimpleDumpData(arg.getHint()) }));
// atts.setRow(0,arg.getHint());
}
DumpTable func;
String label = udf.getDisplayName();
if (TYPE_CLOSURE == type) {
func = new DumpTable("#9cb770", "#c7e1ba", "#000000");
func.setTitle(StringUtil.isEmpty(label) ? "Closure" : "Closure " + label);
} else if (TYPE_UDF == type) {
func = new DumpTable("#ca5095", "#e9accc", "#000000");
String f = "Function ";
try {
f = StringUtil.ucFirst(ComponentUtil.toStringAccess(udf.getAccess()).toLowerCase()) + " " + f;
} catch (ApplicationException e) {
}
f += udf.getFunctionName();
if (udf instanceof UDFGSProperty)
f += " (generated)";
func.setTitle(f);
} else if (TYPE_BIF == type) {
String f = "Build in Function " + (!StringUtil.isEmpty(label) ? label : udf.getFunctionName());
func = new DumpTable("#e1c039", "#f1e2a3", "#000000");
func.setTitle(f);
} else {
func = new DumpTable("#f3d5bd", "#f6e4cc", "#000000");
func.setTitle(StringUtil.isEmpty(label) ? "Lambda" : "Lambda " + label);
}
// Source
String src = udf.getSource();
if (!StringUtil.isEmpty(src))
func.setComment("source:" + src);
String hint = udf.getHint();
String desc = udf.getDescription();
if (!StringUtil.isEmpty(desc))
addComment(func, desc);
if (!StringUtil.isEmpty(hint))
addComment(func, hint);
if (Component.MODIFIER_NONE != udf.getModifier())
func.appendRow(1, new SimpleDumpData("modifier"), new SimpleDumpData(ComponentUtil.toModifier(udf.getModifier(), "")));
func.appendRow(1, new SimpleDumpData("arguments"), atts);
func.appendRow(1, new SimpleDumpData("return type"), new SimpleDumpData(udf.getReturnTypeAsString()));
return func;
}
Aggregations