Class ArrayStoreHook
- java.lang.Object
-
- com.tonic.analysis.instrumentation.hook.ArrayStoreHook
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classArrayStoreHook.BuilderFluent builder forArrayStoreHookinstances.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ArrayStoreHook.Builderbuilder()Creates a builder for an array store hook.StringgetArrayTypeFilter()List<InstrumentationFilter>getFilters()HookDescriptorgetHookDescriptor()intgetPriority()Gets the priority for ordering multiple hooks at the same point.InstrumentationTargetgetTarget()booleanisCanModifyValue()booleanisEnabled()booleanisPassArray()booleanisPassIndex()booleanisPassValue()static ArrayStoreHooksimple(String hookOwner, String hookName, String hookDescriptor)Creates an array store hook that invokes the given static hook method.
-
-
-
Method Detail
-
getHookDescriptor
public HookDescriptor getHookDescriptor()
- Specified by:
getHookDescriptorin interfaceHook- Returns:
- the hook descriptor
-
getFilters
public List<InstrumentationFilter> getFilters()
- Specified by:
getFiltersin interfaceHook- Returns:
- the filters
-
isEnabled
public boolean isEnabled()
-
getPriority
public int getPriority()
Description copied from interface:HookGets the priority for ordering multiple hooks at the same point.- Specified by:
getPriorityin interfaceHook- Returns:
- the priority
-
isPassArray
public boolean isPassArray()
- Returns:
- whether the array reference is passed to the hook
-
isPassIndex
public boolean isPassIndex()
- Returns:
- whether the array index is passed to the hook
-
isPassValue
public boolean isPassValue()
- Returns:
- whether the stored value (boxed if primitive) is passed to the hook
-
isCanModifyValue
public boolean isCanModifyValue()
- Returns:
- whether the hook can replace the stored value by returning a new one
-
getArrayTypeFilter
public String getArrayTypeFilter()
- Returns:
- the array element type filter (e.g.
"[Ljava/lang/Object;"), or null for no filter
-
getTarget
public InstrumentationTarget getTarget()
-
simple
public static ArrayStoreHook simple(String hookOwner, String hookName, String hookDescriptor)
Creates an array store hook that invokes the given static hook method.- Parameters:
hookOwner- the hook method's owning class (internal name)hookName- the hook method namehookDescriptor- the hook method descriptor- Returns:
- the new hook
-
builder
public static ArrayStoreHook.Builder builder()
Creates a builder for an array store hook.- Returns:
- a new builder
-
-