
org.jvnet.jaxb2_commons.mock_annotations.XmlElementBean 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
The newest version!
package org.jvnet.jaxb2_commons.mock_annotations;
import javax.xml.bind.annotation.XmlElement;
public class XmlElementBean
implements XmlElement
{
private String name;
private Class type;
private String defaultValue;
private boolean required;
private String namespace;
private boolean nillable;
public XmlElementBean(String name, Class type, String defaultValue, boolean required, String namespace, boolean nillable) {
this.name = name;
this.type = type;
this.defaultValue = defaultValue;
this.required = required;
this.namespace = namespace;
this.nillable = nillable;
}
public XmlElementBean() {
}
public Class annotationType() {
return XmlElement.class;
}
public boolean equals(Object that) {
if (!(that instanceof XmlElement)) {
return false;
}
if (!name.equals(((XmlElementBean) that).name)) {
return false;
}
if (!type.equals(((XmlElementBean) that).type)) {
return false;
}
if (!defaultValue.equals(((XmlElementBean) that).defaultValue)) {
return false;
}
if (!(required == ((XmlElementBean) that).required)) {
return false;
}
if (!namespace.equals(((XmlElementBean) that).namespace)) {
return false;
}
if (!(nillable == ((XmlElementBean) that).nillable)) {
return false;
}
return true;
}
public int hashCode() {
int r = 0;
r = (r^name.hashCode());
r = (r^type.hashCode());
r = (r^defaultValue.hashCode());
r = (r^(required?-393139297 : 0));
r = (r^namespace.hashCode());
r = (r^(nillable? 328890453 : 0));
return r;
}
public void name(String value) {
this.name = value;
}
public String name() {
return name;
}
public void type(Class value) {
this.type = value;
}
public Class type() {
return type;
}
public void defaultValue(String value) {
this.defaultValue = value;
}
public String defaultValue() {
return defaultValue;
}
public void required(boolean value) {
this.required = value;
}
public boolean required() {
return required;
}
public void namespace(String value) {
this.namespace = value;
}
public String namespace() {
return namespace;
}
public void nillable(boolean value) {
this.nillable = value;
}
public boolean nillable() {
return nillable;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy