/** * Wraps a type value into a {@link JAXBElement}. */ protected final JInvocation createJAXBElement(JExpression $var) { JCodeModel cm = codeModel(); return JExpr._new(cm.ref(JAXBElement.class)) .arg(JExpr._new(cm.ref(QName.class)) .arg(ei.getElementName().getNamespaceURI()) .arg(ei.getElementName().getLocalPart())) .arg(getRawType().boxify().erasure().dotclass()) .arg($var); }
/** * Generates an expression that evaluates to "new QName(...)" */ private JInvocation createQName(JCodeModel codeModel,QName name) { return JExpr._new(codeModel.ref(QName.class)).arg(name.getNamespaceURI()).arg(name.getLocalPart()); }
/** * Generates an expression that evaluates to "new QName(...)" */ private JInvocation createQName(QName name) { return JExpr._new(codeModel.ref(QName.class)).arg(name.getNamespaceURI()).arg(name.getLocalPart()); }