读书人

Component.java里的一段代码不知道第

发布时间: 2012-03-14 12:01:12 作者: rapoo

Component.java里的一段代码,不知道第二个方法上的注释是什么意思,求助

Java code
/**     * Determines whether this component is enabled. An enabled component     * can respond to user input and generate events. Components are     * enabled initially by default. A component may be enabled or disabled by     * calling its <code>setEnabled</code> method.     * @return <code>true</code> if the component is enabled,     *          <code>false</code> otherwise     * @see #setEnabled     * @since JDK1.0     */    public boolean isEnabled() {        return isEnabledImpl();    }    /*     * This is called by the native code, so client code can't     * be called on the toolkit thread.     */    final boolean isEnabledImpl() {        return enabled;    }


有谁能解释下这段话 client code指什么 跟toolkit thread又有什么关系?
/*
* This is called by the native code, so client code can't
* be called on the toolkit thread.
*/




[解决办法]
明白了final boolean ,你就明白注释是什么意思了!
[解决办法]
不就是告诉你这个方法是用于本地方法调用的,而不是提供给程序员使用的。
[解决办法]
不就是告诉你这个方法是用于本地方法调用的,而不是提供给程序员使用的。
使这个意思、、、、、这个方法为final的,不能被重写

读书人网 >J2SE开发

热点推荐