ts2famix 1.0.12 → 1.0.14
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/.eslintrc.json +24 -24
- package/LICENSE +23 -23
- package/README.md +109 -109
- package/dist/analyze.js +107 -0
- package/dist/analyze_functions/processAccesses.js +55 -0
- package/dist/analyze_functions/processFiles.js +554 -0
- package/dist/analyze_functions/processImportClauses.js +70 -0
- package/dist/analyze_functions/processInheritances.js +73 -0
- package/dist/analyze_functions/processInvocations.js +49 -0
- package/dist/famix2puml.js +125 -0
- package/dist/famix_functions/famix_functions.js +520 -0
- package/dist/famix_functions/famix_functions_associations.js +213 -0
- package/dist/famix_functions/famix_functions_index.js +62 -0
- package/dist/famix_functions/famix_functions_types.js +114 -0
- package/dist/fqn.js +126 -0
- package/dist/lib/famix/src/famix_JSON_exporter.js +54 -0
- package/dist/lib/famix/src/famix_base_element.js +13 -0
- package/dist/lib/famix/src/famix_repository.js +187 -0
- package/dist/lib/famix/src/index.js +30 -0
- package/dist/lib/famix/src/model/famix/access.js +39 -0
- package/dist/lib/famix/src/model/famix/accessor.js +16 -0
- package/dist/lib/famix/src/model/famix/alias.js +32 -0
- package/dist/lib/famix/src/model/famix/association.js +36 -0
- package/dist/lib/famix/src/model/famix/behavioral_entity.js +81 -0
- package/dist/lib/famix/src/model/famix/c_source_language.js +16 -0
- package/dist/lib/famix/src/model/famix/class.js +70 -0
- package/dist/lib/famix/src/model/famix/comment.js +38 -0
- package/dist/lib/famix/src/model/famix/container_entity.js +125 -0
- package/dist/lib/famix/src/model/famix/custom_source_language.js +23 -0
- package/dist/lib/famix/src/model/famix/decorator.js +31 -0
- package/dist/lib/famix/src/model/famix/entity.js +16 -0
- package/dist/lib/famix/src/model/famix/enum.js +30 -0
- package/dist/lib/famix/src/model/famix/enum_value.js +24 -0
- package/dist/lib/famix/src/model/famix/function.js +16 -0
- package/dist/lib/famix/src/model/famix/implicit_variable.js +16 -0
- package/dist/lib/famix/src/model/famix/import_clause.js +39 -0
- package/dist/lib/famix/src/model/famix/index.js +87 -0
- package/dist/lib/famix/src/model/famix/indexed_file_anchor.js +37 -0
- package/dist/lib/famix/src/model/famix/inheritance.js +32 -0
- package/dist/lib/famix/src/model/famix/interface.js +63 -0
- package/dist/lib/famix/src/model/famix/invocation.js +53 -0
- package/dist/lib/famix/src/model/famix/method.js +66 -0
- package/dist/lib/famix/src/model/famix/module.js +30 -0
- package/dist/lib/famix/src/model/famix/named_entity.js +77 -0
- package/dist/lib/famix/src/model/famix/namespace.js +24 -0
- package/dist/lib/famix/src/model/famix/parameter.js +24 -0
- package/dist/lib/famix/src/model/famix/parameterizable_class.js +30 -0
- package/dist/lib/famix/src/model/famix/parameterizable_interface.js +30 -0
- package/dist/lib/famix/src/model/famix/parameterized_type.js +36 -0
- package/dist/lib/famix/src/model/famix/primitive_type.js +16 -0
- package/dist/lib/famix/src/model/famix/property.js +44 -0
- package/dist/lib/famix/src/model/famix/reference.js +32 -0
- package/dist/lib/famix/src/model/famix/scoping_entity.js +30 -0
- package/dist/lib/famix/src/model/famix/script_entity.js +30 -0
- package/dist/lib/famix/src/model/famix/source_anchor.js +26 -0
- package/dist/lib/famix/src/model/famix/source_language.js +30 -0
- package/dist/lib/famix/src/model/famix/sourced_entity.js +55 -0
- package/dist/lib/famix/src/model/famix/structural_entity.js +38 -0
- package/dist/lib/famix/src/model/famix/text_anchor.js +37 -0
- package/dist/lib/famix/src/model/famix/type.js +71 -0
- package/dist/lib/famix/src/model/famix/type_parameter.js +24 -0
- package/dist/lib/famix/src/model/famix/variable.js +23 -0
- package/dist/lib/ts-complex/cyclomatic-service.js +83 -0
- package/dist/ts2famix-cli.js +63 -0
- package/dist/ts2famix-tsconfig.js +53 -0
- package/jest.config-old.ts +199 -199
- package/package.json +47 -47
- package/src/analyze.ts +94 -94
- package/src/analyze_functions/processAccesses.ts +57 -57
- package/src/analyze_functions/processFiles.ts +669 -669
- package/src/analyze_functions/processImportClauses.ts +77 -77
- package/src/analyze_functions/processInheritances.ts +84 -84
- package/src/analyze_functions/processInvocations.ts +51 -51
- package/src/famix2puml.ts +119 -119
- package/src/famix_functions/famix_functions.ts +559 -559
- package/src/famix_functions/famix_functions_associations.ts +215 -215
- package/src/famix_functions/famix_functions_index.ts +44 -44
- package/src/famix_functions/famix_functions_types.ts +105 -105
- package/src/generate_uml.sh +16 -16
- package/src/lib/famix/License.md +22 -22
- package/src/lib/famix/package-lock.json +301 -301
- package/src/lib/famix/package.json +27 -27
- package/src/lib/famix/readme.md +4 -4
- package/src/lib/famix/src/famix_JSON_exporter.ts +56 -56
- package/src/lib/famix/src/famix_base_element.ts +18 -18
- package/src/lib/famix/src/famix_repository.ts +199 -199
- package/src/lib/famix/src/index.ts +8 -8
- package/src/lib/famix/src/model/famix/access.ts +53 -53
- package/src/lib/famix/src/model/famix/accessor.ts +15 -15
- package/src/lib/famix/src/model/famix/alias.ts +41 -41
- package/src/lib/famix/src/model/famix/association.ts +44 -44
- package/src/lib/famix/src/model/famix/behavioral_entity.ts +107 -107
- package/src/lib/famix/src/model/famix/c_source_language.ts +15 -15
- package/src/lib/famix/src/model/famix/class.ts +86 -86
- package/src/lib/famix/src/model/famix/comment.ts +50 -50
- package/src/lib/famix/src/model/famix/container_entity.ts +165 -165
- package/src/lib/famix/src/model/famix/custom_source_language.ts +27 -27
- package/src/lib/famix/src/model/famix/decorator.ts +39 -39
- package/src/lib/famix/src/model/famix/entity.ts +15 -15
- package/src/lib/famix/src/model/famix/enum.ts +31 -31
- package/src/lib/famix/src/model/famix/enum_value.ts +29 -29
- package/src/lib/famix/src/model/famix/function.ts +15 -15
- package/src/lib/famix/src/model/famix/implicit_variable.ts +15 -15
- package/src/lib/famix/src/model/famix/import_clause.ts +53 -53
- package/src/lib/famix/src/model/famix/index.ts +42 -42
- package/src/lib/famix/src/model/famix/indexed_file_anchor.ts +49 -49
- package/src/lib/famix/src/model/famix/inheritance.ts +42 -42
- package/src/lib/famix/src/model/famix/interface.ts +75 -75
- package/src/lib/famix/src/model/famix/invocation.ts +68 -68
- package/src/lib/famix/src/model/famix/method.ts +96 -96
- package/src/lib/famix/src/model/famix/module.ts +31 -31
- package/src/lib/famix/src/model/famix/named_entity.ts +98 -98
- package/src/lib/famix/src/model/famix/namespace.ts +28 -28
- package/src/lib/famix/src/model/famix/parameter.ts +29 -29
- package/src/lib/famix/src/model/famix/parameterizable_class.ts +31 -31
- package/src/lib/famix/src/model/famix/parameterizable_interface.ts +31 -31
- package/src/lib/famix/src/model/famix/parameterized_type.ts +40 -40
- package/src/lib/famix/src/model/famix/primitive_type.ts +15 -15
- package/src/lib/famix/src/model/famix/property.ts +54 -54
- package/src/lib/famix/src/model/famix/reference.ts +42 -42
- package/src/lib/famix/src/model/famix/scoping_entity.ts +31 -31
- package/src/lib/famix/src/model/famix/script_entity.ts +38 -38
- package/src/lib/famix/src/model/famix/source_anchor.ts +31 -31
- package/src/lib/famix/src/model/famix/source_language.ts +31 -31
- package/src/lib/famix/src/model/famix/sourced_entity.ts +70 -70
- package/src/lib/famix/src/model/famix/structural_entity.ts +44 -44
- package/src/lib/famix/src/model/famix/text_anchor.ts +49 -49
- package/src/lib/famix/src/model/famix/type.ts +88 -88
- package/src/lib/famix/src/model/famix/type_parameter.ts +33 -33
- package/src/lib/famix/src/model/famix/variable.ts +28 -28
- package/src/lib/famix/tsconfig.json +26 -26
- package/src/lib/famix/tslint.json +14 -14
- package/src/lib/ts-complex/cyclomatic-service.ts +85 -85
- package/src/ts2famix-cli.ts +39 -39
- package/tsconfig.json +69 -69
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Namespace = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const scoping_entity_1 = require("./scoping_entity");
|
|
6
|
+
class Namespace extends scoping_entity_1.ScopingEntity {
|
|
7
|
+
getParentScope() {
|
|
8
|
+
return this.parentScope;
|
|
9
|
+
}
|
|
10
|
+
setParentScope(parentScope) {
|
|
11
|
+
this.parentScope = parentScope;
|
|
12
|
+
parentScope.addNamespace(this);
|
|
13
|
+
}
|
|
14
|
+
getJSON() {
|
|
15
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("Namespace", this);
|
|
16
|
+
this.addPropertiesToExporter(mse);
|
|
17
|
+
return mse.getJSON();
|
|
18
|
+
}
|
|
19
|
+
addPropertiesToExporter(exporter) {
|
|
20
|
+
super.addPropertiesToExporter(exporter);
|
|
21
|
+
exporter.addProperty("parentScope", this.getParentScope());
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.Namespace = Namespace;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Parameter = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const structural_entity_1 = require("./structural_entity");
|
|
6
|
+
class Parameter extends structural_entity_1.StructuralEntity {
|
|
7
|
+
getParentEntity() {
|
|
8
|
+
return this.parentEntity;
|
|
9
|
+
}
|
|
10
|
+
setParentEntity(parentEntity) {
|
|
11
|
+
this.parentEntity = parentEntity;
|
|
12
|
+
parentEntity.addParameter(this);
|
|
13
|
+
}
|
|
14
|
+
getJSON() {
|
|
15
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("Parameter", this);
|
|
16
|
+
this.addPropertiesToExporter(mse);
|
|
17
|
+
return mse.getJSON();
|
|
18
|
+
}
|
|
19
|
+
addPropertiesToExporter(exporter) {
|
|
20
|
+
super.addPropertiesToExporter(exporter);
|
|
21
|
+
exporter.addProperty("parentEntity", this.getParentEntity());
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.Parameter = Parameter;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParameterizableClass = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const class_1 = require("./class");
|
|
6
|
+
class ParameterizableClass extends class_1.Class {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.typeParameters = new Set();
|
|
10
|
+
}
|
|
11
|
+
getTypeParameters() {
|
|
12
|
+
return this.typeParameters;
|
|
13
|
+
}
|
|
14
|
+
addTypeParameter(typeParameter) {
|
|
15
|
+
if (!this.typeParameters.has(typeParameter)) {
|
|
16
|
+
this.typeParameters.add(typeParameter);
|
|
17
|
+
typeParameter.setParentGeneric(this);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
getJSON() {
|
|
21
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("ParameterizableClass", this);
|
|
22
|
+
this.addPropertiesToExporter(mse);
|
|
23
|
+
return mse.getJSON();
|
|
24
|
+
}
|
|
25
|
+
addPropertiesToExporter(exporter) {
|
|
26
|
+
super.addPropertiesToExporter(exporter);
|
|
27
|
+
exporter.addProperty("typeParameters", this.getTypeParameters());
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.ParameterizableClass = ParameterizableClass;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParameterizableInterface = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const interface_1 = require("./interface");
|
|
6
|
+
class ParameterizableInterface extends interface_1.Interface {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.typeParameters = new Set();
|
|
10
|
+
}
|
|
11
|
+
getTypeParameters() {
|
|
12
|
+
return this.typeParameters;
|
|
13
|
+
}
|
|
14
|
+
addTypeParameter(typeParameter) {
|
|
15
|
+
if (!this.typeParameters.has(typeParameter)) {
|
|
16
|
+
this.typeParameters.add(typeParameter);
|
|
17
|
+
typeParameter.setParentGeneric(this);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
getJSON() {
|
|
21
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("ParameterizableInterface", this);
|
|
22
|
+
this.addPropertiesToExporter(mse);
|
|
23
|
+
return mse.getJSON();
|
|
24
|
+
}
|
|
25
|
+
addPropertiesToExporter(exporter) {
|
|
26
|
+
super.addPropertiesToExporter(exporter);
|
|
27
|
+
exporter.addProperty("typeParameters", this.getTypeParameters());
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.ParameterizableInterface = ParameterizableInterface;
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ParameterizedType = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const type_1 = require("./type");
|
|
6
|
+
class ParameterizedType extends type_1.Type {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.arguments = new Set();
|
|
10
|
+
}
|
|
11
|
+
getBaseType() {
|
|
12
|
+
return this.baseType;
|
|
13
|
+
}
|
|
14
|
+
setBaseType(baseType) {
|
|
15
|
+
this.baseType = baseType;
|
|
16
|
+
}
|
|
17
|
+
getArguments() {
|
|
18
|
+
return this.arguments;
|
|
19
|
+
}
|
|
20
|
+
addArgument(argument) {
|
|
21
|
+
if (!this.arguments.has(argument)) {
|
|
22
|
+
this.arguments.add(argument);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
getJSON() {
|
|
26
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("ParameterizedType", this);
|
|
27
|
+
this.addPropertiesToExporter(mse);
|
|
28
|
+
return mse.getJSON();
|
|
29
|
+
}
|
|
30
|
+
addPropertiesToExporter(exporter) {
|
|
31
|
+
super.addPropertiesToExporter(exporter);
|
|
32
|
+
exporter.addProperty("baseType", this.getBaseType());
|
|
33
|
+
exporter.addProperty("arguments", this.getArguments());
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
exports.ParameterizedType = ParameterizedType;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.PrimitiveType = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const type_1 = require("./type");
|
|
6
|
+
class PrimitiveType extends type_1.Type {
|
|
7
|
+
getJSON() {
|
|
8
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("PrimitiveType", this);
|
|
9
|
+
this.addPropertiesToExporter(mse);
|
|
10
|
+
return mse.getJSON();
|
|
11
|
+
}
|
|
12
|
+
addPropertiesToExporter(exporter) {
|
|
13
|
+
super.addPropertiesToExporter(exporter);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
exports.PrimitiveType = PrimitiveType;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Property = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const structural_entity_1 = require("./structural_entity");
|
|
6
|
+
class Property extends structural_entity_1.StructuralEntity {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.modifiers = new Set();
|
|
10
|
+
}
|
|
11
|
+
getIsClassSide() {
|
|
12
|
+
return this.isClassSide;
|
|
13
|
+
}
|
|
14
|
+
setIsClassSide(isClassSide) {
|
|
15
|
+
this.isClassSide = isClassSide;
|
|
16
|
+
}
|
|
17
|
+
getParentEntity() {
|
|
18
|
+
return this.parentEntity;
|
|
19
|
+
}
|
|
20
|
+
setParentEntity(parentEntity) {
|
|
21
|
+
this.parentEntity = parentEntity;
|
|
22
|
+
parentEntity.addProperty(this);
|
|
23
|
+
}
|
|
24
|
+
getModifiers() {
|
|
25
|
+
return this.modifiers;
|
|
26
|
+
}
|
|
27
|
+
addModifier(modifier) {
|
|
28
|
+
if (!this.modifiers.has(modifier)) {
|
|
29
|
+
this.modifiers.add(modifier);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
getJSON() {
|
|
33
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("Property", this);
|
|
34
|
+
this.addPropertiesToExporter(mse);
|
|
35
|
+
return mse.getJSON();
|
|
36
|
+
}
|
|
37
|
+
addPropertiesToExporter(exporter) {
|
|
38
|
+
super.addPropertiesToExporter(exporter);
|
|
39
|
+
exporter.addProperty("isClassSide", this.getIsClassSide());
|
|
40
|
+
exporter.addProperty("parentEntity", this.getParentEntity());
|
|
41
|
+
exporter.addProperty("modifiers", this.getModifiers());
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.Property = Property;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Reference = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const association_1 = require("./association");
|
|
6
|
+
class Reference extends association_1.Association {
|
|
7
|
+
getSource() {
|
|
8
|
+
return this.source;
|
|
9
|
+
}
|
|
10
|
+
setSource(source) {
|
|
11
|
+
this.source = source;
|
|
12
|
+
source.addOutgoingReference(this);
|
|
13
|
+
}
|
|
14
|
+
getTarget() {
|
|
15
|
+
return this.target;
|
|
16
|
+
}
|
|
17
|
+
setTarget(target) {
|
|
18
|
+
this.target = target;
|
|
19
|
+
target.addIncomingReference(this);
|
|
20
|
+
}
|
|
21
|
+
getJSON() {
|
|
22
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("Reference", this);
|
|
23
|
+
this.addPropertiesToExporter(mse);
|
|
24
|
+
return mse.getJSON();
|
|
25
|
+
}
|
|
26
|
+
addPropertiesToExporter(exporter) {
|
|
27
|
+
super.addPropertiesToExporter(exporter);
|
|
28
|
+
exporter.addProperty("source", this.getSource());
|
|
29
|
+
exporter.addProperty("target", this.getTarget());
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
exports.Reference = Reference;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScopingEntity = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const container_entity_1 = require("./container_entity");
|
|
6
|
+
class ScopingEntity extends container_entity_1.ContainerEntity {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.childrenNamespaces = new Set();
|
|
10
|
+
}
|
|
11
|
+
getNamespaces() {
|
|
12
|
+
return this.childrenNamespaces;
|
|
13
|
+
}
|
|
14
|
+
addNamespace(childNamespace) {
|
|
15
|
+
if (!this.childrenNamespaces.has(childNamespace)) {
|
|
16
|
+
this.childrenNamespaces.add(childNamespace);
|
|
17
|
+
childNamespace.setParentScope(this);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
getJSON() {
|
|
21
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("ScopingEntity", this);
|
|
22
|
+
this.addPropertiesToExporter(mse);
|
|
23
|
+
return mse.getJSON();
|
|
24
|
+
}
|
|
25
|
+
addPropertiesToExporter(exporter) {
|
|
26
|
+
super.addPropertiesToExporter(exporter);
|
|
27
|
+
exporter.addProperty("namespaces", this.getNamespaces());
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.ScopingEntity = ScopingEntity;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ScriptEntity = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const scoping_entity_1 = require("./scoping_entity");
|
|
6
|
+
class ScriptEntity extends scoping_entity_1.ScopingEntity {
|
|
7
|
+
getNumberOfLinesOfText() {
|
|
8
|
+
return this.numberOfLinesOfText;
|
|
9
|
+
}
|
|
10
|
+
setNumberOfLinesOfText(numberOfLinesOfText) {
|
|
11
|
+
this.numberOfLinesOfText = numberOfLinesOfText;
|
|
12
|
+
}
|
|
13
|
+
getNumberOfCharacters() {
|
|
14
|
+
return this.numberOfCharacters;
|
|
15
|
+
}
|
|
16
|
+
setNumberOfCharacters(numberOfCharacters) {
|
|
17
|
+
this.numberOfCharacters = numberOfCharacters;
|
|
18
|
+
}
|
|
19
|
+
getJSON() {
|
|
20
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("ScriptEntity", this);
|
|
21
|
+
this.addPropertiesToExporter(mse);
|
|
22
|
+
return mse.getJSON();
|
|
23
|
+
}
|
|
24
|
+
addPropertiesToExporter(exporter) {
|
|
25
|
+
super.addPropertiesToExporter(exporter);
|
|
26
|
+
exporter.addProperty("numberOfLinesOfText", this.getNumberOfLinesOfText());
|
|
27
|
+
exporter.addProperty("numberOfCharacters", this.getNumberOfCharacters());
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.ScriptEntity = ScriptEntity;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SourceAnchor = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const entity_1 = require("./entity");
|
|
6
|
+
class SourceAnchor extends entity_1.Entity {
|
|
7
|
+
getElement() {
|
|
8
|
+
return this.element;
|
|
9
|
+
}
|
|
10
|
+
setElement(element) {
|
|
11
|
+
if (this.element === undefined) {
|
|
12
|
+
this.element = element;
|
|
13
|
+
element.setSourceAnchor(this);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
getJSON() {
|
|
17
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("SourceAnchor", this);
|
|
18
|
+
this.addPropertiesToExporter(mse);
|
|
19
|
+
return mse.getJSON();
|
|
20
|
+
}
|
|
21
|
+
addPropertiesToExporter(exporter) {
|
|
22
|
+
super.addPropertiesToExporter(exporter);
|
|
23
|
+
exporter.addProperty("element", this.getElement());
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
exports.SourceAnchor = SourceAnchor;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SourceLanguage = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const entity_1 = require("./entity");
|
|
6
|
+
class SourceLanguage extends entity_1.Entity {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.sourcedEntities = new Set();
|
|
10
|
+
}
|
|
11
|
+
getSourcedEntities() {
|
|
12
|
+
return this.sourcedEntities;
|
|
13
|
+
}
|
|
14
|
+
addSourcedEntity(sourcedEntity) {
|
|
15
|
+
if (!this.sourcedEntities.has(sourcedEntity)) {
|
|
16
|
+
this.sourcedEntities.add(sourcedEntity);
|
|
17
|
+
sourcedEntity.setDeclaredSourceLanguage(this);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
getJSON() {
|
|
21
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("SourceLanguage", this);
|
|
22
|
+
this.addPropertiesToExporter(mse);
|
|
23
|
+
return mse.getJSON();
|
|
24
|
+
}
|
|
25
|
+
addPropertiesToExporter(exporter) {
|
|
26
|
+
super.addPropertiesToExporter(exporter);
|
|
27
|
+
exporter.addProperty("sourcedEntities", this.getSourcedEntities());
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.SourceLanguage = SourceLanguage;
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SourcedEntity = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const entity_1 = require("./entity");
|
|
6
|
+
class SourcedEntity extends entity_1.Entity {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.comments = new Set();
|
|
10
|
+
}
|
|
11
|
+
getIsStub() {
|
|
12
|
+
return this.isStub;
|
|
13
|
+
}
|
|
14
|
+
setIsStub(isStub) {
|
|
15
|
+
this.isStub = isStub;
|
|
16
|
+
}
|
|
17
|
+
getSourceAnchor() {
|
|
18
|
+
return this.sourceAnchor;
|
|
19
|
+
}
|
|
20
|
+
setSourceAnchor(sourceAnchor) {
|
|
21
|
+
if (this.sourceAnchor === undefined) {
|
|
22
|
+
this.sourceAnchor = sourceAnchor;
|
|
23
|
+
sourceAnchor.setElement(this);
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
getComments() {
|
|
27
|
+
return this.comments;
|
|
28
|
+
}
|
|
29
|
+
addComment(comment) {
|
|
30
|
+
if (!this.comments.has(comment)) {
|
|
31
|
+
this.comments.add(comment);
|
|
32
|
+
comment.setContainer(this);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
getDeclaredSourceLanguage() {
|
|
36
|
+
return this.declaredSourceLanguage;
|
|
37
|
+
}
|
|
38
|
+
setDeclaredSourceLanguage(declaredSourceLanguage) {
|
|
39
|
+
this.declaredSourceLanguage = declaredSourceLanguage;
|
|
40
|
+
declaredSourceLanguage.addSourcedEntity(this);
|
|
41
|
+
}
|
|
42
|
+
getJSON() {
|
|
43
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("SourcedEntity", this);
|
|
44
|
+
this.addPropertiesToExporter(mse);
|
|
45
|
+
return mse.getJSON();
|
|
46
|
+
}
|
|
47
|
+
addPropertiesToExporter(exporter) {
|
|
48
|
+
super.addPropertiesToExporter(exporter);
|
|
49
|
+
exporter.addProperty("isStub", this.getIsStub());
|
|
50
|
+
exporter.addProperty("sourceAnchor", this.getSourceAnchor());
|
|
51
|
+
exporter.addProperty("comments", this.getComments());
|
|
52
|
+
exporter.addProperty("declaredSourceLanguage", this.getDeclaredSourceLanguage());
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
exports.SourcedEntity = SourcedEntity;
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.StructuralEntity = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const named_entity_1 = require("./named_entity");
|
|
6
|
+
class StructuralEntity extends named_entity_1.NamedEntity {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.incomingAccesses = new Set();
|
|
10
|
+
}
|
|
11
|
+
getIncomingAccesses() {
|
|
12
|
+
return this.incomingAccesses;
|
|
13
|
+
}
|
|
14
|
+
addIncomingAccess(incomingAccess) {
|
|
15
|
+
if (!this.incomingAccesses.has(incomingAccess)) {
|
|
16
|
+
this.incomingAccesses.add(incomingAccess);
|
|
17
|
+
incomingAccess.setVariable(this);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
getDeclaredType() {
|
|
21
|
+
return this.declaredType;
|
|
22
|
+
}
|
|
23
|
+
setDeclaredType(declaredType) {
|
|
24
|
+
this.declaredType = declaredType;
|
|
25
|
+
declaredType.addStructureWithDeclaredType(this);
|
|
26
|
+
}
|
|
27
|
+
getJSON() {
|
|
28
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("StructuralEntity", this);
|
|
29
|
+
this.addPropertiesToExporter(mse);
|
|
30
|
+
return mse.getJSON();
|
|
31
|
+
}
|
|
32
|
+
addPropertiesToExporter(exporter) {
|
|
33
|
+
super.addPropertiesToExporter(exporter);
|
|
34
|
+
exporter.addProperty("incomingAccesses", this.getIncomingAccesses());
|
|
35
|
+
exporter.addProperty("declaredType", this.getDeclaredType());
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.StructuralEntity = StructuralEntity;
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TextAnchor = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const source_anchor_1 = require("./source_anchor");
|
|
6
|
+
class TextAnchor extends source_anchor_1.SourceAnchor {
|
|
7
|
+
getStartPos() {
|
|
8
|
+
return this.startPos;
|
|
9
|
+
}
|
|
10
|
+
setStartPos(startPos) {
|
|
11
|
+
this.startPos = startPos;
|
|
12
|
+
}
|
|
13
|
+
getEndPos() {
|
|
14
|
+
return this.endPos;
|
|
15
|
+
}
|
|
16
|
+
setEndPos(endPos) {
|
|
17
|
+
this.endPos = endPos;
|
|
18
|
+
}
|
|
19
|
+
getFileName() {
|
|
20
|
+
return this.fileName;
|
|
21
|
+
}
|
|
22
|
+
setFileName(fileName) {
|
|
23
|
+
this.fileName = fileName;
|
|
24
|
+
}
|
|
25
|
+
getJSON() {
|
|
26
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("TextAnchor", this);
|
|
27
|
+
this.addPropertiesToExporter(mse);
|
|
28
|
+
return mse.getJSON();
|
|
29
|
+
}
|
|
30
|
+
addPropertiesToExporter(exporter) {
|
|
31
|
+
super.addPropertiesToExporter(exporter);
|
|
32
|
+
exporter.addProperty("startPos", this.getStartPos());
|
|
33
|
+
exporter.addProperty("endPos", this.getEndPos());
|
|
34
|
+
exporter.addProperty("fileName", this.getFileName());
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.TextAnchor = TextAnchor;
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Type = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const container_entity_1 = require("./container_entity");
|
|
6
|
+
class Type extends container_entity_1.ContainerEntity {
|
|
7
|
+
constructor() {
|
|
8
|
+
super(...arguments);
|
|
9
|
+
this.typeAliases = new Set();
|
|
10
|
+
this.structuresWithDeclaredType = new Set();
|
|
11
|
+
this.behavioralEntitiesWithDeclaredType = new Set();
|
|
12
|
+
this.incomingReferences = new Set();
|
|
13
|
+
}
|
|
14
|
+
getContainer() {
|
|
15
|
+
return this.container;
|
|
16
|
+
}
|
|
17
|
+
setContainer(container) {
|
|
18
|
+
this.container = container;
|
|
19
|
+
container.addType(this);
|
|
20
|
+
}
|
|
21
|
+
getTypeAliases() {
|
|
22
|
+
return this.typeAliases;
|
|
23
|
+
}
|
|
24
|
+
addTypeAlias(typeAlias) {
|
|
25
|
+
if (!this.typeAliases.has(typeAlias)) {
|
|
26
|
+
this.typeAliases.add(typeAlias);
|
|
27
|
+
typeAlias.setAliasedEntity(this);
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
getStructuresWithDeclaredType() {
|
|
31
|
+
return this.structuresWithDeclaredType;
|
|
32
|
+
}
|
|
33
|
+
addStructureWithDeclaredType(structureWithDeclaredType) {
|
|
34
|
+
if (!this.structuresWithDeclaredType.has(structureWithDeclaredType)) {
|
|
35
|
+
this.structuresWithDeclaredType.add(structureWithDeclaredType);
|
|
36
|
+
structureWithDeclaredType.setDeclaredType(this);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
getBehavioralEntitiesWithDeclaredType() {
|
|
40
|
+
return this.behavioralEntitiesWithDeclaredType;
|
|
41
|
+
}
|
|
42
|
+
addBehavioralEntityWithDeclaredType(behavioralEntityWithDeclaredType) {
|
|
43
|
+
if (!this.behavioralEntitiesWithDeclaredType.has(behavioralEntityWithDeclaredType)) {
|
|
44
|
+
this.behavioralEntitiesWithDeclaredType.add(behavioralEntityWithDeclaredType);
|
|
45
|
+
behavioralEntityWithDeclaredType.setDeclaredType(this);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
getIncomingReferences() {
|
|
49
|
+
return this.incomingReferences;
|
|
50
|
+
}
|
|
51
|
+
addIncomingReference(incomingReference) {
|
|
52
|
+
if (!this.incomingReferences.has(incomingReference)) {
|
|
53
|
+
this.incomingReferences.add(incomingReference);
|
|
54
|
+
incomingReference.setTarget(this);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
getJSON() {
|
|
58
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("Type", this);
|
|
59
|
+
this.addPropertiesToExporter(mse);
|
|
60
|
+
return mse.getJSON();
|
|
61
|
+
}
|
|
62
|
+
addPropertiesToExporter(exporter) {
|
|
63
|
+
super.addPropertiesToExporter(exporter);
|
|
64
|
+
exporter.addProperty("container", this.getContainer());
|
|
65
|
+
exporter.addProperty("typeAliases", this.getTypeAliases());
|
|
66
|
+
exporter.addProperty("structuresWithDeclaredType", this.getStructuresWithDeclaredType());
|
|
67
|
+
exporter.addProperty("behavioralEntitiesWithDeclaredType", this.getBehavioralEntitiesWithDeclaredType());
|
|
68
|
+
exporter.addProperty("incomingReferences", this.getIncomingReferences());
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
exports.Type = Type;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.TypeParameter = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const type_1 = require("./type");
|
|
6
|
+
class TypeParameter extends type_1.Type {
|
|
7
|
+
getParentGeneric() {
|
|
8
|
+
return this.parentGeneric;
|
|
9
|
+
}
|
|
10
|
+
setParentGeneric(parentGeneric) {
|
|
11
|
+
this.parentGeneric = parentGeneric;
|
|
12
|
+
parentGeneric.addTypeParameter(this);
|
|
13
|
+
}
|
|
14
|
+
getJSON() {
|
|
15
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("TypeParameter", this);
|
|
16
|
+
this.addPropertiesToExporter(mse);
|
|
17
|
+
return mse.getJSON();
|
|
18
|
+
}
|
|
19
|
+
addPropertiesToExporter(exporter) {
|
|
20
|
+
super.addPropertiesToExporter(exporter);
|
|
21
|
+
exporter.addProperty("parentGeneric", this.getParentGeneric());
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
exports.TypeParameter = TypeParameter;
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.Variable = void 0;
|
|
4
|
+
const famix_JSON_exporter_1 = require("../../famix_JSON_exporter");
|
|
5
|
+
const structural_entity_1 = require("./structural_entity");
|
|
6
|
+
class Variable extends structural_entity_1.StructuralEntity {
|
|
7
|
+
getParentContainerEntity() {
|
|
8
|
+
return this.parentContainerEntity;
|
|
9
|
+
}
|
|
10
|
+
setParentContainerEntity(parentContainerEntity) {
|
|
11
|
+
this.parentContainerEntity = parentContainerEntity;
|
|
12
|
+
}
|
|
13
|
+
getJSON() {
|
|
14
|
+
const mse = new famix_JSON_exporter_1.FamixJSONExporter("Variable", this);
|
|
15
|
+
this.addPropertiesToExporter(mse);
|
|
16
|
+
return mse.getJSON();
|
|
17
|
+
}
|
|
18
|
+
addPropertiesToExporter(exporter) {
|
|
19
|
+
super.addPropertiesToExporter(exporter);
|
|
20
|
+
exporter.addProperty("parentContainerEntity", this.getParentContainerEntity());
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
exports.Variable = Variable;
|