Adding Java MapAnnotation stubs to templates