Method “xxx” with signature “xxx” is not applicable on this object
来源:互联网 发布:剑灵客户端优化 编辑:程序博客网 时间:2024/06/07 17:07
Method “xxx” with signature “xxx” is not applicable on this object
Running into a problem with message “Method ‘xx’ with signature ‘xx’is not applicable on this object”, still trying to figure it out.
Fixed.
In the Original code, there are three classes and Class A extends Class C, Class B extends Class C.
There are two methods in another class.
public void example1(C c)
{
example2(c);
}
private void example2(C c)
{
}
Because in the example1 method, the parameter c is a instance of A,when calls method example2, the method example2 with signature C is notapplicable on this object.
The code after my fix:
public void example1(C c)
{
if(c instances A)
example2((A)c);
}else if (C instances B)
{
example3((B)c);
}
//Changed the parameter from C to A
private void example2(A a)
{
}
///added another method example3 with the parameter B
private void example3(B b)
{
}
来自我的小站 www.threes.cn
- Method “xxx” with signature “xxx” is not applicable on this object
- [真理永垂不朽]The method XXX in the type FragmentTransaction is not applicable for the arguments XXX
- plugin “XXX”is incompatible with this installation
- Trafodion Troubleshooting-Region xxx is not online on xxx
- Access restriction: The method XXX from the type XXX is not accessible due to restriction XXX
- UnsupportedWheel: matplotlib.xxx.whl is not a supported wheel on this platform解决方案
- Debug/XXX.pch' is not a precompiled header file created with this compiler
- \'Debug/XXX.pch\' is not a precompiled header file created with this compiler Error
- MFC出现XXX is not a precompiled header file created with this compiler
- Host ''xxx.xx.xxx.xxx'' is not allowed to connect to this MySQL server
- host'xx.xxx.xxx.xxx' is not allowed to connect to this mysql server
- An App ID with Identifier 'XXX.XXX.XXX’ is not available. Please enter a different string
- 连接MySQL数据库报 "Host XXX.XXX.XXX.XXX is not allowed to connect to this MySQL server " 解决办法。
- mysql 远程连接--Host'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL server
- 主机连接虚拟机MySQL报错:Host 'xxx.xxx.xxx.xxx' is not allowed to connect to this MySQL server
- Messages:This method: edit for action XXX is not allowed!-Struts2.5动态方法调用错误解决方法
- xxx is not maped
- host XXX is not allowed to connect to this MariaDB
- Java性能 (1) - Java Programming Guidelines
- 手工添加服务
- Java性能(2) 调整你的JSP和Servlet
- Field.Text AND Field.Keyword in Lucene
- struts2 tablib
- Method “xxx” with signature “xxx” is not applicable on this object
- Some thought about current project
- ANT stop Weblogic
- Ant启动weblogic
- 如何用ANT脚本安装weblogic
- Linux Ubuntu设置Java环境变量
- 程序员是干什么的
- Subversion的备份
- VC++6.0调试篇:定位临界区(critical section)导致的死锁