Package ch.usi.si.seart.treesitter
Class Capture
- java.lang.Object
-
- ch.usi.si.seart.treesitter.Capture
-
public class Capture extends Object
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisable()Disable this capture, preventing it from returning in matches.booleanequals(Object o)QuantifiergetQuantifier(@NotNull Pattern pattern)Get the capture quantifier for a given queryPattern.List<Quantifier>getQuantifiers()Get the capture quantifiers for allQuerypatterns.inthashCode()StringtoString()
-
-
-
Method Detail
-
disable
public void disable()
Disable this capture, preventing it from returning in matches. This will eliminate any resource usage from theQueryassociated with recording the capture.This can not be undone.
-
getQuantifier
public Quantifier getQuantifier(@NotNull @NotNull Pattern pattern)
Get the capture quantifier for a given queryPattern.- Parameters:
pattern- the query pattern- Returns:
- the quantifier
- Throws:
NullPointerException- if pattern isnullIllegalArgumentException- if the pattern is not present in the query- Since:
- 1.12.0
-
getQuantifiers
public List<Quantifier> getQuantifiers()
Get the capture quantifiers for allQuerypatterns. The order of the quantifiers in the returned list corresponds to thePatternorder in the query.- Returns:
- the quantifiers
- Since:
- 1.12.0
-
-