public class CtPathBuilder extends Object
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 and Description |
---|
CtPathBuilder() |
Modifier and Type | Method and Description |
---|---|
CtPath |
build()
Build the CtPath
|
CtPathBuilder |
name(String name,
String[]... args)
Add a name matcher to this path.
|
CtPathBuilder |
recursiveWildcard()
Add a recursive wildcard.
|
CtPathBuilder |
role(CtRole role,
String[]... args)
Match on elements by their role.
|
<T extends CtElement> |
type(Class<T> type,
String[]... args)
Match on element of a given type.
|
CtPathBuilder |
wildcard()
Add a simple wildcard.
|
public CtPathBuilder name(String name, String[]... args)
name
- args
- public CtPathBuilder wildcard()
public CtPathBuilder recursiveWildcard()
public <T extends CtElement> CtPathBuilder type(Class<T> type, String[]... args)
public CtPathBuilder role(CtRole role, String[]... args)
CtRole
public CtPath build()
Copyright © 2007–2019 Inria. All rights reserved.