background image

Schema-Derived JAXB Classes

<< Schema-to-Java Bindings Examples | Items.java Class Code >>
<< Schema-to-Java Bindings Examples | Items.java Class Code >>
22
U
SING
JAXB
Schema-Derived JAXB Classes
The code for the individual classes generated by the JAXB binding compiler for the
Basic examples is listed below, followed by brief explanations of its functions. The
classes listed here are:
· Comment.java
· Items.java
· ObjectFactory.java
· PurchaseOrder.java
· PurchaseOrderType.java
· USAddress.java
Comment.java
In
Comment.java
:
· The
Comment.java
class is part of the
primer.po
package.
·
Comment
is a public interface that extends
javax.xml.bind.Element
.
· Content in instantiations of this class bind to the XML schema element named
comment
.
· The
getValue()
and
setValue()
methods are used to get and set strings repre-
senting XML
comment
elements in the Java content tree.
The
Comment.java
code looks like this:
package primer.po;
public interface Comment
extends javax.xml.bind.Element
{
String getValue();
void setValue(String value);
}