在 Haxe 编程语言中,是否可以在方法定义中检测目标语言,如此处所示?
class Test {
static function main() {
trace("Hello World !");
#if java
trace("This is compiled to Java");
#elseif js
trace("This is compiled to Javascript");
}
}