Class CtPathImpl

  • All Implemented Interfaces:
    CtPath

    public class CtPathImpl
    extends Object
    implements CtPath
    Default implementation for a CtPath
    • Constructor Detail

      • CtPathImpl

        public CtPathImpl()
    • Method Detail

      • evaluateOn

        public <T extends CtElementList<T> evaluateOn​(CtElement... startNode)
        Description copied from interface: CtPath
        Search for elements matching this CtPatch from start nodes given as parameters.
        Specified by:
        evaluateOn in interface CtPath
      • relativePath

        public CtPath relativePath​(CtElement parent)
        Description copied from interface: CtPath
        Returns the path that is relative to the given element (subpath from it to the end of the path). This is used to have relative paths, instead of absolute path from the root package. For example, "#typeMember[index=2]#body#statement[index=2]#else" is a relative path to the class of absolute path "#subPackage[name=spoon]#subPackage[name=test]#subPackage[name=path]#subPackage[name=testclasses]#containedType[name=Foo]#typeMember[index=2]#body#statement[index=2]#else"
        Specified by:
        relativePath in interface CtPath