code: public static AliasOperationTransformer replaceLastElement(final PathElement element) {
          return create(new AddressTransformer() {
              @Override
              public PathAddress transformAddress(final PathAddress original) {
                  final PathAddress address = original.subAddress(0, original.size() -1);
                  return address.append(element);
              }
          });
      }
docs: Replace the last element of an address with a static path element.
  
  @param element the path element
  @return the operation address transformer