text Metaobject callUnaryMethods

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了text Metaobject callUnaryMethods相关的知识,希望对你有一定的参考价值。

package metaobjectTest

@doc{*
    callUnaryMethods generates code that calls all methods of
    the current prototype whose name matches with the pattern
    that is the annotation parameter. 
*}
object CallUnaryMethods

    func run {
    
        @callUnaryMethods(".*Test")
        assert count == 3;
    }
    
    func oneTest { ++count }
    func twoTest { ++count }
    func threeTest { ++count }
    
    var Int count = 0;
    
end

以上是关于text Metaobject callUnaryMethods的主要内容,如果未能解决你的问题,请参考以下文章

text Metaobject callTestMethods

text Metaobject callRunMethods

text Metaobject类型

text Metaobject正则表达式

text Metaobject范围

text Metaobject annot