code: static boolean isServerOrHostController(ImmutableManagementResourceRegistration resourceRegistration) {
          return resourceRegistration.getProcessType().isServer() || !ModelDescriptionConstants.PROFILE.equals(resourceRegistration.getPathAddress().getElement(0).getKey());
      }
docs: Gets whether the given {@code resourceRegistration} is for a server, or if not,
  is not for a resource in the {@code profile} resource tree.