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 ) ; } } ) ; }
Replace the last element of an address with a static path element .