crypto.analysis.errors.CallToError Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of CryptoAnalysis Show documentation
Show all versions of CryptoAnalysis Show documentation
CogniCrypt_SAST: CrySL-to-Static Analysis Compiler
The newest version!
package crypto.analysis.errors;
import crypto.analysis.IAnalysisSeed;
import crysl.rule.CrySLMethod;
import crysl.rule.CrySLRule;
import java.util.Collection;
import java.util.Objects;
public class CallToError extends AbstractConstraintsError {
private final Collection requiredMethods;
public CallToError(
IAnalysisSeed seed, CrySLRule rule, Collection requiredMethods) {
super(seed, seed.getOrigin(), rule);
this.requiredMethods = requiredMethods;
}
public Collection getRequiredMethods() {
return requiredMethods;
}
@Override
public String toErrorMarkerString() {
return "Call to one of the methods "
+ formatMethodNames(requiredMethods)
+ getObjectType()
+ " is missing";
}
@Override
public int hashCode() {
return Objects.hash(super.hashCode(), requiredMethods);
}
@Override
public boolean equals(Object obj) {
return super.equals(obj)
&& obj instanceof CallToError other
&& Objects.equals(requiredMethods, other.getRequiredMethods());
}
@Override
public String toString() {
return "CallToError: " + toErrorMarkerString();
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy