use of ru.curs.celesta.dbutils.CursorIterator in project celesta by CourseOrchestra.
the class CursorGenerator method buildIterator.
private static MethodSpec buildIterator(TypeName selfTypeName) {
TypeName iteratorTypeName = ParameterizedTypeName.get(ClassName.get(Iterator.class), selfTypeName);
TypeName cursorIterator = ParameterizedTypeName.get(ClassName.get(CursorIterator.class), selfTypeName);
return MethodSpec.methodBuilder("iterator").addModifiers(Modifier.PUBLIC).addAnnotation(Override.class).returns(iteratorTypeName).addStatement("return new $T(this)", cursorIterator).build();
}
Aggregations