I'm sure this has been asked before but my searches haven't turned up
anything. I need a way to initialize collection objects lazily. My XSDs
(which I don't control) have the following for all objects:
<xsd:anyAttribute namespace="##any" processContents="lax"/>
Resulting in lots of the following:
public class Foo {
private Map<QName, String> otherAttributes = new HashMap<QName,
String>();
// ....
}
How can I tell XJC to not create the otherAttributes map until the
'getOtherAttributes()' method is called? Ordinarily this wouldn't be a
problem but I'm seeing a lot of needless object creation under load.
Thanks for your time.