... Unsupported parameter 参数错误 Unsupported signature method 签名方法错误 Missing required parameter 参数丢失 ...
基于1个网页-相关网页
你会在第二个方法处得到一个编译错误,因为这两个方法在类型消除后拥有一样的签名。
You'll get a compilation error on the second method because the two methods will have an identical signature after type erasure.
可以抛出您需要的任何类型的异常(已检查、运行时或错误),只要方法签名支持它即可。
You can throw any kind of exception you like - checked, runtime, or error - as long as the method signature supports it.
这种方法的缺点在于签名录入的错误或含糊不清可能会导致没有征兆的故障,这也就意味着代码可以编译,但在运行时无法正确完成操作。
The downside of this approach is the possibility that a typo or slight ambiguity in the signature will silently fail, which means the code will compile but "do the wrong thing" at runtime.
应用推荐