use of org.kie.workbench.common.services.datamodeller.core.impl.TypeImpl in project kie-wb-common by kiegroup.
the class JavaRoasterModelDriverTest method createNestedClassUpdateTest.
private DataObject createNestedClassUpdateTest() {
DataObject dataObject = createDataObject("org.kie.workbench.common.services.datamodeller.driver.package5", "NestedClassUpdateTest", null);
JavaClass nestedClass = new JavaClassImpl("", "NestedClass");
nestedClass.addInterface("java.io.Serializable");
nestedClass.addInterface("ParametrizedInterface<Integer>");
Annotation generatedAnnotation = createAnnotation(Generated.class);
generatedAnnotation.setValue("value", Arrays.asList("foo.bar.Generator"));
nestedClass.addAnnotation(generatedAnnotation);
MethodImpl method = new MethodImpl("method", Collections.EMPTY_LIST, "", new TypeImpl(void.class.getName()), Visibility.PUBLIC);
generatedAnnotation = createAnnotation(Generated.class);
generatedAnnotation.setValue("value", Arrays.asList("foo.bar.Generator"));
method.addAnnotation(generatedAnnotation);
nestedClass.addMethod(method);
dataObject.addNestedClass(nestedClass);
return dataObject;
}
Aggregations