• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * Copyright (c) 2024 Huawei Device Co., Ltd.
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 *     http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 */
15
16/**
17 * api数量统计工具类
18 */
19export class ApiCountInfo {
20  //api文件路径
21  filePath: string = '';
22  //api所属kit名称
23  kitName: string = '';
24  //api所属子系统名称
25  subSystem: string = '';
26  //同一个api文件里的api个数
27  apiNumber: number = -1;
28
29  setFilePath(filePath: string): ApiCountInfo {
30    this.filePath = filePath;
31    return this;
32  }
33
34  getFilePath(): string {
35    return this.filePath;
36  }
37
38  setKitName(kitName: string | undefined): ApiCountInfo {
39    if (!kitName) {
40      return this;
41    }
42    this.kitName = kitName;
43    return this;
44  }
45
46  getKitName(): string {
47    return this.kitName;
48  }
49
50  setsubSystem(subSystem: string | undefined): ApiCountInfo {
51    if (!subSystem) {
52      return this;
53    }
54    this.subSystem = subSystem;
55    return this;
56  }
57
58  getsubSystem(): string {
59    return this.subSystem;
60  }
61
62  setApiNumber(apiNumber: number): ApiCountInfo {
63    this.apiNumber = apiNumber;
64    return this;
65  }
66
67  getApiNumber(): number {
68    return this.apiNumber;
69  }
70}
71