public static ReferencePath detach(final Path path) {
        return path instanceof ReferencePath ? (ReferencePath) path : new ReferencePath(path);
    }
@author Marko A. Rodriguez (http://markorodriguez.com)
gremlin-core/src/main/java/org/apache/tinkerpop/gremlin/structure/util/reference/ReferenceFactory.java