Skip to content

Instantly share code, notes, and snippets.

@sonygod
Created March 9, 2013 02:14
Show Gist options
  • Save sonygod/5122189 to your computer and use it in GitHub Desktop.
Save sonygod/5122189 to your computer and use it in GitHub Desktop.
index for function
package ;
//import js.Lib;
using Reflect;
/**
* ... AMF READ OR WRITE EXAMPE
* @author sonygod
*/
class Main {
static function main() {
var m = haxe.rtti.Meta.getFields(Test);
for (k in m.fields()) {
for (kk in m.field(k).fields()) {
trace(k + ":" + kk + "=" + m.field(k).field(kk)[0]); }
}
}
}
class Test {
public function new() {
}
@index("f1") @:keep
public function say(a:Int, b:String):String {
return b + "age=" + a;
}
@index("f2") @:keep
public function say2(a:Int, b:String):String {
return b + "age2=" + a;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment