arkanalyzer 1.0.6 → 1.0.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/config/arkanalyzer.json +8 -0
- package/docs/IR2ts-stmt.md +81 -0
- package/docs/IR2ts.md +82 -0
- package/lib/Config.d.ts +29 -1
- package/lib/Config.d.ts.map +1 -1
- package/lib/Config.js +44 -11
- package/lib/Scene.d.ts +152 -9
- package/lib/Scene.d.ts.map +1 -1
- package/lib/Scene.js +233 -66
- package/lib/callgraph/algorithm/AbstractAnalysis.d.ts +2 -1
- package/lib/callgraph/algorithm/AbstractAnalysis.d.ts.map +1 -1
- package/lib/callgraph/algorithm/AbstractAnalysis.js +14 -7
- package/lib/callgraph/algorithm/ClassHierarchyAnalysis.d.ts.map +1 -1
- package/lib/callgraph/algorithm/ClassHierarchyAnalysis.js +2 -4
- package/lib/callgraph/algorithm/RapidTypeAnalysis.d.ts.map +1 -1
- package/lib/callgraph/algorithm/RapidTypeAnalysis.js +2 -3
- package/lib/callgraph/common/Statistics.js +1 -1
- package/lib/callgraph/model/BaseGraph.js +2 -2
- package/lib/callgraph/model/CallGraph.d.ts +3 -2
- package/lib/callgraph/model/CallGraph.d.ts.map +1 -1
- package/lib/callgraph/model/CallGraph.js +23 -14
- package/lib/callgraph/model/builder/CallGraphBuilder.d.ts +2 -2
- package/lib/callgraph/model/builder/CallGraphBuilder.js +3 -3
- package/lib/callgraph/pointerAnalysis/Context.d.ts.map +1 -1
- package/lib/callgraph/pointerAnalysis/Context.js +0 -1
- package/lib/callgraph/pointerAnalysis/Pag.d.ts +36 -9
- package/lib/callgraph/pointerAnalysis/Pag.d.ts.map +1 -1
- package/lib/callgraph/pointerAnalysis/Pag.js +130 -37
- package/lib/callgraph/pointerAnalysis/PagBuilder.d.ts +34 -5
- package/lib/callgraph/pointerAnalysis/PagBuilder.d.ts.map +1 -1
- package/lib/callgraph/pointerAnalysis/PagBuilder.js +479 -126
- package/lib/callgraph/pointerAnalysis/PointerAnalysis.d.ts +6 -0
- package/lib/callgraph/pointerAnalysis/PointerAnalysis.d.ts.map +1 -1
- package/lib/callgraph/pointerAnalysis/PointerAnalysis.js +107 -45
- package/lib/callgraph/pointerAnalysis/PtsDS.d.ts.map +1 -1
- package/lib/callgraph/pointerAnalysis/PtsDS.js +0 -2
- package/lib/core/base/Constant.d.ts +37 -5
- package/lib/core/base/Constant.d.ts.map +1 -1
- package/lib/core/base/Constant.js +58 -8
- package/lib/core/base/Expr.d.ts +98 -13
- package/lib/core/base/Expr.d.ts.map +1 -1
- package/lib/core/base/Expr.js +295 -127
- package/lib/core/base/Local.d.ts +70 -5
- package/lib/core/base/Local.d.ts.map +1 -1
- package/lib/core/base/Local.js +77 -4
- package/lib/core/base/Ref.d.ts +79 -5
- package/lib/core/base/Ref.d.ts.map +1 -1
- package/lib/core/base/Ref.js +143 -38
- package/lib/core/base/Stmt.d.ts +126 -12
- package/lib/core/base/Stmt.d.ts.map +1 -1
- package/lib/core/base/Stmt.js +135 -28
- package/lib/core/base/Type.d.ts +11 -2
- package/lib/core/base/Type.d.ts.map +1 -1
- package/lib/core/base/Type.js +47 -42
- package/lib/core/base/Value.d.ts +24 -2
- package/lib/core/base/Value.d.ts.map +1 -1
- package/lib/core/common/ArkError.d.ts +15 -0
- package/lib/core/common/ArkError.d.ts.map +1 -0
- package/lib/core/common/ArkError.js +28 -0
- package/lib/core/common/ArkIRTransformer.d.ts +12 -5
- package/lib/core/common/ArkIRTransformer.d.ts.map +1 -1
- package/lib/core/common/ArkIRTransformer.js +90 -45
- package/lib/core/common/BodyBuilder.d.ts +2 -0
- package/lib/core/common/BodyBuilder.d.ts.map +1 -1
- package/lib/core/common/BodyBuilder.js +5 -2
- package/lib/core/common/Builtin.js +1 -1
- package/lib/core/common/CfgBuilder.d.ts +12 -7
- package/lib/core/common/CfgBuilder.d.ts.map +1 -1
- package/lib/core/common/CfgBuilder.js +336 -140
- package/lib/core/common/Const.d.ts +15 -10
- package/lib/core/common/Const.d.ts.map +1 -1
- package/lib/core/common/Const.js +18 -11
- package/lib/core/common/DummyMainCreater.d.ts +5 -4
- package/lib/core/common/DummyMainCreater.d.ts.map +1 -1
- package/lib/core/common/DummyMainCreater.js +43 -28
- package/lib/core/common/EtsConst.d.ts +1 -0
- package/lib/core/common/EtsConst.d.ts.map +1 -1
- package/lib/core/common/EtsConst.js +2 -1
- package/lib/core/common/ExprUseReplacer.js +8 -8
- package/lib/core/common/IRUtils.d.ts +7 -0
- package/lib/core/common/IRUtils.d.ts.map +1 -1
- package/lib/core/common/IRUtils.js +34 -2
- package/lib/core/common/ModelUtils.d.ts +1 -0
- package/lib/core/common/ModelUtils.d.ts.map +1 -1
- package/lib/core/common/ModelUtils.js +39 -36
- package/lib/core/common/RefUseReplacer.js +3 -3
- package/lib/core/common/StmtUseReplacer.js +4 -4
- package/lib/core/common/TSConst.d.ts +10 -3
- package/lib/core/common/TSConst.d.ts.map +1 -1
- package/lib/core/common/TSConst.js +11 -4
- package/lib/core/common/TypeInference.d.ts +8 -2
- package/lib/core/common/TypeInference.d.ts.map +1 -1
- package/lib/core/common/TypeInference.js +222 -90
- package/lib/core/common/ValueUtil.d.ts +0 -4
- package/lib/core/common/ValueUtil.d.ts.map +1 -1
- package/lib/core/common/ValueUtil.js +10 -27
- package/lib/core/common/VisibleValue.js +1 -1
- package/lib/core/dataflow/DataflowProblem.d.ts +1 -0
- package/lib/core/dataflow/DataflowProblem.d.ts.map +1 -1
- package/lib/core/dataflow/DataflowProblem.js +4 -4
- package/lib/core/dataflow/DataflowSolver.d.ts +20 -16
- package/lib/core/dataflow/DataflowSolver.d.ts.map +1 -1
- package/lib/core/dataflow/DataflowSolver.js +67 -78
- package/lib/core/dataflow/TiantAnalysis.d.ts +1 -0
- package/lib/core/dataflow/TiantAnalysis.d.ts.map +1 -1
- package/lib/core/dataflow/TiantAnalysis.js +42 -28
- package/lib/core/dataflow/UndefinedVariable.d.ts +15 -1
- package/lib/core/dataflow/UndefinedVariable.d.ts.map +1 -1
- package/lib/core/dataflow/UndefinedVariable.js +122 -76
- package/lib/core/dataflow/Util.d.ts +5 -1
- package/lib/core/dataflow/Util.d.ts.map +1 -1
- package/lib/core/dataflow/Util.js +43 -22
- package/lib/core/graph/BasicBlock.d.ts +72 -0
- package/lib/core/graph/BasicBlock.d.ts.map +1 -1
- package/lib/core/graph/BasicBlock.js +165 -3
- package/lib/core/graph/Cfg.d.ts +30 -1
- package/lib/core/graph/Cfg.d.ts.map +1 -1
- package/lib/core/graph/Cfg.js +131 -11
- package/lib/core/graph/DominanceFinder.js +7 -7
- package/lib/core/graph/DominanceTree.js +4 -4
- package/lib/core/graph/builder/ViewTreeBuilder.d.ts.map +1 -1
- package/lib/core/graph/builder/ViewTreeBuilder.js +6 -5
- package/lib/core/model/ArkBaseModel.d.ts +59 -0
- package/lib/core/model/ArkBaseModel.d.ts.map +1 -0
- package/lib/core/model/ArkBaseModel.js +271 -0
- package/lib/core/model/ArkBody.d.ts +3 -9
- package/lib/core/model/ArkBody.d.ts.map +1 -1
- package/lib/core/model/ArkBody.js +3 -14
- package/lib/core/model/ArkClass.d.ts +107 -13
- package/lib/core/model/ArkClass.d.ts.map +1 -1
- package/lib/core/model/ArkClass.js +152 -54
- package/lib/core/model/ArkExport.d.ts +8 -7
- package/lib/core/model/ArkExport.d.ts.map +1 -1
- package/lib/core/model/ArkExport.js +16 -18
- package/lib/core/model/ArkField.d.ts +16 -13
- package/lib/core/model/ArkField.d.ts.map +1 -1
- package/lib/core/model/ArkField.js +18 -62
- package/lib/core/model/ArkFile.d.ts +42 -0
- package/lib/core/model/ArkFile.d.ts.map +1 -1
- package/lib/core/model/ArkFile.js +58 -0
- package/lib/core/model/ArkImport.d.ts +9 -7
- package/lib/core/model/ArkImport.d.ts.map +1 -1
- package/lib/core/model/ArkImport.js +11 -12
- package/lib/core/model/ArkMetadata.d.ts +20 -0
- package/lib/core/model/ArkMetadata.d.ts.map +1 -0
- package/lib/core/model/ArkMetadata.js +44 -0
- package/lib/core/model/ArkMethod.d.ts +195 -17
- package/lib/core/model/ArkMethod.d.ts.map +1 -1
- package/lib/core/model/ArkMethod.js +363 -46
- package/lib/core/model/ArkNamespace.d.ts +6 -8
- package/lib/core/model/ArkNamespace.d.ts.map +1 -1
- package/lib/core/model/ArkNamespace.js +16 -20
- package/lib/core/model/ArkSignature.d.ts +41 -0
- package/lib/core/model/ArkSignature.d.ts.map +1 -1
- package/lib/core/model/ArkSignature.js +76 -19
- package/lib/core/model/builder/ArkClassBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/ArkClassBuilder.js +60 -49
- package/lib/core/model/builder/ArkExportBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/ArkExportBuilder.js +12 -6
- package/lib/core/model/builder/ArkFieldBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/ArkFieldBuilder.js +13 -9
- package/lib/core/model/builder/ArkFileBuilder.js +1 -3
- package/lib/core/model/builder/ArkImportBuilder.d.ts +2 -1
- package/lib/core/model/builder/ArkImportBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/ArkImportBuilder.js +16 -13
- package/lib/core/model/builder/ArkMethodBuilder.d.ts +3 -1
- package/lib/core/model/builder/ArkMethodBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/ArkMethodBuilder.js +105 -45
- package/lib/core/model/builder/ArkNamespaceBuilder.d.ts.map +1 -1
- package/lib/core/model/builder/ArkNamespaceBuilder.js +4 -5
- package/lib/core/model/builder/builderUtils.d.ts +2 -1
- package/lib/core/model/builder/builderUtils.d.ts.map +1 -1
- package/lib/core/model/builder/builderUtils.js +63 -43
- package/lib/index.d.ts +2 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +4 -3
- package/lib/save/ArkStream.js +1 -1
- package/lib/save/DotPrinter.d.ts.map +1 -1
- package/lib/save/DotPrinter.js +1 -15
- package/lib/save/GraphPrinter.d.ts.map +1 -1
- package/lib/save/GraphPrinter.js +4 -2
- package/lib/save/JsonPrinter.js +5 -5
- package/lib/save/ViewTreePrinter.d.ts +16 -0
- package/lib/save/ViewTreePrinter.d.ts.map +1 -0
- package/lib/save/ViewTreePrinter.js +130 -0
- package/lib/save/source/SourceBase.d.ts +2 -2
- package/lib/save/source/SourceBase.d.ts.map +1 -1
- package/lib/save/source/SourceBase.js +6 -13
- package/lib/save/source/SourceBody.d.ts.map +1 -1
- package/lib/save/source/SourceBody.js +27 -14
- package/lib/save/source/SourceClass.d.ts.map +1 -1
- package/lib/save/source/SourceClass.js +12 -8
- package/lib/save/source/SourceField.d.ts.map +1 -1
- package/lib/save/source/SourceField.js +6 -2
- package/lib/save/source/SourceMethod.d.ts.map +1 -1
- package/lib/save/source/SourceMethod.js +10 -3
- package/lib/save/source/SourceModule.d.ts.map +1 -1
- package/lib/save/source/SourceModule.js +16 -10
- package/lib/save/source/SourceNamespace.d.ts.map +1 -1
- package/lib/save/source/SourceNamespace.js +4 -0
- package/lib/save/source/SourceStmt.d.ts +1 -1
- package/lib/save/source/SourceStmt.d.ts.map +1 -1
- package/lib/save/source/SourceStmt.js +37 -25
- package/lib/save/source/SourceTransformer.d.ts +6 -0
- package/lib/save/source/SourceTransformer.d.ts.map +1 -1
- package/lib/save/source/SourceTransformer.js +82 -51
- package/lib/save/source/SourceUtils.d.ts.map +1 -1
- package/lib/save/source/SourceUtils.js +12 -11
- package/lib/transformer/StaticSingleAssignmentFormer.js +3 -3
- package/lib/utils/CfgStructualAnalysis.d.ts +1 -0
- package/lib/utils/CfgStructualAnalysis.d.ts.map +1 -1
- package/lib/utils/CfgStructualAnalysis.js +103 -72
- package/lib/utils/callGraphUtils.d.ts.map +1 -1
- package/lib/utils/callGraphUtils.js +7 -10
- package/lib/utils/crypto_utils.d.ts +6 -0
- package/lib/utils/crypto_utils.d.ts.map +1 -0
- package/lib/utils/crypto_utils.js +57 -0
- package/lib/utils/entryMethodUtils.d.ts.map +1 -1
- package/lib/utils/entryMethodUtils.js +27 -26
- package/lib/utils/getAllFiles.d.ts +1 -1
- package/lib/utils/getAllFiles.d.ts.map +1 -1
- package/lib/utils/getAllFiles.js +4 -5
- package/lib/utils/logger.js +2 -2
- package/package.json +3 -2
|
@@ -17,12 +17,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.ArkClass = exports.ClassCategory = void 0;
|
|
18
18
|
const Type_1 = require("../base/Type");
|
|
19
19
|
const ArkMethod_1 = require("./ArkMethod");
|
|
20
|
-
const Decorator_1 = require("../base/Decorator");
|
|
21
|
-
const EtsConst_1 = require("../common/EtsConst");
|
|
22
20
|
const ArkExport_1 = require("./ArkExport");
|
|
23
21
|
const TypeInference_1 = require("../common/TypeInference");
|
|
24
22
|
const Const_1 = require("../common/Const");
|
|
25
23
|
const Position_1 = require("../base/Position");
|
|
24
|
+
const ArkBaseModel_1 = require("./ArkBaseModel");
|
|
26
25
|
var ClassCategory;
|
|
27
26
|
(function (ClassCategory) {
|
|
28
27
|
ClassCategory[ClassCategory["CLASS"] = 0] = "CLASS";
|
|
@@ -31,16 +30,16 @@ var ClassCategory;
|
|
|
31
30
|
ClassCategory[ClassCategory["ENUM"] = 3] = "ENUM";
|
|
32
31
|
ClassCategory[ClassCategory["TYPE_LITERAL"] = 4] = "TYPE_LITERAL";
|
|
33
32
|
ClassCategory[ClassCategory["OBJECT"] = 5] = "OBJECT";
|
|
34
|
-
})(ClassCategory
|
|
33
|
+
})(ClassCategory = exports.ClassCategory || (exports.ClassCategory = {}));
|
|
35
34
|
/**
|
|
36
35
|
* @category core/model
|
|
37
36
|
*/
|
|
38
|
-
class ArkClass {
|
|
37
|
+
class ArkClass extends ArkBaseModel_1.ArkBaseModel {
|
|
39
38
|
constructor() {
|
|
39
|
+
super();
|
|
40
40
|
this.lineCol = 0;
|
|
41
41
|
this.superClassName = '';
|
|
42
42
|
this.implementedInterfaceNames = [];
|
|
43
|
-
this.modifiers = new Set();
|
|
44
43
|
this.defaultMethod = null;
|
|
45
44
|
// name to model
|
|
46
45
|
this.methods = new Map();
|
|
@@ -53,21 +52,37 @@ class ArkClass {
|
|
|
53
52
|
this.anonymousMethodNumber = 0;
|
|
54
53
|
this.indexSignatureNumber = 0;
|
|
55
54
|
}
|
|
55
|
+
/**
|
|
56
|
+
* Returns the **string**name of this class.
|
|
57
|
+
* @returns The name of this class.
|
|
58
|
+
*/
|
|
56
59
|
getName() {
|
|
57
60
|
return this.classSignature.getClassName();
|
|
58
61
|
}
|
|
62
|
+
/**
|
|
63
|
+
* Returns the codes of class as a **string.**
|
|
64
|
+
* @returns the codes of class.
|
|
65
|
+
*/
|
|
59
66
|
getCode() {
|
|
60
67
|
return this.code;
|
|
61
68
|
}
|
|
62
69
|
setCode(code) {
|
|
63
70
|
this.code = code;
|
|
64
71
|
}
|
|
72
|
+
/**
|
|
73
|
+
* Returns the line position of this class.
|
|
74
|
+
* @returns The line position of this class.
|
|
75
|
+
*/
|
|
65
76
|
getLine() {
|
|
66
77
|
return (0, Position_1.getLineNo)(this.lineCol);
|
|
67
78
|
}
|
|
68
79
|
setLine(line) {
|
|
69
80
|
this.lineCol = (0, Position_1.setLine)(this.lineCol, line);
|
|
70
81
|
}
|
|
82
|
+
/**
|
|
83
|
+
* Returns the column position of this class.
|
|
84
|
+
* @returns The column position of this class.
|
|
85
|
+
*/
|
|
71
86
|
getColumn() {
|
|
72
87
|
return (0, Position_1.getColNo)(this.lineCol);
|
|
73
88
|
}
|
|
@@ -80,27 +95,43 @@ class ArkClass {
|
|
|
80
95
|
setCategory(category) {
|
|
81
96
|
this.category = category;
|
|
82
97
|
}
|
|
98
|
+
/**
|
|
99
|
+
* Returns the declaring file.
|
|
100
|
+
* @returns A file defined by ArkAnalyzer.
|
|
101
|
+
* @example
|
|
102
|
+
* 1. Get the {@link ArkFile} which the ArkClass is in.
|
|
103
|
+
|
|
104
|
+
```typescript
|
|
105
|
+
const arkFile = arkClass.getDeclaringArkFile();
|
|
106
|
+
```
|
|
107
|
+
*/
|
|
83
108
|
getDeclaringArkFile() {
|
|
84
109
|
return this.declaringArkFile;
|
|
85
110
|
}
|
|
86
111
|
setDeclaringArkFile(declaringArkFile) {
|
|
87
112
|
this.declaringArkFile = declaringArkFile;
|
|
88
113
|
}
|
|
114
|
+
/**
|
|
115
|
+
* Returns the declaring namespace of this class, which may also be an **undefined**.
|
|
116
|
+
* @returns The declaring namespace (may be **undefined**) of this class.
|
|
117
|
+
*/
|
|
89
118
|
getDeclaringArkNamespace() {
|
|
90
119
|
return this.declaringArkNamespace;
|
|
91
120
|
}
|
|
92
121
|
setDeclaringArkNamespace(declaringArkNamespace) {
|
|
93
122
|
this.declaringArkNamespace = declaringArkNamespace;
|
|
94
123
|
}
|
|
95
|
-
isExported() {
|
|
96
|
-
return this.modifiers.has('ExportKeyword');
|
|
97
|
-
}
|
|
98
124
|
isDefaultArkClass() {
|
|
99
125
|
return this.getName() === Const_1.DEFAULT_ARK_CLASS_NAME;
|
|
100
126
|
}
|
|
101
127
|
isAnonymousClass() {
|
|
102
128
|
return this.getName().startsWith(Const_1.ANONYMOUS_CLASS_PREFIX);
|
|
103
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Returns the signature of current class (i.e., {@link ClassSignature}).
|
|
132
|
+
* The {@link ClassSignature} can uniquely identify a class, according to which we can find the class from the scene.
|
|
133
|
+
* @returns The class signature.
|
|
134
|
+
*/
|
|
104
135
|
getSignature() {
|
|
105
136
|
return this.classSignature;
|
|
106
137
|
}
|
|
@@ -113,16 +144,23 @@ class ArkClass {
|
|
|
113
144
|
setSuperClassName(superClassName) {
|
|
114
145
|
this.superClassName = superClassName;
|
|
115
146
|
}
|
|
147
|
+
/**
|
|
148
|
+
* Returns the superclass of this class.
|
|
149
|
+
* @returns The superclass of this class.
|
|
150
|
+
*/
|
|
116
151
|
getSuperClass() {
|
|
117
152
|
if (this.superClass === undefined) {
|
|
118
153
|
const type = TypeInference_1.TypeInference.inferUnclearReferenceType(this.superClassName, this);
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
154
|
+
let superClass;
|
|
155
|
+
if (type instanceof Type_1.ClassType &&
|
|
156
|
+
(superClass = this.declaringArkFile.getScene().getClass(type.getClassSignature()))) {
|
|
157
|
+
superClass.addExtendedClass(this);
|
|
158
|
+
this.superClass = superClass;
|
|
159
|
+
const realGenericTypes = type.getRealGenericTypes();
|
|
160
|
+
if (realGenericTypes) {
|
|
161
|
+
this.realTypes = realGenericTypes;
|
|
125
162
|
}
|
|
163
|
+
return this.superClass;
|
|
126
164
|
}
|
|
127
165
|
this.superClass = null;
|
|
128
166
|
}
|
|
@@ -146,6 +184,12 @@ class ArkClass {
|
|
|
146
184
|
hasImplementedInterface(interfaceName) {
|
|
147
185
|
return (this.implementedInterfaceNames.indexOf(interfaceName) > -1);
|
|
148
186
|
}
|
|
187
|
+
/**
|
|
188
|
+
* Get the field according to its field signature.
|
|
189
|
+
* If no field cound be found, **null**will be returned.
|
|
190
|
+
* @param fieldSignature - the field's signature.
|
|
191
|
+
* @returns A field. If there is no field in this class, the return will be a **null**.
|
|
192
|
+
*/
|
|
149
193
|
getField(fieldSignature) {
|
|
150
194
|
const fieldName = fieldSignature.getFieldName();
|
|
151
195
|
let fieldSearched = this.getFieldWithName(fieldName);
|
|
@@ -160,6 +204,10 @@ class ArkClass {
|
|
|
160
204
|
getStaticFieldWithName(fieldName) {
|
|
161
205
|
return this.staticFields.get(fieldName) || null;
|
|
162
206
|
}
|
|
207
|
+
/**
|
|
208
|
+
* Returns an **array** of fields in the class.
|
|
209
|
+
* @returns an **array** of fields in the class.
|
|
210
|
+
*/
|
|
163
211
|
getFields() {
|
|
164
212
|
const allFields = Array.from(this.fields.values());
|
|
165
213
|
allFields.push(...this.staticFields.values());
|
|
@@ -178,11 +226,8 @@ class ArkClass {
|
|
|
178
226
|
this.addField(field);
|
|
179
227
|
});
|
|
180
228
|
}
|
|
181
|
-
|
|
182
|
-
return this.
|
|
183
|
-
}
|
|
184
|
-
addModifier(name) {
|
|
185
|
-
this.modifiers.add(name);
|
|
229
|
+
getRealTypes() {
|
|
230
|
+
return this.realTypes;
|
|
186
231
|
}
|
|
187
232
|
getGenericsTypes() {
|
|
188
233
|
return this.genericsTypes;
|
|
@@ -193,15 +238,22 @@ class ArkClass {
|
|
|
193
238
|
}
|
|
194
239
|
this.genericsTypes.push(gType);
|
|
195
240
|
}
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
241
|
+
/**
|
|
242
|
+
* Returns all methods defined in the specific class in the form of an array.
|
|
243
|
+
* @param generated - indicating whether this API returns the methods that are dynamically
|
|
244
|
+
* generated at runtime. If it is not specified as true or false, the return will not include the generated method.
|
|
245
|
+
* @returns An array of all methods in this class.
|
|
246
|
+
* @example
|
|
247
|
+
* 1. Get methods defined in class `BookService`.
|
|
248
|
+
|
|
249
|
+
```typescript
|
|
250
|
+
let classes: ArkClass[] = scene.getClasses();
|
|
251
|
+
let serviceClass : ArkClass = classes[1];
|
|
252
|
+
let methods: ArkMethod[] = serviceClass.getMethods();
|
|
253
|
+
let methodNames: string[] = methods.map(mthd => mthd.name);
|
|
254
|
+
console.log(methodNames);
|
|
255
|
+
```
|
|
256
|
+
*/
|
|
205
257
|
getMethods(generated) {
|
|
206
258
|
const allMethods = Array.from(this.methods.values())
|
|
207
259
|
.filter(f => !generated && !f.isGenerated() || generated);
|
|
@@ -209,12 +261,25 @@ class ArkClass {
|
|
|
209
261
|
return allMethods;
|
|
210
262
|
}
|
|
211
263
|
getMethod(methodSignature) {
|
|
264
|
+
var _a;
|
|
212
265
|
const methodName = methodSignature.getMethodSubSignature().getMethodName();
|
|
213
|
-
|
|
214
|
-
if (
|
|
215
|
-
|
|
266
|
+
const methodSearched = (_a = this.getMethodWithName(methodName)) !== null && _a !== void 0 ? _a : this.getStaticMethodWithName(methodName);
|
|
267
|
+
if (methodSearched === null) {
|
|
268
|
+
return null;
|
|
269
|
+
}
|
|
270
|
+
const implSignature = methodSearched.getImplementationSignature();
|
|
271
|
+
if (implSignature !== null && implSignature.isMatch(methodSignature)) {
|
|
272
|
+
return methodSearched;
|
|
216
273
|
}
|
|
217
|
-
|
|
274
|
+
const declareSignatures = methodSearched.getDeclareSignatures();
|
|
275
|
+
if (declareSignatures !== null) {
|
|
276
|
+
for (let i = 0; i < declareSignatures.length; i++) {
|
|
277
|
+
if (declareSignatures[i].isMatch(methodSignature)) {
|
|
278
|
+
return methodSearched;
|
|
279
|
+
}
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return null;
|
|
218
283
|
}
|
|
219
284
|
getMethodWithName(methodName) {
|
|
220
285
|
return this.methods.get(methodName) || null;
|
|
@@ -223,7 +288,7 @@ class ArkClass {
|
|
|
223
288
|
return this.staticMethods.get(methodName) || null;
|
|
224
289
|
}
|
|
225
290
|
addMethod(method) {
|
|
226
|
-
if (method.
|
|
291
|
+
if (method.isStatic()) {
|
|
227
292
|
this.staticMethods.set(method.getName(), method);
|
|
228
293
|
}
|
|
229
294
|
else {
|
|
@@ -240,11 +305,44 @@ class ArkClass {
|
|
|
240
305
|
setViewTree(viewTree) {
|
|
241
306
|
this.viewTree = viewTree;
|
|
242
307
|
}
|
|
308
|
+
/**
|
|
309
|
+
* Returns the view tree of the ArkClass.
|
|
310
|
+
* @returns The view tree of the ArkClass.
|
|
311
|
+
* @example
|
|
312
|
+
* 1. get viewTree of ArkClass.
|
|
313
|
+
|
|
314
|
+
```typescript
|
|
315
|
+
for (let arkFiles of scene.getFiles()) {
|
|
316
|
+
for (let arkClasss of arkFiles.getClasses()) {
|
|
317
|
+
if (arkClasss.hasViewTree()) {
|
|
318
|
+
arkClasss.getViewTree();
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
```
|
|
323
|
+
*/
|
|
243
324
|
getViewTree() {
|
|
244
325
|
return this.viewTree;
|
|
245
326
|
}
|
|
327
|
+
/**
|
|
328
|
+
* Check whether the view tree is defined.
|
|
329
|
+
* If it is defined, the return value is true, otherwise it is false.
|
|
330
|
+
* @returns True if the view tree is defined; false otherwise.
|
|
331
|
+
* @example
|
|
332
|
+
* 1. Judge viewTree of ArkClass.
|
|
333
|
+
|
|
334
|
+
```typescript
|
|
335
|
+
for (let arkFiles of scene.getFiles()) {
|
|
336
|
+
for (let arkClasss of arkFiles.getClasses()) {
|
|
337
|
+
if (arkClasss.hasViewTree()) {
|
|
338
|
+
arkClasss.getViewTree();
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
```
|
|
343
|
+
*/
|
|
246
344
|
hasViewTree() {
|
|
247
|
-
return this.viewTree
|
|
345
|
+
return this.viewTree !== undefined;
|
|
248
346
|
}
|
|
249
347
|
getStaticFields(classMap) {
|
|
250
348
|
const fields = [];
|
|
@@ -270,26 +368,6 @@ class ArkClass {
|
|
|
270
368
|
}
|
|
271
369
|
return globalMap.get(this.declaringArkFile.getFileSignature());
|
|
272
370
|
}
|
|
273
|
-
getDecorators() {
|
|
274
|
-
return Array.from(this.modifiers).filter((item) => {
|
|
275
|
-
return item instanceof Decorator_1.Decorator;
|
|
276
|
-
});
|
|
277
|
-
}
|
|
278
|
-
hasEntryDecorator() {
|
|
279
|
-
return this.hasDecorator(EtsConst_1.ENTRY_DECORATOR);
|
|
280
|
-
}
|
|
281
|
-
hasComponentDecorator() {
|
|
282
|
-
return this.hasDecorator(EtsConst_1.COMPONENT_DECORATOR);
|
|
283
|
-
}
|
|
284
|
-
hasDecorator(kind) {
|
|
285
|
-
let decorators = this.getDecorators();
|
|
286
|
-
return decorators.filter((value) => {
|
|
287
|
-
if (kind instanceof Set) {
|
|
288
|
-
return kind.has(value.getKind());
|
|
289
|
-
}
|
|
290
|
-
return value.getKind() == kind;
|
|
291
|
-
}).length != 0;
|
|
292
|
-
}
|
|
293
371
|
getAnonymousMethodNumber() {
|
|
294
372
|
return this.anonymousMethodNumber++;
|
|
295
373
|
}
|
|
@@ -311,5 +389,25 @@ class ArkClass {
|
|
|
311
389
|
setStaticInitMethod(arkMethod) {
|
|
312
390
|
this.staticInitMethod = arkMethod;
|
|
313
391
|
}
|
|
392
|
+
removeField(field) {
|
|
393
|
+
if (field.isStatic()) {
|
|
394
|
+
return this.staticFields.delete(field.getName());
|
|
395
|
+
}
|
|
396
|
+
return this.fields.delete(field.getName());
|
|
397
|
+
}
|
|
398
|
+
removeMethod(method) {
|
|
399
|
+
let rtn = false;
|
|
400
|
+
if (method.isStatic()) {
|
|
401
|
+
rtn = this.staticMethods.delete(method.getName());
|
|
402
|
+
}
|
|
403
|
+
else {
|
|
404
|
+
rtn = this.methods.delete(method.getName());
|
|
405
|
+
}
|
|
406
|
+
rtn && (rtn = this.getDeclaringArkFile().getScene().removeMethod(method));
|
|
407
|
+
return rtn;
|
|
408
|
+
}
|
|
409
|
+
validate() {
|
|
410
|
+
return this.validateFields(['declaringArkFile', 'category', 'classSignature']);
|
|
411
|
+
}
|
|
314
412
|
}
|
|
315
413
|
exports.ArkClass = ArkClass;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { LineColPosition } from '../base/Position';
|
|
2
|
-
import { Decorator } from '../base/Decorator';
|
|
3
2
|
import { ArkFile } from './ArkFile';
|
|
4
3
|
import { ArkSignature, ClassSignature, LocalSignature, MethodSignature, NamespaceSignature } from './ArkSignature';
|
|
4
|
+
import { ArkBaseModel, ModifierType } from './ArkBaseModel';
|
|
5
|
+
import { ArkError } from '../common/ArkError';
|
|
5
6
|
export type ExportSignature = NamespaceSignature | ClassSignature | MethodSignature | LocalSignature;
|
|
6
7
|
export declare enum ExportType {
|
|
7
8
|
NAME_SPACE = 0,
|
|
@@ -12,7 +13,8 @@ export declare enum ExportType {
|
|
|
12
13
|
UNKNOWN = 9
|
|
13
14
|
}
|
|
14
15
|
export interface ArkExport extends ArkSignature {
|
|
15
|
-
getModifiers():
|
|
16
|
+
getModifiers(): number;
|
|
17
|
+
containsModifier(modifierType: ModifierType): boolean;
|
|
16
18
|
getName(): string;
|
|
17
19
|
getExportType(): ExportType;
|
|
18
20
|
}
|
|
@@ -25,8 +27,7 @@ export interface FromInfo {
|
|
|
25
27
|
/**
|
|
26
28
|
* @category core/model
|
|
27
29
|
*/
|
|
28
|
-
export declare class ExportInfo implements FromInfo {
|
|
29
|
-
private modifiers;
|
|
30
|
+
export declare class ExportInfo extends ArkBaseModel implements FromInfo {
|
|
30
31
|
private _default?;
|
|
31
32
|
private nameBeforeAs?;
|
|
32
33
|
private exportClauseName;
|
|
@@ -46,7 +47,6 @@ export declare class ExportInfo implements FromInfo {
|
|
|
46
47
|
setArkExport(value: ArkExport | null): void;
|
|
47
48
|
getArkExport(): ArkExport | undefined | null;
|
|
48
49
|
isDefault(): boolean;
|
|
49
|
-
getModifiers(): Set<string | Decorator>;
|
|
50
50
|
getOriginTsPosition(): LineColPosition;
|
|
51
51
|
getTsSourceCode(): string;
|
|
52
52
|
getDeclaringArkFile(): ArkFile;
|
|
@@ -56,15 +56,16 @@ export declare class ExportInfo implements FromInfo {
|
|
|
56
56
|
exportClauseName(exportClauseName: string): any;
|
|
57
57
|
exportClauseType(exportClauseType: ExportType): any;
|
|
58
58
|
nameBeforeAs(nameBeforeAs: string): any;
|
|
59
|
-
|
|
60
|
-
modifiers(modifiers: Set<string | Decorator>): any;
|
|
59
|
+
modifiers(modifiers: number): any;
|
|
61
60
|
originTsPosition(originTsPosition: LineColPosition): any;
|
|
62
61
|
tsSourceCode(tsSourceCode: string): any;
|
|
63
62
|
declaringArkFile(value: ArkFile): any;
|
|
64
63
|
arkExport(value: ArkExport): any;
|
|
65
64
|
exportFrom(exportFrom: string): any;
|
|
65
|
+
setLeadingComments(comments: string[]): any;
|
|
66
66
|
build(): ExportInfo;
|
|
67
67
|
};
|
|
68
68
|
};
|
|
69
|
+
validate(): ArkError;
|
|
69
70
|
}
|
|
70
71
|
//# sourceMappingURL=ArkExport.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArkExport.d.ts","sourceRoot":"","sources":["../../../src/core/model/ArkExport.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ArkExport.d.ts","sourceRoot":"","sources":["../../../src/core/model/ArkExport.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AAEnH,OAAO,EAAE,YAAY,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC5D,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAI9C,MAAM,MAAM,eAAe,GAAG,kBAAkB,GAAG,cAAc,GAAG,eAAe,GAAG,cAAc,CAAC;AAErG,oBAAY,UAAU;IAClB,UAAU,IAAI;IACd,KAAK,IAAI;IACT,MAAM,IAAI;IACV,KAAK,IAAI;IACT,IAAI,IAAI;IACR,OAAO,IAAI;CACd;AAED,MAAM,WAAW,SAAU,SAAQ,YAAY;IAC3C,YAAY,IAAI,MAAM,CAAC;IACvB,gBAAgB,CAAC,YAAY,EAAE,YAAY,GAAG,OAAO,CAAC;IAEtD,OAAO,IAAI,MAAM,CAAC;IAElB,aAAa,IAAI,UAAU,CAAC;CAE/B;AAED,MAAM,WAAW,QAAQ;IACrB,SAAS,IAAI,OAAO,CAAC;IAErB,aAAa,IAAI,MAAM,CAAC;IAExB,OAAO,IAAI,MAAM,GAAG,SAAS,CAAC;IAE9B,mBAAmB,IAAI,OAAO,CAAC;CAClC;AAED;;GAEG;AACH,qBAAa,UAAW,SAAQ,YAAa,YAAW,QAAQ;IAC5D,OAAO,CAAC,QAAQ,CAAC,CAAU;IAC3B,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,gBAAgB,CAAc;IAEtC,OAAO,CAAC,gBAAgB,CAAkC;IAC1D,OAAO,CAAC,SAAS,CAAC,CAAmB;IACrC,OAAO,CAAC,UAAU,CAAC,CAAS;IAE5B,OAAO,CAAC,gBAAgB,CAAC,CAAkB;IAC3C,OAAO,CAAC,YAAY,CAAC,CAAS;IAC9B,OAAO,CAAC,gBAAgB,CAAW;IAEnC,OAAO;IAIA,OAAO,IAAI,MAAM,GAAG,SAAS;IAI7B,aAAa,IAAI,MAAM;IAIvB,mBAAmB,IAAI,MAAM;IAI7B,mBAAmB,CAAC,gBAAgB,EAAE,UAAU,GAAG,IAAI;IAIvD,mBAAmB,IAAI,UAAU;IAIjC,eAAe,IAAI,MAAM,GAAG,SAAS;IAIrC,YAAY,CAAC,KAAK,EAAE,SAAS,GAAG,IAAI;IAIpC,YAAY,IAAI,SAAS,GAAG,SAAS,GAAG,IAAI;IAI5C,SAAS,IAAI,OAAO;IAUpB,mBAAmB,IAAI,eAAe;IAItC,eAAe,IAAI,MAAM;IAIzB,mBAAmB,IAAI,OAAO;IAIrC,OAAc,OAAO;;wBACL,UAAU;+CAEoB,MAAM;+CAKN,UAAU;uCAKlB,MAAM;iCAKZ,MAAM;+CAKQ,eAAe;uCAKvB,MAAM;oCAKT,OAAO;6BAKd,SAAS;mCAKH,MAAM;yCAOA,MAAM,EAAE;qBAO5B,UAAU;;MAG5B;IAEK,QAAQ,IAAI,QAAQ;CAG9B"}
|
|
@@ -17,6 +17,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
exports.ExportInfo = exports.ExportType = void 0;
|
|
18
18
|
const Position_1 = require("../base/Position");
|
|
19
19
|
const TSConst_1 = require("../common/TSConst");
|
|
20
|
+
const ArkBaseModel_1 = require("./ArkBaseModel");
|
|
21
|
+
const ArkMetadata_1 = require("./ArkMetadata");
|
|
20
22
|
var ExportType;
|
|
21
23
|
(function (ExportType) {
|
|
22
24
|
ExportType[ExportType["NAME_SPACE"] = 0] = "NAME_SPACE";
|
|
@@ -25,13 +27,13 @@ var ExportType;
|
|
|
25
27
|
ExportType[ExportType["LOCAL"] = 3] = "LOCAL";
|
|
26
28
|
ExportType[ExportType["TYPE"] = 4] = "TYPE";
|
|
27
29
|
ExportType[ExportType["UNKNOWN"] = 9] = "UNKNOWN";
|
|
28
|
-
})(ExportType
|
|
30
|
+
})(ExportType = exports.ExportType || (exports.ExportType = {}));
|
|
29
31
|
/**
|
|
30
32
|
* @category core/model
|
|
31
33
|
*/
|
|
32
|
-
class ExportInfo {
|
|
34
|
+
class ExportInfo extends ArkBaseModel_1.ArkBaseModel {
|
|
33
35
|
constructor() {
|
|
34
|
-
|
|
36
|
+
super();
|
|
35
37
|
this.exportClauseName = '';
|
|
36
38
|
this.exportClauseType = ExportType.UNKNOWN;
|
|
37
39
|
}
|
|
@@ -61,18 +63,14 @@ class ExportInfo {
|
|
|
61
63
|
return this.arkExport;
|
|
62
64
|
}
|
|
63
65
|
isDefault() {
|
|
64
|
-
var _a;
|
|
65
66
|
if (this.exportFrom) {
|
|
66
67
|
return this.nameBeforeAs === TSConst_1.DEFAULT;
|
|
67
68
|
}
|
|
68
69
|
if (this._default === undefined) {
|
|
69
|
-
this._default =
|
|
70
|
+
this._default = this.containsModifier(ArkBaseModel_1.ModifierType.DEFAULT);
|
|
70
71
|
}
|
|
71
72
|
return this._default;
|
|
72
73
|
}
|
|
73
|
-
getModifiers() {
|
|
74
|
-
return this.modifiers;
|
|
75
|
-
}
|
|
76
74
|
getOriginTsPosition() {
|
|
77
75
|
var _a;
|
|
78
76
|
return (_a = this.originTsPosition) !== null && _a !== void 0 ? _a : Position_1.LineColPosition.DEFAULT;
|
|
@@ -84,6 +82,9 @@ class ExportInfo {
|
|
|
84
82
|
getDeclaringArkFile() {
|
|
85
83
|
return this.declaringArkFile;
|
|
86
84
|
}
|
|
85
|
+
validate() {
|
|
86
|
+
return this.validateFields(['declaringArkFile']);
|
|
87
|
+
}
|
|
87
88
|
}
|
|
88
89
|
exports.ExportInfo = ExportInfo;
|
|
89
90
|
ExportInfo.Builder = class ArkExportBuilder {
|
|
@@ -102,17 +103,8 @@ ExportInfo.Builder = class ArkExportBuilder {
|
|
|
102
103
|
this.exportInfo.nameBeforeAs = nameBeforeAs;
|
|
103
104
|
return this;
|
|
104
105
|
}
|
|
105
|
-
addModifier(name) {
|
|
106
|
-
if (!this.exportInfo.modifiers) {
|
|
107
|
-
this.exportInfo.modifiers = new Set();
|
|
108
|
-
}
|
|
109
|
-
this.exportInfo.modifiers.add(name);
|
|
110
|
-
return this;
|
|
111
|
-
}
|
|
112
106
|
modifiers(modifiers) {
|
|
113
|
-
|
|
114
|
-
modifiers.forEach(m => this.addModifier(m));
|
|
115
|
-
}
|
|
107
|
+
this.exportInfo.modifiers = modifiers;
|
|
116
108
|
return this;
|
|
117
109
|
}
|
|
118
110
|
originTsPosition(originTsPosition) {
|
|
@@ -137,6 +129,12 @@ ExportInfo.Builder = class ArkExportBuilder {
|
|
|
137
129
|
}
|
|
138
130
|
return this;
|
|
139
131
|
}
|
|
132
|
+
setLeadingComments(comments) {
|
|
133
|
+
if (comments.length > 0) {
|
|
134
|
+
this.exportInfo.setMetadata(ArkMetadata_1.ArkMetadataKind.LEADING_COMMENTS, comments);
|
|
135
|
+
}
|
|
136
|
+
return this;
|
|
137
|
+
}
|
|
140
138
|
build() {
|
|
141
139
|
return this.exportInfo;
|
|
142
140
|
}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
-
import { Decorator } from '../base/Decorator';
|
|
2
1
|
import { LineColPosition } from '../base/Position';
|
|
3
2
|
import { Stmt } from '../base/Stmt';
|
|
4
3
|
import { ArkClass } from './ArkClass';
|
|
5
4
|
import { FieldSignature } from './ArkSignature';
|
|
6
5
|
import { Type } from '../base/Type';
|
|
6
|
+
import { ArkBaseModel } from './ArkBaseModel';
|
|
7
|
+
import { ArkError } from '../common/ArkError';
|
|
7
8
|
export declare enum FieldCategory {
|
|
8
9
|
PROPERTY_DECLARATION = 0,
|
|
9
10
|
PROPERTY_ASSIGNMENT = 1,
|
|
@@ -17,11 +18,10 @@ export declare enum FieldCategory {
|
|
|
17
18
|
/**
|
|
18
19
|
* @category core/model
|
|
19
20
|
*/
|
|
20
|
-
export declare class ArkField {
|
|
21
|
+
export declare class ArkField extends ArkBaseModel {
|
|
21
22
|
private code;
|
|
22
23
|
private category;
|
|
23
24
|
private declaringClass;
|
|
24
|
-
private modifiers;
|
|
25
25
|
private questionToken;
|
|
26
26
|
private exclamationToken;
|
|
27
27
|
private fieldSignature;
|
|
@@ -30,31 +30,34 @@ export declare class ArkField {
|
|
|
30
30
|
constructor();
|
|
31
31
|
getDeclaringArkClass(): ArkClass;
|
|
32
32
|
setDeclaringArkClass(declaringClass: ArkClass): void;
|
|
33
|
+
/**
|
|
34
|
+
* Returns the codes of field as a **string.**
|
|
35
|
+
* @returns the codes of field.
|
|
36
|
+
*/
|
|
33
37
|
getCode(): string;
|
|
34
38
|
setCode(code: string): void;
|
|
35
39
|
getCategory(): FieldCategory;
|
|
36
40
|
setCategory(category: FieldCategory): void;
|
|
37
41
|
getName(): string;
|
|
38
42
|
getType(): Type;
|
|
39
|
-
getModifiers(): Set<string | Decorator>;
|
|
40
|
-
addModifier(modifier: string | Decorator): void;
|
|
41
43
|
getSignature(): FieldSignature;
|
|
42
44
|
setSignature(fieldSig: FieldSignature): void;
|
|
45
|
+
/**
|
|
46
|
+
* Returns an array of statements used for initialization.
|
|
47
|
+
* @returns An array of statements used for initialization.
|
|
48
|
+
*/
|
|
43
49
|
getInitializer(): Stmt[];
|
|
44
50
|
setInitializer(initializer: Stmt[]): void;
|
|
45
|
-
isStatic(): boolean;
|
|
46
|
-
isProtected(): boolean;
|
|
47
|
-
isPrivate(): boolean;
|
|
48
|
-
isPublic(): boolean;
|
|
49
|
-
isReadonly(): boolean;
|
|
50
51
|
setQuestionToken(questionToken: boolean): void;
|
|
51
52
|
setExclamationToken(exclamationToken: boolean): void;
|
|
52
53
|
getQuestionToken(): boolean;
|
|
53
54
|
getExclamationToken(): boolean;
|
|
54
55
|
setOriginPosition(position: LineColPosition): void;
|
|
56
|
+
/**
|
|
57
|
+
* Returns the original position of the field at source code.
|
|
58
|
+
* @returns The original position of the field at source code.
|
|
59
|
+
*/
|
|
55
60
|
getOriginPosition(): LineColPosition;
|
|
56
|
-
|
|
57
|
-
getStateDecorators(): Decorator[];
|
|
58
|
-
hasBuilderParamDecorator(): boolean;
|
|
61
|
+
validate(): ArkError;
|
|
59
62
|
}
|
|
60
63
|
//# sourceMappingURL=ArkField.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ArkField.d.ts","sourceRoot":"","sources":["../../../src/core/model/ArkField.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"ArkField.d.ts","sourceRoot":"","sources":["../../../src/core/model/ArkField.ts"],"names":[],"mappings":"AAeA,OAAO,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,QAAQ,EAAE,MAAM,oBAAoB,CAAC;AAG9C,oBAAY,aAAa;IACrB,oBAAoB,IAAI;IACxB,mBAAmB,IAAI;IACvB,8BAA8B,IAAI;IAClC,iBAAiB,IAAI;IACrB,kBAAkB,IAAI;IACtB,WAAW,IAAI;IACf,eAAe,IAAI;IACnB,YAAY,IAAI;CACnB;AAED;;GAEG;AACH,qBAAa,QAAS,SAAQ,YAAY;IACtC,OAAO,CAAC,IAAI,CAAc;IAC1B,OAAO,CAAC,QAAQ,CAAiB;IAEjC,OAAO,CAAC,cAAc,CAAY;IAClC,OAAO,CAAC,aAAa,CAAkB;IACvC,OAAO,CAAC,gBAAgB,CAAkB;IAE1C,OAAO,CAAC,cAAc,CAAkB;IACxC,OAAO,CAAC,cAAc,CAAC,CAAkB;IAEzC,OAAO,CAAC,WAAW,CAAc;;IAM1B,oBAAoB;IAIpB,oBAAoB,CAAC,cAAc,EAAE,QAAQ;IAIpD;;;OAGG;IACI,OAAO;IAIP,OAAO,CAAC,IAAI,EAAE,MAAM;IAIpB,WAAW,IAAI,aAAa;IAI5B,WAAW,CAAC,QAAQ,EAAE,aAAa,GAAG,IAAI;IAI1C,OAAO;IAIP,OAAO,IAAG,IAAI;IAId,YAAY,IAAI,cAAc;IAI9B,YAAY,CAAC,QAAQ,EAAE,cAAc;IAI5C;;;OAGG;IACI,cAAc,IAAI,IAAI,EAAE;IAIxB,cAAc,CAAC,WAAW,EAAE,IAAI,EAAE;IAIlC,gBAAgB,CAAC,aAAa,EAAE,OAAO;IAIvC,mBAAmB,CAAC,gBAAgB,EAAE,OAAO;IAI7C,gBAAgB;IAIhB,mBAAmB;IAInB,iBAAiB,CAAC,QAAQ,EAAE,eAAe;IAIlD;;;OAGG;IACI,iBAAiB,IAAI,eAAe;IAIpC,QAAQ,IAAI,QAAQ;CAG9B"}
|