docs: @Override
      public boolean hasCapability( String methodName,
                                    Object target,
                                    Object[] arguments ) throws RepositoryException {
          CheckArg.isNotEmpty(methodName, "methodName");
          CheckArg.isNotNull(target, "target");
          checkLive();
  
          if (target instanceof AbstractJcrNode) {
              AbstractJcrNode node = (AbstractJcrNode)target;
              if ("addNode".equals(methodName)) {
                  CheckArg.hasSizeOfAtLeast(arguments, 1, "arguments");
                  CheckArg.hasSizeOfAtMost(arguments, 2, "arguments");
                  CheckArg.isInstanceOf(arguments[0], String.class, "arguments[0]");
  
                  String relPath = (String)arguments[0];
                  String primaryNodeTypeName = null;
                  if (arguments.length > 1) {
                      CheckArg.isInstanceOf(arguments[1], String.class, "arguments[1]");
                      primaryNodeTypeName = (String)arguments[1];
                  }
                  return node.canAddNode(relPath, primaryNodeTypeName);
              }
              // TODO: Should 'hasCapability' support methods other than 'addNode'?
          }
          return true;
      }