Skip to content

Instantly share code, notes, and snippets.

@danwatt
Created August 15, 2011 16:20
Show Gist options
  • Save danwatt/1147101 to your computer and use it in GitHub Desktop.
Save danwatt/1147101 to your computer and use it in GitHub Desktop.
ScriptComponentDecompiled
// Decompiled by Jad v1.5.8g. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.kpdus.com/jad.html
// Decompiler options: packimports(3)
// Source File Name: C:\webdev\tomcat\code\lampo.cfmain\webapps\ROOT\scriptComponent.cfc
import coldfusion.runtime.*;
import java.util.Map;
import javax.servlet.jsp.JspContext;
public final class cfscriptComponent2ecfc1131169586 extends CFComponent {
public cfscriptComponent2ecfc1131169586() {
super.hasPseudoConstructor = false;
}
public final Map _getImplicitMethods() {
return _implicitMethods;
}
public final void registerUDFs() {
registerUDF("DOSTUFF", doStuff);
}
public final void _setImplicitMethods(Map implicitMethods) {
_implicitMethods = implicitMethods;
}
public final Object getMetadata() {
return metaData;
}
protected final Object runPage() {
javax.servlet.jsp.JspWriter out = super.pageContext.getOut();
javax.servlet.jsp.tagext.Tag parent = super.parent;
bindImportPath("com.adobe.coldfusion.*");
return null;
}
private static final UDFMethod doStuff = new funcDOSTUFF();
public static final Object metaData;
private static Map _implicitMethods;
{
metaData = new AttributeCollection(new Object[] { "Name", "scriptComponent", "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._structSetAt("LOCAL", new String[] { "I" }, "1");
/* Notice that the for loop is compiled differently */
for (; (-(CfJspPage._compare(parentPage._resolveAndAutoscalarize("LOCAL", new String[] { "I" }),
parentPage._resolveAndAutoscalarize(ARGUMENTS, new String[] { "ITERATIONS" })) != 0.0D) >>> 31 ^ 1) != 0;
Cast._double(parentPage._resolveAndAutoscalarize("LOCAL", new String[] { "I" }, 234))) {
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._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" }))));
}
return null;
}
protected final String getName() {
return "doStuff";
}
public final String getReturnType() {
return "void";
}
public final int getAccess() {
return 0;
}
public final Object getMetadata() {
return metaData;
}
static final Object metaData = new AttributeCollection(new Object[] { "name", "doStuff", "access", "public", "returntype", "void", "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