Package spoon.reflect.path
Class CtPathBuilder
java.lang.Object
spoon.reflect.path.CtPathBuilder
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 Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Build the CtPathAdd a name matcher to this path.Add a recursive wildcard.Match on elements by their role.<T extends CtElement>
CtPathBuilderMatch on element of a given type.wildcard()
Add a simple wildcard.
-
Constructor Details
-
CtPathBuilder
public CtPathBuilder()
-
-
Method Details
-
name
Add a name matcher to this path.- Parameters:
name
-args
-- Returns:
-
wildcard
Add a simple wildcard. Match only on elements child of current one. -
recursiveWildcard
Add a recursive wildcard. It match on any child and sub-childs. -
type
Match on element of a given type. -
role
Match on elements by their role.- See Also:
CtRole
-
build
Build the CtPath
-