Class CtPathBuilder

  • public class CtPathBuilder
    extends java.lang.Object
    This builder allow to create some CtPath.

    Some examples:

    To create a CtPath that match with any method in fr.spoon.Launcher:

     new CtPathBuilder().name("fr").name("spoon").name("Launcher").type("method");
    Created by nicolas on 10/06/2015.
    • Constructor Detail

      • CtPathBuilder

        public CtPathBuilder()
    • Method Detail

      • name

        public CtPathBuilder name​(java.lang.String name,
                                  java.lang.String[]... args)
        Add a name matcher to this path.
        name -
        args -
      • wildcard

        public CtPathBuilder wildcard()
        Add a simple wildcard. Match only on elements child of current one.
      • recursiveWildcard

        public CtPathBuilder recursiveWildcard()
        Add a recursive wildcard. It match on any child and sub-childs.
      • type

        public <T extends CtElementCtPathBuilder type​(java.lang.Class<T> type,
                                                        java.lang.String[]... args)
        Match on element of a given type.
      • role

        public CtPathBuilder role​(CtRole role,
                                  java.lang.String[]... args)
        Match on elements by their role.
        See Also:
      • build

        public CtPath build()
        Build the CtPath