Class Instrumenter.ArrayStoreHookBuilder
- java.lang.Object
-
- com.tonic.analysis.instrumentation.Instrumenter.ArrayStoreHookBuilder
-
- Enclosing class:
- Instrumenter
public static class Instrumenter.ArrayStoreHookBuilder extends Object
Fluent builder for an array store hook.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instrumenter.ArrayStoreHookBuilderallowModification()Lets the hook replace the stored value.Instrumenter.ArrayStoreHookBuildercallStatic(String owner, String name, String descriptor)Sets the static method the hook dispatches to.Instrumenter.ArrayStoreHookBuilderforArrayType(String typeDescriptor)Restricts this hook to arrays of one type.Instrumenter.ArrayStoreHookBuilderforIntArrays()Restricts this hook to int array stores.Instrumenter.ArrayStoreHookBuilderforObjectArrays()Restricts this hook to Object array stores.Instrumenter.ArrayStoreHookBuilderinClass(String className)Restricts this hook to a single class.Instrumenter.ArrayStoreHookBuilderinMethod(String methodPattern)Restricts this hook to methods whose name matches a pattern.Instrumenter.ArrayStoreHookBuilderinPackage(String packagePrefix)Restricts this hook to classes under a package.Instrumenter.ArrayStoreHookBuilderpriority(int priority)Sets the ordering priority of this hook against others at the same site.Instrumenterregister()Attaches the collected filters and registers the hook.Instrumenter.ArrayStoreHookBuilderwithAll()Passes the array, index, and value as hook arguments.Instrumenter.ArrayStoreHookBuilderwithArray()Passes the target array as a hook argument.Instrumenter.ArrayStoreHookBuilderwithIndex()Passes the store index as a hook argument.Instrumenter.ArrayStoreHookBuilderwithValue()Passes the stored value as a hook argument.
-
-
-
Method Detail
-
inClass
public Instrumenter.ArrayStoreHookBuilder inClass(String className)
Restricts this hook to a single class.- Parameters:
className- the internal class name- Returns:
- this builder
-
inPackage
public Instrumenter.ArrayStoreHookBuilder inPackage(String packagePrefix)
Restricts this hook to classes under a package.- Parameters:
packagePrefix- the internal package name prefix- Returns:
- this builder
-
inMethod
public Instrumenter.ArrayStoreHookBuilder inMethod(String methodPattern)
Restricts this hook to methods whose name matches a pattern.- Parameters:
methodPattern- the method name pattern- Returns:
- this builder
-
forArrayType
public Instrumenter.ArrayStoreHookBuilder forArrayType(String typeDescriptor)
Restricts this hook to arrays of one type.- Parameters:
typeDescriptor- the array type descriptor- Returns:
- this builder
-
forObjectArrays
public Instrumenter.ArrayStoreHookBuilder forObjectArrays()
Restricts this hook to Object array stores.- Returns:
- this builder
-
forIntArrays
public Instrumenter.ArrayStoreHookBuilder forIntArrays()
Restricts this hook to int array stores.- Returns:
- this builder
-
callStatic
public Instrumenter.ArrayStoreHookBuilder callStatic(String owner, String name, String descriptor)
Sets the static method the hook dispatches to.- Parameters:
owner- internal name of the class declaring the hook methodname- the hook method namedescriptor- the hook method descriptor- Returns:
- this builder
-
withArray
public Instrumenter.ArrayStoreHookBuilder withArray()
Passes the target array as a hook argument.- Returns:
- this builder
-
withIndex
public Instrumenter.ArrayStoreHookBuilder withIndex()
Passes the store index as a hook argument.- Returns:
- this builder
-
withValue
public Instrumenter.ArrayStoreHookBuilder withValue()
Passes the stored value as a hook argument.- Returns:
- this builder
-
withAll
public Instrumenter.ArrayStoreHookBuilder withAll()
Passes the array, index, and value as hook arguments.- Returns:
- this builder
-
allowModification
public Instrumenter.ArrayStoreHookBuilder allowModification()
Lets the hook replace the stored value.- Returns:
- this builder
-
priority
public Instrumenter.ArrayStoreHookBuilder priority(int priority)
Sets the ordering priority of this hook against others at the same site.- Parameters:
priority- the priority value- Returns:
- this builder
-
register
public Instrumenter register()
Attaches the collected filters and registers the hook.- Returns:
- the instrumenter this builder came from
-
-