All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jvnet.hyperjaxb3.codemodel.util.JExprUtils Maven / Gradle / Ivy

There is a newer version: 4.0.8
Show newest version
package org.jvnet.hyperjaxb3.codemodel.util;

import javax.xml.namespace.QName;

import com.sun.codemodel.JCodeModel;
import com.sun.codemodel.JExpr;
import com.sun.codemodel.JExpression;
import com.sun.codemodel.JInvocation;

public class JExprUtils {

	public static JExpression newQName(JCodeModel codeModel, QName elementName) {
		final JInvocation name = JExpr._new(codeModel.ref(QName.class)).arg(

		JExpr.lit(elementName.getNamespaceURI())

		).arg(JExpr.lit(elementName.getLocalPart()));
		return name;

	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy