Skip to content

Instantly share code, notes, and snippets.

@danwatt
Created August 15, 2011 16:18
Show Gist options
  • Save danwatt/1147094 to your computer and use it in GitHub Desktop.
Save danwatt/1147094 to your computer and use it in GitHub Desktop.
MarkupComponentDecompiled.java
import coldfusion.runtime.*;
import coldfusion.tagext.GenericTag;
import coldfusion.tagext.lang.ProcessingDirectiveTag;
import java.util.Map;
import javax.servlet.jsp.JspContext;
import javax.servlet.jsp.tagext.TagSupport;
public final class cfmarkupComponent2ecfc1581765262 extends CFComponent {
public cfmarkupComponent2ecfc1581765262() {
}
public final Map _getImplicitMethods() {
return _implicitMethods;
}
public final void registerUDFs() {
registerUDF("DOSTUFF", doStuff);
}
public final void _setImplicitMethods(Map implicitMethods) {
_implicitMethods = implicitMethods;
}
public final String getOutput() {
return "false";
}
public final Object getMetadata() {
return metaData;
}
protected final Object runPage()
{
javax.servlet.jsp.JspWriter out;
ProcessingDirectiveTag processingdirective0;
out = super.pageContext.getOut();
javax.servlet.jsp.tagext.Tag parent = super.parent;
bindImportPath("com.adobe.coldfusion.*");
processingdirective0 = (ProcessingDirectiveTag)_initTag(class$coldfusion$tagext$lang$ProcessingDirectiveTag, 0, parent);
_setCurrentLineNo(-1);
processingdirective0.setSuppresswhitespace(CfJspPage._validateTagAttrValue("cfprocessingdirective", "suppresswhitespace", Cast._boolean("true"), null));
processingdirective0.hasEndTag(true);
int mode0;
if((mode0 = processingdirective0.doStartTag()) != 0)
do
{
_whitespace(out, "\r\n\t");
_whitespace(out, "\r\n");
} while(processingdirective0.doAfterBody() != 0);
if(processingdirective0.doEndTag() != 5) goto _L2; else goto _L1
_L1:
Object t6 = null;
return t6;
_L2:
goto _L3
Throwable t7;
t7;
processingdirective0.doCatch(t7);
goto _L3
Throwable t8;
t8;
goto _L4
_L5:
throw t8;
_L4:
processingdirective0.doFinally();
if(true) goto _L5; else goto _L3
_L3:
_whitespace(out, "\r\n");
return null;
}
static final Class class$coldfusion$tagext$lang$ProcessingDirectiveTag = Class.forName("coldfusion.tagext.lang.ProcessingDirectiveTag");
private static final UDFMethod doStuff = new funcDOSTUFF();
public static final Object metaData;
private static Map _implicitMethods;
{
metaData = new AttributeCollection(new Object[] { "output", "false", "Name", "markupComponent", "Functions", new Object[] { funcDOSTUFF.metaData } });
}
private class funcDOSTUFF extends UDFMethod {
protected final String[] getParamList() {
return (new String[] { "ITERATIONS" });
}
//--------------REAL MEAT HERE --------------
protected final Object runFunction(LocalScope __localScope, Object instance, CFPage parentPage, ArgumentCollection __arguments) {
parentPage.bindImportPath("com.adobe.coldfusion.*");
Variable ARGUMENTS = __localScope.bindInternal(Key.ARGUMENTS, __arguments);
Variable THIS = __localScope.bindInternal(Key.THIS, instance);
javax.servlet.jsp.JspWriter out = ((CfJspPage) (parentPage)).pageContext.getOut();
javax.servlet.jsp.tagext.Tag parent = ((CfJspPage) (parentPage)).parent;
Variable ITERATIONS = _validateArg("ITERATIONS", true, "numeric", __arguments.getVariable(0));
parentPage._whitespace(out, "\r\n\t\t");
double t11 = 1.0D;
double t13 = Cast._double(parentPage._resolveAndAutoscalarize(ARGUMENTS, new String[] { "ITERATIONS" }));
double t15 = Cast._double("1");
Object value = Cast._Object(t15);
parentPage.SetVariable("local.i", value);
for (; CfJspPage._checkCondition(t11, t15, t13); CfJspPage.checkRequestTimeout("CFLOOP")) {
parentPage._whitespace(out, "\r\n\t\t\t");
Variable ___IMPLICITARRYSTRUCTVAR0 = __localScope.bindInternal("___IMPLICITARRYSTRUCTVAR0");
___IMPLICITARRYSTRUCTVAR0.set(CFPage.StructNew());
parentPage._structSetAt(___IMPLICITARRYSTRUCTVAR0, new String[] { "A" }, "1");
parentPage._structSetAt(___IMPLICITARRYSTRUCTVAR0, new String[] { "B" }, parentPage._resolveAndAutoscalarize("LOCAL", new String[] { "I" }));
parentPage._structSetAt("LOCAL", new String[] { "MYSTRUCT" }, parentPage._get(___IMPLICITARRYSTRUCTVAR0));
parentPage._whitespace(out, "\r\n\t\t\t");
parentPage._structSetAt(
"LOCAL",
new String[] { "MYSTRUCT", "C" },
Cast._Object(Cast._double(parentPage._resolveAndAutoscalarize("LOCAL", new String[] { "MYSTRUCT", "A" }))
* Cast._double(parentPage._resolveAndAutoscalarize("LOCAL", new String[] { "MYSTRUCT", "B" }))));
parentPage._whitespace(out, "\r\n\t\t");
value = Cast._Object(t15 += t11);
parentPage.SetVariable("local.i", value);
}
parentPage._whitespace(out, "\r\n\t");
return null;
}
protected final String getName() {
return "doStuff";
}
public final String getReturnType() {
return "void";
}
public final int getAccess() {
return 0;
}
public final String getOutput() {
return "false";
}
public final Object getMetadata() {
return metaData;
}
static final Object metaData = new AttributeCollection(new Object[] { "access", "public", "name", "doStuff", "returntype", "void", "output", "false",
"Parameters", new Object[] { new AttributeCollection(new Object[] { "NAME", "iterations", "TYPE", "numeric", "REQUIRED", "true" }) } });
public funcDOSTUFF() {
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment