ru.yandex.qatools.allure.events.AbstractStepFailureEvent Maven / Gradle / Ivy
The newest version!
package ru.yandex.qatools.allure.events;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlType;
import org.jvnet.jaxb2_commons.lang.Equals;
import org.jvnet.jaxb2_commons.lang.EqualsStrategy;
import org.jvnet.jaxb2_commons.lang.HashCode;
import org.jvnet.jaxb2_commons.lang.HashCodeStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBEqualsStrategy;
import org.jvnet.jaxb2_commons.lang.JAXBHashCodeStrategy;
import org.jvnet.jaxb2_commons.locator.ObjectLocator;
import org.jvnet.jaxb2_commons.locator.util.LocatorUtils;
/**
* Java class for abstract-step-failure-event complex type.
*
*
The following schema fragment specifies the expected content contained within this class.
*
*
* <complexType name="abstract-step-failure-event">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <all>
* <element name="throwable" type="{urn:events.allure.qatools.yandex.ru}throwable"/>
* </all>
* </restriction>
* </complexContent>
* </complexType>
*
*
*
*/
@XmlAccessorType(XmlAccessType.FIELD)
@XmlType(name = "abstract-step-failure-event", propOrder = {
})
public abstract class AbstractStepFailureEvent implements Equals, HashCode, StepEvent
{
@XmlElement(required = true, nillable = true)
protected Throwable throwable;
/**
* Gets the value of the throwable property.
*
* @return
* possible object is
* {@link Throwable }
*
*/
public Throwable getThrowable() {
return throwable;
}
/**
* Sets the value of the throwable property.
*
* @param value
* allowed object is
* {@link Throwable }
*
*/
public void setThrowable(Throwable value) {
this.throwable = value;
}
public boolean equals(ObjectLocator thisLocator, ObjectLocator thatLocator, Object object, EqualsStrategy strategy) {
if (!(object instanceof AbstractStepFailureEvent)) {
return false;
}
if (this == object) {
return true;
}
final AbstractStepFailureEvent that = ((AbstractStepFailureEvent) object);
{
Throwable lhsThrowable;
lhsThrowable = this.getThrowable();
Throwable rhsThrowable;
rhsThrowable = that.getThrowable();
if (!strategy.equals(LocatorUtils.property(thisLocator, "throwable", lhsThrowable), LocatorUtils.property(thatLocator, "throwable", rhsThrowable), lhsThrowable, rhsThrowable)) {
return false;
}
}
return true;
}
public boolean equals(Object object) {
final EqualsStrategy strategy = JAXBEqualsStrategy.INSTANCE;
return equals(null, null, object, strategy);
}
public int hashCode(ObjectLocator locator, HashCodeStrategy strategy) {
int currentHashCode = 1;
{
Throwable theThrowable;
theThrowable = this.getThrowable();
currentHashCode = strategy.hashCode(LocatorUtils.property(locator, "throwable", theThrowable), currentHashCode, theThrowable);
}
return currentHashCode;
}
public int hashCode() {
final HashCodeStrategy strategy = JAXBHashCodeStrategy.INSTANCE;
return this.hashCode(null, strategy);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy