有什么办法可以在运行时更改Java方法的访问修饰符吗?

时间:2018-12-02 19:27:21

标签: java

如何在运行时将修饰符更改为私有而不是公共?

public class modifiableClass {

    public modifiableClass(){   
    }


    /* This method, If i want to change the modifier to be private
     * at runtime.
     */
    public void exampleMethod() {
        //method body
    }

}

0 个答案:

没有答案