if (m_unmarshalContentName == null) {
// set up for constructing new method
String name = m_container.getBindingRoot().getPrefix() +
UNMARSHAL_SUFFIX;
UnmarshalBuilder meth = new UnmarshalBuilder(name,
m_class.getClassFile(), m_class.getMungedFile());
m_unmarshalContentName = meth.getFullName();
m_unmarshalSignature = meth.getSignature();
// if preset method supplied add code to call it
if (!hasAttribute() && m_preSetMethod != null) {
meth.loadObject();
genUserMethodCall(true, m_preSetMethod, meth);
}
// push object being unmarshalled to unmarshaller stack
meth.loadContext();
meth.loadObject();
String mname = hasAttribute() ? UNMARSHAL_PUSHOBJECTMETHOD :
UNMARSHAL_PUSHTRACKEDOBJECTMETHOD;
meth.appendCallVirtual(mname, PUSHOBJECT_SIGNATURE);
// generate the actual unmarshalling code in method
meth.loadObject();
if (!m_fakeContent) {
m_component.genContentUnmarshal(meth);
}
// pop object from unmarshal stack
meth.loadContext();
meth.appendCallVirtual(UNMARSHAL_POPOBJECTMETHOD,
POPOBJECT_SIGNATURE);
// if postset method supplied and no attributes add code to call
if (m_postSetMethod != null) {
genUserMethodCall(true, m_postSetMethod, meth);
}
// finish by returning object
meth.loadObject();
meth.appendReturn(m_class.getClassFile().getName());
// add method to class
if (m_lockContentUnmarshal) {
m_unmarshalContentMethod =
m_class.getUniqueNamed(meth).getItem();