public static class JvmInvokeTaintSink.Builder
extends java.lang.Object
JvmInvokeTaintSink
.Modifier and Type | Field and Description |
---|---|
protected java.util.function.Predicate<Call> |
callMatcher |
protected java.util.function.Predicate<TaintSource> |
isValidForSource |
protected Signature |
signature |
protected java.util.Set<java.lang.Integer> |
takesArgs |
protected java.util.Set<java.lang.String> |
takesGlobals |
protected boolean |
takesInstance |
Constructor and Description |
---|
Builder(Signature signature)
Create a new builder for
JvmInvokeTaintSink . |
Modifier and Type | Method and Description |
---|---|
JvmInvokeTaintSink |
build()
Build a
JvmInvokeTaintSink . |
JvmInvokeTaintSink.Builder |
setCallMatcher(java.util.function.Predicate<Call> callMatcher) |
JvmInvokeTaintSink.Builder |
setIsValidForSource(java.util.function.Predicate<TaintSource> isValidForSource) |
JvmInvokeTaintSink.Builder |
setTakesArgs(java.util.Set<java.lang.Integer> takesArgs) |
JvmInvokeTaintSink.Builder |
setTakesGlobals(java.util.Set<java.lang.String> takesGlobals) |
JvmInvokeTaintSink.Builder |
setTakesInstance(boolean takesInstance) |
protected java.util.function.Predicate<TaintSource> isValidForSource
protected java.util.function.Predicate<Call> callMatcher
protected boolean takesInstance
protected java.util.Set<java.lang.Integer> takesArgs
protected java.util.Set<java.lang.String> takesGlobals
protected final Signature signature
public Builder(Signature signature)
JvmInvokeTaintSink
.signature
- @param signature the signature of a sink methodpublic JvmInvokeTaintSink build()
JvmInvokeTaintSink
.public JvmInvokeTaintSink.Builder setIsValidForSource(java.util.function.Predicate<TaintSource> isValidForSource)
isValidForSource
- predicate on whether the sink is valid for a given sourcepublic JvmInvokeTaintSink.Builder setTakesInstance(boolean takesInstance)
takesInstance
- whether the sink is sensitive to the calling instancepublic JvmInvokeTaintSink.Builder setTakesArgs(java.util.Set<java.lang.Integer> takesArgs)
takesArgs
- a set of sensitive argumentspublic JvmInvokeTaintSink.Builder setTakesGlobals(java.util.Set<java.lang.String> takesGlobals)
takesGlobals
- a set of sensitive global variablespublic JvmInvokeTaintSink.Builder setCallMatcher(java.util.function.Predicate<Call> callMatcher)
callMatcher
- predicate on whether a call matches this taint sink