public class LineFilter extends TypeFilter<CtStatement>
// lines of a method List<CtStatement> lines = method.getElements(new LineFilter()); // find the parent that is used as a statement (in a block or in a branch) CtStatement parentStatement = element.getParent(new LineFilter());
Constructor and Description |
---|
LineFilter()
Creates the filter.
|
Modifier and Type | Method and Description |
---|---|
boolean |
matches(CtStatement element)
Tells if the given element matches.
|
getType
public boolean matches(CtStatement element)
Filter
matches
in interface Filter<CtStatement>
matches
in class AbstractFilter<CtStatement>
element
- - the element to be checked for a match. Parameter element is never null if Query
is used.Copyright © 2007–2021 Inria. All rights reserved.