org.jvnet.jaxb2_commons.mock_annotations.XmlAnyElementBean Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jaxb-api-annotation-mocks Show documentation
Show all versions of jaxb-api-annotation-mocks Show documentation
Mock annotation beans for JAXB API
package org.jvnet.jaxb2_commons.mock_annotations;
import javax.xml.bind.annotation.XmlAnyElement;
public class XmlAnyElementBean
implements XmlAnyElement
{
private Class value;
private boolean lax;
public XmlAnyElementBean(Class value, boolean lax) {
this.value = value;
this.lax = lax;
}
public XmlAnyElementBean() {
}
public Class annotationType() {
return XmlAnyElement.class;
}
public boolean equals(Object that) {
if (!(that instanceof XmlAnyElement)) {
return false;
}
if (!value.equals(((XmlAnyElementBean) that).value)) {
return false;
}
if (!(lax == ((XmlAnyElementBean) that).lax)) {
return false;
}
return true;
}
public int hashCode() {
int r = 0;
r = (r^value.hashCode());
r = (r^(lax? 106915 : 0));
return r;
}
public void value(Class value) {
value = value;
}
public Class value() {
return value;
}
public void lax(boolean value) {
lax = value;
}
public boolean lax() {
return lax;
}
}