ocSourceCode static method

String ocSourceCode(
  1. UniAPIOptions options
)

Implementation

static String ocSourceCode(UniAPIOptions options) {
  return CodeTemplate(children: [
    CommentUniAPI(),
    EmptyLine(),
    OCImport(
        fullImportName: genObjcHeaderFileName(options),
        importType: ocImportTypeLocal),
    OCImport(fullImportName: 'dlfcn.h'),
    OCImport(fullImportName: 'mach-o/getsect.h'),
    OneLine(body: objcUniApiPrivateStaticFounction),
    EmptyLine(),
    OneLine(body: '@implementation ${_genObjcClassName(options)}'),
    EmptyLine(),
    OneLine(body: objcUniApiClassMethods(_genSectname(options))),
    OneLine(body: '@end')
  ]).build();
}