// resolveRpcInputClass() check.While RpcMethodInvoker counts with one argument for
// non input type and two arguments for input type, resolveRpcInputClass() counting
// with zero for non input and one for input type
- && possibleMethod.getParameterTypes().length <= 2;
+ && possibleMethod.getParameterCount() <= 2;
}
/**
*/
public static boolean isNotificationCallback(final Method method) {
checkArgument(method != null);
- if (method.getName().startsWith("on") && method.getParameterTypes().length == 1) {
+ if (method.getName().startsWith("on") && method.getParameterCount() == 1) {
Class<?> potentialNotification = method.getParameterTypes()[0];
if (isNotification(potentialNotification)
&& method.getName().equals("on" + potentialNotification.getSimpleName())) {
private static Optional<Class<? extends DataContainer>> getYangModeledReturnType(final Method method,
final String prefix) {
final String methodName = method.getName();
- if ("getClass".equals(methodName) || !methodName.startsWith(prefix) || method.getParameterTypes().length > 0) {
+ if ("getClass".equals(methodName) || !methodName.startsWith(prefix) || method.getParameterCount() > 0) {
return Optional.empty();
}