Class HookDescriptor.Builder
- java.lang.Object
-
- com.tonic.analysis.instrumentation.HookDescriptor.Builder
-
- Enclosing class:
- HookDescriptor
public static class HookDescriptor.Builder extends Object
Builder for HookDescriptor instances.
-
-
Constructor Summary
Constructors Constructor Description Builder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HookDescriptorbuild()Builds the hook descriptor.HookDescriptor.Builderdescriptor(String descriptor)Sets the hook method descriptor.HookDescriptor.BuilderinvokeType(InvokeType invokeType)Sets the invocation type used to call the hook.HookDescriptor.Buildername(String name)Sets the hook method name.HookDescriptor.Builderowner(String owner)Sets the hook class internal name.HookDescriptor.Builderparameters(List<HookDescriptor.HookParameter> parameters)Sets the parameters to pass to the hook method.HookDescriptor.BuilderreplacesValue(boolean replacesValue)Sets whether the hook's return value replaces the original value.
-
-
-
Method Detail
-
owner
public HookDescriptor.Builder owner(String owner)
Sets the hook class internal name.- Parameters:
owner- the owner class internal name- Returns:
- this builder
-
name
public HookDescriptor.Builder name(String name)
Sets the hook method name.- Parameters:
name- the hook method name- Returns:
- this builder
-
descriptor
public HookDescriptor.Builder descriptor(String descriptor)
Sets the hook method descriptor.- Parameters:
descriptor- the hook method descriptor- Returns:
- this builder
-
invokeType
public HookDescriptor.Builder invokeType(InvokeType invokeType)
Sets the invocation type used to call the hook.- Parameters:
invokeType- the invocation type- Returns:
- this builder
-
parameters
public HookDescriptor.Builder parameters(List<HookDescriptor.HookParameter> parameters)
Sets the parameters to pass to the hook method.- Parameters:
parameters- the hook parameters- Returns:
- this builder
-
replacesValue
public HookDescriptor.Builder replacesValue(boolean replacesValue)
Sets whether the hook's return value replaces the original value.- Parameters:
replacesValue- true if the hook result replaces the value- Returns:
- this builder
-
build
public HookDescriptor build()
Builds the hook descriptor.- Returns:
- the built HookDescriptor
-
-