Files
jpexs-decompiler/libsrc/ffdec_lib/testdata/run_as3/Run.as
2015-11-09 13:58:20 +01:00

57 lines
950 B
ActionScript

package
{
public class Run
{
public static function run():*
{
return new Run().runInstance();
}
public function runInstance():*
{
return "Test" + executeMethod("testInstance") + executeStaticMethod("testStatic");
}
public function executeMethod(methodName:String):String
{
try
{
var result = this[methodName]();
return methodName + "_Result:" + result + " Type:" + typeof(result) + "\n";
}
catch (ex)
{
return methodName + "_Error:" + ex + "\n";
}
return null;
}
public static function executeStaticMethod(methodName:String):String
{
try
{
var result = Run[methodName]();
return "Result:" + result + " Type:" + typeof(result) + "\n";
}
catch (ex)
{
return "Error:" + ex + "\n";
}
return null;
}
public function testInstance()
{
return "testInstance";
}
public static function testStatic()
{
return "testStatic";
}
}
}