use of com.sun.tools.xjc.outline.ClassOutline in project midpoint by Evolveum.
the class SchemaProcessor method addComplextType.
private void addComplextType(Outline outline, Map<String, JFieldVar> namespaceFields) {
Set<Map.Entry<NClass, CClassInfo>> set = outline.getModel().beans().entrySet();
for (Map.Entry<NClass, CClassInfo> entry : set) {
ClassOutline classOutline = outline.getClazz(entry.getValue());
QName qname = entry.getValue().getTypeName();
if (qname == null) {
continue;
}
JFieldVar var = namespaceFields.get(qname.getNamespaceURI());
if (var != null) {
createQNameDefinition(outline, classOutline.implClass, COMPLEX_TYPE_FIELD_NAME, var, qname);
} else {
createPSFField(outline, classOutline.implClass, COMPLEX_TYPE_FIELD_NAME, qname);
}
}
}
use of com.sun.tools.xjc.outline.ClassOutline in project midpoint by Evolveum.
the class ProcessorUtils method findClassOutline.
public static ClassOutline findClassOutline(Outline outline, QName type) {
Set<Map.Entry<NClass, CClassInfo>> set = outline.getModel().beans().entrySet();
for (Map.Entry<NClass, CClassInfo> entry : set) {
ClassOutline classOutline = outline.getClazz(entry.getValue());
QName qname = entry.getValue().getTypeName();
if (!type.equals(qname)) {
continue;
}
return classOutline;
}
throw new IllegalStateException("Object type class defined by qname '" + type + "' outline was not found.");
}
use of com.sun.tools.xjc.outline.ClassOutline in project cxf by apache.
the class DummyXjcPlugin method run.
@Override
public boolean run(Outline arg0, Options arg1, ErrorHandler arg2) {
for (ClassOutline classOutline : arg0.getClasses()) {
JDefinedClass implClass = classOutline.implClass;
JCodeModel codeModel = implClass.owner();
JMethod dummyMethod = implClass.method(JMod.PUBLIC, codeModel.ref(String.class), "dummy");
dummyMethod.body()._return(JExpr.lit("dummy"));
}
return true;
}
Aggregations