Java接口说明

一些通用的逻辑可以放到公共库中,提高代码质量

package fx.custom.apl.example.library;

import com.fxiaoke.functions.client.DebugHelper;

import static com.fxiaoke.functions.Fx.log;

/**
 * @type classes
 * @returntype
 * @namespace library
 */
public class LibraryImpl {

    private String name;

    // 实例方法调用得先实例化对象
    // 可以使用Xxx obj = Fx.klass.newInstance('Xxx__c') as Xxx
    String getName() {
        return this.name;
    }

    void setName(String name) {
        this.name = name;
    }

    //对外提供的方法
    public static String action() {
        return "sucesss";
    }

    /**
     * 函数的调试方法
     */
    public static void main(String[] args) {
        DebugHelper helper = new DebugHelper();
        helper.init();
        log.info(action());
    }
}


2024-08-16
0 0