| Method from net.sourceforge.harness.xml.jaxb.Java Detail: |
public boolean equals(Object ob) {
if (this == ob) {
return true;
}
if (!(ob instanceof Java)) {
return false;
}
Java tob = ((Java) ob);
if (_Vendor != null) {
if (tob._Vendor == null) {
return false;
}
if (!_Vendor.equals(tob._Vendor)) {
return false;
}
} else {
if (tob._Vendor != null) {
return false;
}
}
if (_Version != null) {
if (tob._Version == null) {
return false;
}
if (!_Version.equals(tob._Version)) {
return false;
}
} else {
if (tob._Version != null) {
return false;
}
}
if (_Cp != null) {
if (tob._Cp == null) {
return false;
}
if (!_Cp.equals(tob._Cp)) {
return false;
}
} else {
if (tob._Cp != null) {
return false;
}
}
if (_Ext != null) {
if (tob._Ext == null) {
return false;
}
if (!_Ext.equals(tob._Ext)) {
return false;
}
} else {
if (tob._Ext != null) {
return false;
}
}
return true;
}
|
public String getCp() {
return _Cp;
}
|
public String getExt() {
return _Ext;
}
|
public String getVendor() {
return _Vendor;
}
|
public String getVersion() {
return _Version;
}
|
public int hashCode() {
int h = 0;
h = ((127 * h) + ((_Vendor != null) ? _Vendor.hashCode() : 0));
h = ((127 * h) + ((_Version != null) ? _Version.hashCode() : 0));
h = ((127 * h) + ((_Cp != null) ? _Cp.hashCode() : 0));
h = ((127 * h) + ((_Ext != null) ? _Ext.hashCode() : 0));
return h;
}
|
public void marshal(Marshaller m) throws IOException {
XMLWriter w = m.writer();
w.start("java");
w.attribute("vendor", _Vendor.toString());
w.attribute("version", _Version.toString());
w.attribute("cp", _Cp.toString());
if (_Ext != null) {
w.attribute("ext", _Ext.toString());
}
w.end("java");
}
|
public static Dispatcher newDispatcher() {
return Author.newDispatcher();
}
|
public void setCp(String _Cp) {
this._Cp = _Cp;
if (_Cp == null) {
invalidate();
}
}
|
public void setExt(String _Ext) {
this._Ext = _Ext;
if (_Ext == null) {
invalidate();
}
}
|
public void setVendor(String _Vendor) {
this._Vendor = _Vendor;
if (_Vendor == null) {
invalidate();
}
}
|
public void setVersion(String _Version) {
this._Version = _Version;
if (_Version == null) {
invalidate();
}
}
|
public String toString() {
StringBuffer sb = new StringBuffer("< < java");
if (_Vendor != null) {
sb.append(" vendor=");
sb.append(_Vendor.toString());
}
if (_Version != null) {
sb.append(" version=");
sb.append(_Version.toString());
}
if (_Cp != null) {
sb.append(" cp=");
sb.append(_Cp.toString());
}
if (_Ext != null) {
sb.append(" ext=");
sb.append(_Ext.toString());
}
sb.append(" > >");
return sb.toString();
}
|
public void unmarshal(Unmarshaller u) throws UnmarshalException {
XMLScanner xs = u.scanner();
Validator v = u.validator();
xs.takeStart("java");
while (xs.atAttribute()) {
String an = xs.takeAttributeName();
if (an.equals("vendor")) {
if (_Vendor != null) {
throw new DuplicateAttributeException(an);
}
_Vendor = xs.takeAttributeValue();
continue;
}
if (an.equals("version")) {
if (_Version != null) {
throw new DuplicateAttributeException(an);
}
_Version = xs.takeAttributeValue();
continue;
}
if (an.equals("cp")) {
if (_Cp != null) {
throw new DuplicateAttributeException(an);
}
_Cp = xs.takeAttributeValue();
continue;
}
if (an.equals("ext")) {
if (_Ext != null) {
throw new DuplicateAttributeException(an);
}
_Ext = xs.takeAttributeValue();
continue;
}
throw new InvalidAttributeException(an);
}
xs.takeEnd("java");
}
|
public static Java unmarshal(InputStream in) throws UnmarshalException {
return unmarshal(XMLScanner.open(in));
}
|
public static Java unmarshal(XMLScanner xs) throws UnmarshalException {
return unmarshal(xs, newDispatcher());
}
|
public static Java unmarshal(XMLScanner xs,
Dispatcher d) throws UnmarshalException {
return ((Java) d.unmarshal(xs, (Java.class)));
}
|
public void validate(Validator v) throws StructureValidationException {
}
|
public void validateThis() throws LocalValidationException {
if (_Vendor == null) {
throw new MissingAttributeException("vendor");
}
if (_Version == null) {
throw new MissingAttributeException("version");
}
if (_Cp == null) {
throw new MissingAttributeException("cp");
}
}
|