• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * Copyright (c) 2021 Huawei Device Co., Ltd.
3  *
4  * HDF is dual licensed: you can use it either under the terms of
5  * the GPL, or the BSD license, at your option.
6  * See the LICENSE file in the root of this repository for complete details.
7  */
8 
9 #ifndef OHOS_HDI_JAVA_CODE_EMITTER_H
10 #define OHOS_HDI_JAVA_CODE_EMITTER_H
11 
12 #include "ast/ast.h"
13 #include "codegen/code_emitter.h"
14 #include "util/autoptr.h"
15 #include "util/light_refcount_base.h"
16 #include "util/string.h"
17 #include "util/string_builder.h"
18 
19 namespace OHOS {
20 namespace HDI {
21 class JavaCodeEmitter : public CodeEmitter {
22 public:
23     virtual ~JavaCodeEmitter() = default;
24 protected:
25     bool CreateDirectory();
26 
27     void EmitLicense(StringBuilder& sb);
28 
29     void EmitPackage(StringBuilder& sb);
30 
31     void EmitInterfaceMethodCommands(StringBuilder& sb, const String& prefix);
32 
33     String MethodName(const String& name);
34 
35     String SpecificationParam(StringBuilder& paramSb, const String& prefix);
36 };
37 } // namespace HDI
38 } // namespace OHOS
39 
40 #endif // OHOS_HDI_JAVA_CODE_EMITTER_H