Class Instrumenter.ArrayLoadHookBuilder
- java.lang.Object
-
- com.tonic.analysis.instrumentation.Instrumenter.ArrayLoadHookBuilder
-
- Enclosing class:
- Instrumenter
public static class Instrumenter.ArrayLoadHookBuilder extends Object
Fluent builder for an array load hook.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Instrumenter.ArrayLoadHookBuildercallStatic(String owner, String name, String descriptor)Sets the static method the hook dispatches to.Instrumenter.ArrayLoadHookBuilderforArrayType(String typeDescriptor)Restricts this hook to arrays of one type.Instrumenter.ArrayLoadHookBuilderinClass(String className)Restricts this hook to a single class.Instrumenter.ArrayLoadHookBuilderinPackage(String packagePrefix)Restricts this hook to classes under a package.Instrumenter.ArrayLoadHookBuilderpriority(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.ArrayLoadHookBuilderwithArray()Passes the source array as a hook argument.Instrumenter.ArrayLoadHookBuilderwithIndex()Passes the load index as a hook argument.Instrumenter.ArrayLoadHookBuilderwithValue()Passes the loaded value as a hook argument.
-
-
-
Method Detail
-
inClass
public Instrumenter.ArrayLoadHookBuilder inClass(String className)
Restricts this hook to a single class.- Parameters:
className- the internal class name- Returns:
- this builder
-
inPackage
public Instrumenter.ArrayLoadHookBuilder inPackage(String packagePrefix)
Restricts this hook to classes under a package.- Parameters:
packagePrefix- the internal package name prefix- Returns:
- this builder
-
forArrayType
public Instrumenter.ArrayLoadHookBuilder forArrayType(String typeDescriptor)
Restricts this hook to arrays of one type.- Parameters:
typeDescriptor- the array type descriptor- Returns:
- this builder
-
callStatic
public Instrumenter.ArrayLoadHookBuilder 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.ArrayLoadHookBuilder withArray()
Passes the source array as a hook argument.- Returns:
- this builder
-
withIndex
public Instrumenter.ArrayLoadHookBuilder withIndex()
Passes the load index as a hook argument.- Returns:
- this builder
-
withValue
public Instrumenter.ArrayLoadHookBuilder withValue()
Passes the loaded value as a hook argument.- Returns:
- this builder
-
priority
public Instrumenter.ArrayLoadHookBuilder 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
-
-