com.sun.tools.xjc.reader.xmlschema.bindinfo.BIFactoryMethod Maven / Gradle / Ivy
Go to download
Old JAXB Binding Compiler. Contains source code needed for binding customization files into java sources.
In other words: the *tool* to generate java classes for the given xml representation.
package com.sun.tools.xjc.reader.xmlschema.bindinfo;
import javax.xml.bind.annotation.XmlRootElement;
import javax.xml.bind.annotation.XmlAttribute;
import javax.xml.namespace.QName;
import com.sun.xml.xsom.XSComponent;
import com.sun.tools.xjc.model.CPropertyInfo;
import com.sun.tools.xjc.reader.Ring;
import com.sun.tools.xjc.reader.Const;
import com.sun.tools.xjc.reader.xmlschema.BGMBuilder;
/**
* Controls the ObjectFactory method name.
*
* @author Kohsuke Kawaguchi
*/
@XmlRootElement(name="factoryMethod")
public class BIFactoryMethod extends AbstractDeclarationImpl {
@XmlAttribute
public String name;
/**
* If the given component has {@link BIInlineBinaryData} customization,
* reflect that to the specified property.
*/
public static void handle(XSComponent source, CPropertyInfo prop) {
BIInlineBinaryData inline = Ring.get(BGMBuilder.class).getBindInfo(source).get(BIInlineBinaryData.class);
if(inline!=null) {
prop.inlineBinaryData = true;
inline.markAsAcknowledged();
}
}
public final QName getName() { return NAME; }
/** Name of the declaration. */
public static final QName NAME = new QName(Const.JAXB_NSURI,"factoryMethod");
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy