Package com.tonic.analysis.query.ast
Class DuringScope
- java.lang.Object
-
- com.tonic.analysis.query.ast.DuringScope
-
-
Constructor Summary
Constructors Constructor Description DuringScope(String methodPattern, boolean isClinit, ClassScope classFilter)Creates a during scope.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Taccept(ScopeVisitor<T> visitor)Dispatches to the visitor hook for this scope variant.ClassScopeclassFilter()static DuringScopeclinitOf(ClassScope classFilter)Creates a scope covering static initializers of the filtered classes.booleanequals(Object o)inthashCode()booleanisClinit()static DuringScopemethod(String methodPattern)Creates a scope covering methods matching a pattern, with no class filter.StringmethodPattern()StringtoString()
-
-
-
Constructor Detail
-
DuringScope
public DuringScope(String methodPattern, boolean isClinit, ClassScope classFilter)
Creates a during scope.- Parameters:
methodPattern- the method name pattern events must occur inisClinit- whether the scope targets static initializersclassFilter- optional class filter, may be null
-
-
Method Detail
-
methodPattern
public String methodPattern()
- Returns:
- the method name pattern
-
isClinit
public boolean isClinit()
- Returns:
- whether the scope targets static initializers
-
classFilter
public ClassScope classFilter()
- Returns:
- the class filter, or null when unrestricted
-
clinitOf
public static DuringScope clinitOf(ClassScope classFilter)
Creates a scope covering static initializers of the filtered classes.- Parameters:
classFilter- the classes whose clinit methods are in scope- Returns:
- the clinit scope
-
method
public static DuringScope method(String methodPattern)
Creates a scope covering methods matching a pattern, with no class filter.- Parameters:
methodPattern- the method name pattern- Returns:
- the method scope
-
accept
public <T> T accept(ScopeVisitor<T> visitor)
Description copied from interface:ScopeDispatches to the visitor hook for this scope variant.
-
-