Class ArrayLoadHook.Builder
- java.lang.Object
-
- com.tonic.analysis.instrumentation.hook.ArrayLoadHook.Builder
-
- Enclosing class:
- ArrayLoadHook
public static class ArrayLoadHook.Builder extends Object
Fluent builder forArrayLoadHookinstances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArrayLoadHook.BuilderarrayTypeFilter(String arrayTypeFilter)Sets the array element type filter; null instruments all array types.ArrayLoadHookbuild()Builds the configured array load hook.ArrayLoadHook.Builderenabled(boolean enabled)Sets whether the hook is active.ArrayLoadHook.Builderfilters(List<InstrumentationFilter> filters)Sets the filters that restrict which code is instrumented.ArrayLoadHook.BuilderhookDescriptor(HookDescriptor hookDescriptor)Sets the hook method invoked at each instrumented array load.ArrayLoadHook.BuilderpassArray(boolean passArray)Sets whether the array reference is passed to the hook.ArrayLoadHook.BuilderpassIndex(boolean passIndex)Sets whether the array index is passed to the hook.ArrayLoadHook.BuilderpassValue(boolean passValue)Sets whether the loaded value is passed to the hook.ArrayLoadHook.Builderpriority(int priority)Sets the ordering priority relative to other hooks.
-
-
-
Method Detail
-
hookDescriptor
public ArrayLoadHook.Builder hookDescriptor(HookDescriptor hookDescriptor)
Sets the hook method invoked at each instrumented array load.- Parameters:
hookDescriptor- the hook method descriptor- Returns:
- this builder
-
filters
public ArrayLoadHook.Builder filters(List<InstrumentationFilter> filters)
Sets the filters that restrict which code is instrumented.- Parameters:
filters- the instrumentation filters- Returns:
- this builder
-
enabled
public ArrayLoadHook.Builder enabled(boolean enabled)
Sets whether the hook is active.- Parameters:
enabled- true to enable the hook- Returns:
- this builder
-
priority
public ArrayLoadHook.Builder priority(int priority)
Sets the ordering priority relative to other hooks.- Parameters:
priority- the priority value- Returns:
- this builder
-
passArray
public ArrayLoadHook.Builder passArray(boolean passArray)
Sets whether the array reference is passed to the hook.- Parameters:
passArray- true to pass the array reference- Returns:
- this builder
-
passIndex
public ArrayLoadHook.Builder passIndex(boolean passIndex)
Sets whether the array index is passed to the hook.- Parameters:
passIndex- true to pass the index- Returns:
- this builder
-
passValue
public ArrayLoadHook.Builder passValue(boolean passValue)
Sets whether the loaded value is passed to the hook.- Parameters:
passValue- true to pass the loaded value- Returns:
- this builder
-
arrayTypeFilter
public ArrayLoadHook.Builder arrayTypeFilter(String arrayTypeFilter)
Sets the array element type filter; null instruments all array types.- Parameters:
arrayTypeFilter- the array type descriptor to match- Returns:
- this builder
-
build
public ArrayLoadHook build()
Builds the configured array load hook.- Returns:
- the new hook
-
-