ts2famix 2.0.3 → 2.1.0-beta.2
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/.vscode/settings.json +4 -0
- package/LICENSE +24 -24
- package/README.md +78 -78
- package/TODO +1 -0
- package/arwea-fix.json +1 -0
- package/bogus.ts +3 -0
- package/class-diagram.puml +792 -0
- package/debug.txt +13332 -0
- package/debuglog.txt +12073 -0
- package/dist/analyze.js +19 -9
- package/dist/analyze_functions/process_functions.js +101 -71
- package/dist/famix2puml.js +126 -0
- package/dist/famix_functions/EntityDictionary.js +881 -509
- package/dist/famix_functions/helpers_creation.js +18 -8
- package/dist/fqn.js +44 -11
- package/dist/getClasses-arrow-body.js +43 -0
- package/dist/lib/famix/famix_JSON_exporter.js +1 -1
- package/dist/lib/famix/famix_base_element.js +1 -1
- package/dist/lib/famix/famix_repository.js +67 -2
- package/dist/lib/famix/index.js +18 -8
- package/dist/lib/famix/model/famix/access.js +1 -1
- package/dist/lib/famix/model/famix/accessor.js +1 -1
- package/dist/lib/famix/model/famix/alias.js +1 -1
- package/dist/lib/famix/model/famix/arrow_function.js +1 -1
- package/dist/lib/famix/model/famix/behavioral_entity.js +1 -1
- package/dist/lib/famix/model/famix/class.js +1 -1
- package/dist/lib/famix/model/famix/comment.js +1 -1
- package/dist/lib/famix/model/famix/concretisation.js +1 -1
- package/dist/lib/famix/model/famix/container_entity.js +1 -1
- package/dist/lib/famix/model/famix/decorator.js +1 -1
- package/dist/lib/famix/model/famix/entity.js +1 -1
- package/dist/lib/famix/model/famix/enum.js +1 -1
- package/dist/lib/famix/model/famix/enum_value.js +1 -1
- package/dist/lib/famix/model/famix/function.js +1 -1
- package/dist/lib/famix/model/famix/import_clause.js +1 -1
- package/dist/lib/famix/model/famix/index.js +1 -1
- package/dist/lib/famix/model/famix/indexed_file_anchor.js +1 -1
- package/dist/lib/famix/model/famix/inheritance.js +1 -1
- package/dist/lib/famix/model/famix/interface.js +1 -1
- package/dist/lib/famix/model/famix/invocation.js +1 -1
- package/dist/lib/famix/model/famix/method.js +1 -1
- package/dist/lib/famix/model/famix/module.js +1 -1
- package/dist/lib/famix/model/famix/named_entity.js +1 -1
- package/dist/lib/famix/model/famix/parameter.js +1 -1
- package/dist/lib/famix/model/famix/parameter_concretisation.js +1 -1
- package/dist/lib/famix/model/famix/parameter_type.js +1 -1
- package/dist/lib/famix/model/famix/parametric_arrow_function.js +1 -1
- package/dist/lib/famix/model/famix/parametric_class.js +1 -1
- package/dist/lib/famix/model/famix/parametric_function.js +1 -1
- package/dist/lib/famix/model/famix/parametric_interface.js +1 -1
- package/dist/lib/famix/model/famix/parametric_method.js +1 -1
- package/dist/lib/famix/model/famix/primitive_type.js +1 -1
- package/dist/lib/famix/model/famix/property.js +1 -1
- package/dist/lib/famix/model/famix/reference.js +1 -1
- package/dist/lib/famix/model/famix/scoping_entity.js +1 -1
- package/dist/lib/famix/model/famix/script_entity.js +1 -1
- package/dist/lib/famix/model/famix/source_anchor.js +1 -1
- package/dist/lib/famix/model/famix/source_language.js +1 -1
- package/dist/lib/famix/model/famix/sourced_entity.js +1 -1
- package/dist/lib/famix/model/famix/structural_entity.js +1 -1
- package/dist/lib/famix/model/famix/type.js +1 -1
- package/dist/lib/famix/model/famix/variable.js +1 -1
- package/dist/lib/famix/src/famix_JSON_exporter.js +55 -0
- package/dist/lib/famix/src/famix_base_element.js +18 -0
- package/dist/lib/famix/src/famix_repository.js +224 -0
- package/dist/lib/famix/src/index.js +31 -0
- package/dist/lib/famix/src/model/famix/access.js +40 -0
- package/dist/lib/famix/src/model/famix/accessor.js +17 -0
- package/dist/lib/famix/src/model/famix/alias.js +33 -0
- package/dist/lib/famix/src/model/famix/arrowFunction.js +17 -0
- package/dist/lib/famix/src/model/famix/arrow_function.js +17 -0
- package/dist/lib/famix/src/model/famix/behavioral_entity.js +79 -0
- package/dist/lib/famix/src/model/famix/class.js +71 -0
- package/dist/lib/famix/src/model/famix/comment.js +39 -0
- package/dist/lib/famix/src/model/famix/concretisation.js +31 -0
- package/dist/lib/famix/src/model/famix/container_entity.js +126 -0
- package/dist/lib/famix/src/model/famix/decorator.js +32 -0
- package/dist/lib/famix/src/model/famix/entity.js +17 -0
- package/dist/lib/famix/src/model/famix/enum.js +31 -0
- package/dist/lib/famix/src/model/famix/enum_value.js +25 -0
- package/dist/lib/famix/src/model/famix/function.js +17 -0
- package/dist/lib/famix/src/model/famix/implicit_variable.js +17 -0
- package/dist/lib/famix/src/model/famix/import_clause.js +41 -0
- package/dist/lib/famix/src/model/famix/index.js +86 -0
- package/dist/lib/famix/src/model/famix/indexed_file_anchor.js +38 -0
- package/dist/lib/famix/src/model/famix/inheritance.js +33 -0
- package/dist/lib/famix/src/model/famix/interface.js +64 -0
- package/dist/lib/famix/src/model/famix/invocation.js +54 -0
- package/dist/lib/famix/src/model/famix/method.js +67 -0
- package/dist/lib/famix/src/model/famix/module.js +60 -0
- package/dist/lib/famix/src/model/famix/named_entity.js +78 -0
- package/dist/lib/famix/src/model/famix/parameter.js +25 -0
- package/dist/lib/famix/src/model/famix/parameterConcretisation.js +44 -0
- package/dist/lib/famix/src/model/famix/parameter_concretisation.js +44 -0
- package/dist/lib/famix/src/model/famix/parameter_type.js +45 -0
- package/dist/lib/famix/src/model/famix/parametricArrowFunction.js +29 -0
- package/dist/lib/famix/src/model/famix/parametric_arrow_function.js +31 -0
- package/dist/lib/famix/src/model/famix/parametric_class.js +44 -0
- package/dist/lib/famix/src/model/famix/parametric_function.js +31 -0
- package/dist/lib/famix/src/model/famix/parametric_interface.js +44 -0
- package/dist/lib/famix/src/model/famix/parametric_method.js +31 -0
- package/dist/lib/famix/src/model/famix/primitive_type.js +17 -0
- package/dist/lib/famix/src/model/famix/property.js +73 -0
- package/dist/lib/famix/src/model/famix/reference.js +33 -0
- package/dist/lib/famix/src/model/famix/scoping_entity.js +36 -0
- package/dist/lib/famix/src/model/famix/script_entity.js +29 -0
- package/dist/lib/famix/src/model/famix/source_anchor.js +27 -0
- package/dist/lib/famix/src/model/famix/source_language.js +35 -0
- package/dist/lib/famix/src/model/famix/sourced_entity.js +60 -0
- package/dist/lib/famix/src/model/famix/structural_entity.js +39 -0
- package/dist/lib/famix/src/model/famix/text_anchor.js +38 -0
- package/dist/lib/famix/src/model/famix/type.js +73 -0
- package/dist/lib/famix/src/model/famix/variable.js +24 -0
- package/dist/lib/ts-complex/cyclomatic-service.js +1 -1
- package/dist/refactorer/refactor-getter-setter.js +18 -8
- package/dist/ts2famix-cli-wrapper.js +18 -8
- package/dist/ts2famix-cli.js +18 -8
- package/dist/ts2famix-tsconfig.js +18 -8
- package/doc-uml/famix-typescript-model.puml +607 -607
- package/eslint.config.mjs +28 -0
- package/fqn-model.json +1 -0
- package/iterateGenericTypes.ts +69 -0
- package/out/class-diagram/class-diagram.svg +1 -0
- package/package.json +70 -66
- package/sample.json +1 -0
- package/sample.ts +1 -0
- package/src/analyze.ts +120 -120
- package/src/analyze_functions/process_functions.ts +1040 -1019
- package/src/famix_functions/EntityDictionary.ts +2016 -1593
- package/src/famix_functions/helpers_creation.ts +135 -135
- package/src/fqn.ts +50 -16
- package/src/generate_uml.sh +20 -20
- package/src/lib/famix/License.md +22 -22
- package/src/lib/famix/famix_JSON_exporter.ts +56 -56
- package/src/lib/famix/famix_base_element.ts +22 -22
- package/src/lib/famix/famix_repository.ts +278 -243
- package/src/lib/famix/index.ts +8 -8
- package/src/lib/famix/model/famix/access.ts +50 -50
- package/src/lib/famix/model/famix/accessor.ts +15 -15
- package/src/lib/famix/model/famix/alias.ts +39 -39
- package/src/lib/famix/model/famix/arrow_function.ts +15 -15
- package/src/lib/famix/model/famix/behavioral_entity.ts +97 -97
- package/src/lib/famix/model/famix/class.ts +85 -85
- package/src/lib/famix/model/famix/comment.ts +47 -47
- package/src/lib/famix/model/famix/concretisation.ts +40 -40
- package/src/lib/famix/model/famix/container_entity.ts +160 -160
- package/src/lib/famix/model/famix/decorator.ts +37 -37
- package/src/lib/famix/model/famix/entity.ts +15 -15
- package/src/lib/famix/model/famix/enum.ts +30 -30
- package/src/lib/famix/model/famix/enum_value.ts +28 -28
- package/src/lib/famix/model/famix/function.ts +15 -15
- package/src/lib/famix/model/famix/import_clause.ts +51 -51
- package/src/lib/famix/model/famix/index.ts +41 -41
- package/src/lib/famix/model/famix/indexed_file_anchor.ts +46 -46
- package/src/lib/famix/model/famix/inheritance.ts +40 -40
- package/src/lib/famix/model/famix/interface.ts +75 -75
- package/src/lib/famix/model/famix/invocation.ts +65 -65
- package/src/lib/famix/model/famix/method.ts +89 -89
- package/src/lib/famix/model/famix/module.ts +71 -71
- package/src/lib/famix/model/famix/named_entity.ts +95 -95
- package/src/lib/famix/model/famix/parameter.ts +28 -28
- package/src/lib/famix/model/famix/parameter_concretisation.ts +51 -51
- package/src/lib/famix/model/famix/parameter_type.ts +58 -58
- package/src/lib/famix/model/famix/parametric_arrow_function.ts +32 -32
- package/src/lib/famix/model/famix/parametric_class.ts +49 -49
- package/src/lib/famix/model/famix/parametric_function.ts +32 -32
- package/src/lib/famix/model/famix/parametric_interface.ts +49 -49
- package/src/lib/famix/model/famix/parametric_method.ts +32 -32
- package/src/lib/famix/model/famix/primitive_type.ts +15 -15
- package/src/lib/famix/model/famix/property.ts +94 -94
- package/src/lib/famix/model/famix/reference.ts +40 -40
- package/src/lib/famix/model/famix/scoping_entity.ts +35 -35
- package/src/lib/famix/model/famix/script_entity.ts +34 -34
- package/src/lib/famix/model/famix/source_anchor.ts +30 -30
- package/src/lib/famix/model/famix/source_language.ts +35 -35
- package/src/lib/famix/model/famix/sourced_entity.ts +70 -70
- package/src/lib/famix/model/famix/structural_entity.ts +43 -43
- package/src/lib/famix/model/famix/type.ts +87 -87
- package/src/lib/famix/model/famix/variable.ts +27 -27
- package/src/lib/famix/package.json +28 -28
- package/src/lib/ts-complex/cyclomatic-service.ts +83 -83
- package/src/refactorer/refactor-getter-setter.ts +140 -140
- package/src/ts2famix-cli-wrapper.ts +21 -21
- package/src/ts2famix-cli.ts +60 -60
- package/stats.txt +3091 -0
- package/tabby-debug-output.txt +19433 -0
- package/ts2famix.log +22656 -0
- package/tsconfig.check-tests.json +14 -14
- package/tsconfig.json +72 -72
- package/validate-references.js +103 -0
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { StructuralEntity } from "./structural_entity";
|
|
3
|
-
import { ContainerEntity } from "./container_entity";
|
|
4
|
-
import { Entity } from "./entity";
|
|
5
|
-
|
|
6
|
-
export class Access extends Entity {
|
|
7
|
-
|
|
8
|
-
private _accessor!: ContainerEntity;
|
|
9
|
-
private _variable!: StructuralEntity;
|
|
10
|
-
private _isWrite!: boolean;
|
|
11
|
-
|
|
12
|
-
public getJSON(): string {
|
|
13
|
-
const json: FamixJSONExporter = new FamixJSONExporter("Access", this);
|
|
14
|
-
this.addPropertiesToExporter(json);
|
|
15
|
-
return json.getJSON();
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
19
|
-
super.addPropertiesToExporter(exporter);
|
|
20
|
-
exporter.addProperty("accessor", this.accessor);
|
|
21
|
-
exporter.addProperty("variable", this.variable);
|
|
22
|
-
exporter.addProperty("isWrite", this.isWrite);
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
get accessor(): ContainerEntity {
|
|
26
|
-
return this._accessor;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
set accessor(accessor: ContainerEntity) {
|
|
30
|
-
this._accessor = accessor;
|
|
31
|
-
accessor.addAccess(this);
|
|
32
|
-
}
|
|
33
|
-
|
|
34
|
-
get variable(): StructuralEntity {
|
|
35
|
-
return this._variable;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
set variable(variable: StructuralEntity) {
|
|
39
|
-
this._variable = variable;
|
|
40
|
-
variable.addIncomingAccess(this);
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
get isWrite(): boolean {
|
|
44
|
-
return this._isWrite;
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
set isWrite(isWrite: boolean) {
|
|
48
|
-
this._isWrite = isWrite;
|
|
49
|
-
}
|
|
50
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { StructuralEntity } from "./structural_entity";
|
|
3
|
+
import { ContainerEntity } from "./container_entity";
|
|
4
|
+
import { Entity } from "./entity";
|
|
5
|
+
|
|
6
|
+
export class Access extends Entity {
|
|
7
|
+
|
|
8
|
+
private _accessor!: ContainerEntity;
|
|
9
|
+
private _variable!: StructuralEntity;
|
|
10
|
+
private _isWrite!: boolean;
|
|
11
|
+
|
|
12
|
+
public getJSON(): string {
|
|
13
|
+
const json: FamixJSONExporter = new FamixJSONExporter("Access", this);
|
|
14
|
+
this.addPropertiesToExporter(json);
|
|
15
|
+
return json.getJSON();
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
19
|
+
super.addPropertiesToExporter(exporter);
|
|
20
|
+
exporter.addProperty("accessor", this.accessor);
|
|
21
|
+
exporter.addProperty("variable", this.variable);
|
|
22
|
+
exporter.addProperty("isWrite", this.isWrite);
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
get accessor(): ContainerEntity {
|
|
26
|
+
return this._accessor;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
set accessor(accessor: ContainerEntity) {
|
|
30
|
+
this._accessor = accessor;
|
|
31
|
+
accessor.addAccess(this);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
get variable(): StructuralEntity {
|
|
35
|
+
return this._variable;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
set variable(variable: StructuralEntity) {
|
|
39
|
+
this._variable = variable;
|
|
40
|
+
variable.addIncomingAccess(this);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
get isWrite(): boolean {
|
|
44
|
+
return this._isWrite;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
set isWrite(isWrite: boolean) {
|
|
48
|
+
this._isWrite = isWrite;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { Method } from "./method";
|
|
3
|
-
|
|
4
|
-
export class Accessor extends Method {
|
|
5
|
-
|
|
6
|
-
public getJSON(): string {
|
|
7
|
-
const json: FamixJSONExporter = new FamixJSONExporter("Accessor", this);
|
|
8
|
-
this.addPropertiesToExporter(json);
|
|
9
|
-
return json.getJSON();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
13
|
-
super.addPropertiesToExporter(exporter);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { Method } from "./method";
|
|
3
|
+
|
|
4
|
+
export class Accessor extends Method {
|
|
5
|
+
|
|
6
|
+
public getJSON(): string {
|
|
7
|
+
const json: FamixJSONExporter = new FamixJSONExporter("Accessor", this);
|
|
8
|
+
this.addPropertiesToExporter(json);
|
|
9
|
+
return json.getJSON();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
13
|
+
super.addPropertiesToExporter(exporter);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,39 +1,39 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { NamedEntity } from "./named_entity";
|
|
3
|
-
import { Type } from "./type";
|
|
4
|
-
|
|
5
|
-
export class Alias extends NamedEntity {
|
|
6
|
-
|
|
7
|
-
private _parentEntity!: NamedEntity;
|
|
8
|
-
private _aliasedEntity!: Type;
|
|
9
|
-
|
|
10
|
-
public getJSON(): string {
|
|
11
|
-
const json: FamixJSONExporter = new FamixJSONExporter("Alias", this);
|
|
12
|
-
this.addPropertiesToExporter(json);
|
|
13
|
-
return json.getJSON();
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
17
|
-
super.addPropertiesToExporter(exporter);
|
|
18
|
-
exporter.addProperty("parentType", this.parentEntity);
|
|
19
|
-
exporter.addProperty("aliasedEntity", this.aliasedEntity);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
get parentEntity(): NamedEntity {
|
|
23
|
-
return this._parentEntity;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
set parentEntity(parentEntity: NamedEntity) {
|
|
27
|
-
this._parentEntity = parentEntity;
|
|
28
|
-
parentEntity.addAlias(this);
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
get aliasedEntity(): Type {
|
|
32
|
-
return this._aliasedEntity;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
set aliasedEntity(aliasedEntity: Type) {
|
|
36
|
-
this._aliasedEntity = aliasedEntity;
|
|
37
|
-
aliasedEntity.addTypeAlias(this);
|
|
38
|
-
}
|
|
39
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { NamedEntity } from "./named_entity";
|
|
3
|
+
import { Type } from "./type";
|
|
4
|
+
|
|
5
|
+
export class Alias extends NamedEntity {
|
|
6
|
+
|
|
7
|
+
private _parentEntity!: NamedEntity;
|
|
8
|
+
private _aliasedEntity!: Type;
|
|
9
|
+
|
|
10
|
+
public getJSON(): string {
|
|
11
|
+
const json: FamixJSONExporter = new FamixJSONExporter("Alias", this);
|
|
12
|
+
this.addPropertiesToExporter(json);
|
|
13
|
+
return json.getJSON();
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
17
|
+
super.addPropertiesToExporter(exporter);
|
|
18
|
+
exporter.addProperty("parentType", this.parentEntity);
|
|
19
|
+
exporter.addProperty("aliasedEntity", this.aliasedEntity);
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
get parentEntity(): NamedEntity {
|
|
23
|
+
return this._parentEntity;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
set parentEntity(parentEntity: NamedEntity) {
|
|
27
|
+
this._parentEntity = parentEntity;
|
|
28
|
+
parentEntity.addAlias(this);
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
get aliasedEntity(): Type {
|
|
32
|
+
return this._aliasedEntity;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
set aliasedEntity(aliasedEntity: Type) {
|
|
36
|
+
this._aliasedEntity = aliasedEntity;
|
|
37
|
+
aliasedEntity.addTypeAlias(this);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { BehavioralEntity } from "./behavioral_entity";
|
|
3
|
-
|
|
4
|
-
export class ArrowFunction extends BehavioralEntity {
|
|
5
|
-
|
|
6
|
-
public getJSON(): string {
|
|
7
|
-
const json: FamixJSONExporter = new FamixJSONExporter("ArrowFunction", this);
|
|
8
|
-
this.addPropertiesToExporter(json);
|
|
9
|
-
return json.getJSON();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
13
|
-
super.addPropertiesToExporter(exporter);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { BehavioralEntity } from "./behavioral_entity";
|
|
3
|
+
|
|
4
|
+
export class ArrowFunction extends BehavioralEntity {
|
|
5
|
+
|
|
6
|
+
public getJSON(): string {
|
|
7
|
+
const json: FamixJSONExporter = new FamixJSONExporter("ArrowFunction", this);
|
|
8
|
+
this.addPropertiesToExporter(json);
|
|
9
|
+
return json.getJSON();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
13
|
+
super.addPropertiesToExporter(exporter);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,97 +1,97 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { Type } from "./type";
|
|
3
|
-
import { ContainerEntity } from "./container_entity";
|
|
4
|
-
import { Parameter } from "./parameter";
|
|
5
|
-
import { Invocation } from "./invocation";
|
|
6
|
-
import { ParameterType } from "./parameter_type";
|
|
7
|
-
|
|
8
|
-
export class BehavioralEntity extends ContainerEntity {
|
|
9
|
-
|
|
10
|
-
private _signature!: string;
|
|
11
|
-
private _parameters: Set<Parameter> = new Set();
|
|
12
|
-
|
|
13
|
-
public addParameter(parameter: Parameter): void {
|
|
14
|
-
if (!this._parameters.has(parameter)) {
|
|
15
|
-
this._parameters.add(parameter);
|
|
16
|
-
parameter.parentEntity = this;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
private _numberOfParameters!: number;
|
|
21
|
-
private _incomingInvocations: Set<Invocation> = new Set();
|
|
22
|
-
|
|
23
|
-
public addIncomingInvocation(incomingInvocation: Invocation): void {
|
|
24
|
-
if (!this._incomingInvocations.has(incomingInvocation)) {
|
|
25
|
-
this._incomingInvocations.add(incomingInvocation);
|
|
26
|
-
incomingInvocation.addCandidate(this);
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
private _declaredType!: Type;
|
|
31
|
-
private _genericParameters: Set<ParameterType> = new Set();
|
|
32
|
-
|
|
33
|
-
public addGenericParameter(genericParameter: ParameterType): void {
|
|
34
|
-
if (!this._genericParameters.has(genericParameter)) {
|
|
35
|
-
this._genericParameters.add(genericParameter);
|
|
36
|
-
genericParameter.parentGeneric = this;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
clearGenericParameters(): void {
|
|
41
|
-
this._genericParameters.clear();
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
public getJSON(): string {
|
|
45
|
-
const json: FamixJSONExporter = new FamixJSONExporter("BehavioralEntity", this);
|
|
46
|
-
this.addPropertiesToExporter(json);
|
|
47
|
-
return json.getJSON();
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
51
|
-
super.addPropertiesToExporter(exporter);
|
|
52
|
-
exporter.addProperty("signature", this.signature);
|
|
53
|
-
exporter.addProperty("parameters", this.parameters);
|
|
54
|
-
exporter.addProperty("numberOfParameters", this.numberOfParameters);
|
|
55
|
-
exporter.addProperty("incomingInvocations", this.incomingInvocations);
|
|
56
|
-
exporter.addProperty("declaredType", this.declaredType);
|
|
57
|
-
/* don't add the property here, since it doesn't apply to all subclasses */
|
|
58
|
-
// exporter.addProperty("genericParameters", this.getGenericParameters());
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
get signature(): string {
|
|
62
|
-
return this._signature;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
set signature(signature: string) {
|
|
66
|
-
this._signature = signature;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
get parameters(): Set<Parameter> {
|
|
70
|
-
return this._parameters;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
get numberOfParameters(): number {
|
|
74
|
-
return this._numberOfParameters;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
set numberOfParameters(numberOfParameters: number) {
|
|
78
|
-
this._numberOfParameters = numberOfParameters;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
get incomingInvocations(): Set<Invocation> {
|
|
82
|
-
return this._incomingInvocations;
|
|
83
|
-
}
|
|
84
|
-
|
|
85
|
-
get declaredType(): Type {
|
|
86
|
-
return this._declaredType;
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
set declaredType(declaredType: Type) {
|
|
90
|
-
this._declaredType = declaredType;
|
|
91
|
-
declaredType.addBehavioralEntityWithDeclaredType(this);
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
get genericParameters(): Set<ParameterType> {
|
|
95
|
-
return this._genericParameters;
|
|
96
|
-
}
|
|
97
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { Type } from "./type";
|
|
3
|
+
import { ContainerEntity } from "./container_entity";
|
|
4
|
+
import { Parameter } from "./parameter";
|
|
5
|
+
import { Invocation } from "./invocation";
|
|
6
|
+
import { ParameterType } from "./parameter_type";
|
|
7
|
+
|
|
8
|
+
export class BehavioralEntity extends ContainerEntity {
|
|
9
|
+
|
|
10
|
+
private _signature!: string;
|
|
11
|
+
private _parameters: Set<Parameter> = new Set();
|
|
12
|
+
|
|
13
|
+
public addParameter(parameter: Parameter): void {
|
|
14
|
+
if (!this._parameters.has(parameter)) {
|
|
15
|
+
this._parameters.add(parameter);
|
|
16
|
+
parameter.parentEntity = this;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
private _numberOfParameters!: number;
|
|
21
|
+
private _incomingInvocations: Set<Invocation> = new Set();
|
|
22
|
+
|
|
23
|
+
public addIncomingInvocation(incomingInvocation: Invocation): void {
|
|
24
|
+
if (!this._incomingInvocations.has(incomingInvocation)) {
|
|
25
|
+
this._incomingInvocations.add(incomingInvocation);
|
|
26
|
+
incomingInvocation.addCandidate(this);
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
private _declaredType!: Type;
|
|
31
|
+
private _genericParameters: Set<ParameterType> = new Set();
|
|
32
|
+
|
|
33
|
+
public addGenericParameter(genericParameter: ParameterType): void {
|
|
34
|
+
if (!this._genericParameters.has(genericParameter)) {
|
|
35
|
+
this._genericParameters.add(genericParameter);
|
|
36
|
+
genericParameter.parentGeneric = this;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
clearGenericParameters(): void {
|
|
41
|
+
this._genericParameters.clear();
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
public getJSON(): string {
|
|
45
|
+
const json: FamixJSONExporter = new FamixJSONExporter("BehavioralEntity", this);
|
|
46
|
+
this.addPropertiesToExporter(json);
|
|
47
|
+
return json.getJSON();
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
51
|
+
super.addPropertiesToExporter(exporter);
|
|
52
|
+
exporter.addProperty("signature", this.signature);
|
|
53
|
+
exporter.addProperty("parameters", this.parameters);
|
|
54
|
+
exporter.addProperty("numberOfParameters", this.numberOfParameters);
|
|
55
|
+
exporter.addProperty("incomingInvocations", this.incomingInvocations);
|
|
56
|
+
exporter.addProperty("declaredType", this.declaredType);
|
|
57
|
+
/* don't add the property here, since it doesn't apply to all subclasses */
|
|
58
|
+
// exporter.addProperty("genericParameters", this.getGenericParameters());
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
get signature(): string {
|
|
62
|
+
return this._signature;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
set signature(signature: string) {
|
|
66
|
+
this._signature = signature;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
get parameters(): Set<Parameter> {
|
|
70
|
+
return this._parameters;
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
get numberOfParameters(): number {
|
|
74
|
+
return this._numberOfParameters;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
set numberOfParameters(numberOfParameters: number) {
|
|
78
|
+
this._numberOfParameters = numberOfParameters;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
get incomingInvocations(): Set<Invocation> {
|
|
82
|
+
return this._incomingInvocations;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
get declaredType(): Type {
|
|
86
|
+
return this._declaredType;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
set declaredType(declaredType: Type) {
|
|
90
|
+
this._declaredType = declaredType;
|
|
91
|
+
declaredType.addBehavioralEntityWithDeclaredType(this);
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
get genericParameters(): Set<ParameterType> {
|
|
95
|
+
return this._genericParameters;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
@@ -1,85 +1,85 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { Type } from "./type";
|
|
3
|
-
import { Method } from "./method";
|
|
4
|
-
import { Property } from "./property";
|
|
5
|
-
import { Inheritance } from "./inheritance";
|
|
6
|
-
|
|
7
|
-
export class Class extends Type {
|
|
8
|
-
|
|
9
|
-
private _isAbstract!: boolean;
|
|
10
|
-
private _properties: Set<Property> = new Set();
|
|
11
|
-
|
|
12
|
-
public addProperty(property: Property): void {
|
|
13
|
-
if (!this._properties.has(property)) {
|
|
14
|
-
this._properties.add(property);
|
|
15
|
-
property.parentEntity = this;
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
private _methods: Set<Method> = new Set();
|
|
20
|
-
|
|
21
|
-
public addMethod(method: Method): void {
|
|
22
|
-
if (!this._methods.has(method)) {
|
|
23
|
-
this._methods.add(method);
|
|
24
|
-
method.parentEntity = this;
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
private _superInheritances: Set<Inheritance> = new Set();
|
|
29
|
-
|
|
30
|
-
public addSuperInheritance(superInheritance: Inheritance): void {
|
|
31
|
-
if (!this._superInheritances.has(superInheritance)) {
|
|
32
|
-
this._superInheritances.add(superInheritance);
|
|
33
|
-
superInheritance.subclass = this;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
private _subInheritances: Set<Inheritance> = new Set();
|
|
38
|
-
|
|
39
|
-
public addSubInheritance(subInheritance: Inheritance): void {
|
|
40
|
-
if (!this._subInheritances.has(subInheritance)) {
|
|
41
|
-
this._subInheritances.add(subInheritance);
|
|
42
|
-
subInheritance.superclass = this;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
public getJSON(): string {
|
|
48
|
-
const json: FamixJSONExporter = new FamixJSONExporter("Class", this);
|
|
49
|
-
this.addPropertiesToExporter(json);
|
|
50
|
-
return json.getJSON();
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
54
|
-
super.addPropertiesToExporter(exporter);
|
|
55
|
-
exporter.addProperty("isAbstract", this.isAbstract);
|
|
56
|
-
exporter.addProperty("attributes", this.properties); // Moose (10) codes them as attributes
|
|
57
|
-
exporter.addProperty("methods", this.methods);
|
|
58
|
-
exporter.addProperty("superInheritances", this.superInheritances);
|
|
59
|
-
exporter.addProperty("subInheritances", this.subInheritances);
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
get isAbstract(): boolean {
|
|
63
|
-
return this._isAbstract;
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
set isAbstract(isAbstract: boolean) {
|
|
67
|
-
this._isAbstract = isAbstract;
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
get properties(): Set<Property> {
|
|
71
|
-
return this._properties;
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
get methods(): Set<Method> {
|
|
75
|
-
return this._methods;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
get superInheritances(): Set<Inheritance> {
|
|
79
|
-
return this._superInheritances;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
get subInheritances(): Set<Inheritance> {
|
|
83
|
-
return this._subInheritances;
|
|
84
|
-
}
|
|
85
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { Type } from "./type";
|
|
3
|
+
import { Method } from "./method";
|
|
4
|
+
import { Property } from "./property";
|
|
5
|
+
import { Inheritance } from "./inheritance";
|
|
6
|
+
|
|
7
|
+
export class Class extends Type {
|
|
8
|
+
|
|
9
|
+
private _isAbstract!: boolean;
|
|
10
|
+
private _properties: Set<Property> = new Set();
|
|
11
|
+
|
|
12
|
+
public addProperty(property: Property): void {
|
|
13
|
+
if (!this._properties.has(property)) {
|
|
14
|
+
this._properties.add(property);
|
|
15
|
+
property.parentEntity = this;
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
private _methods: Set<Method> = new Set();
|
|
20
|
+
|
|
21
|
+
public addMethod(method: Method): void {
|
|
22
|
+
if (!this._methods.has(method)) {
|
|
23
|
+
this._methods.add(method);
|
|
24
|
+
method.parentEntity = this;
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
private _superInheritances: Set<Inheritance> = new Set();
|
|
29
|
+
|
|
30
|
+
public addSuperInheritance(superInheritance: Inheritance): void {
|
|
31
|
+
if (!this._superInheritances.has(superInheritance)) {
|
|
32
|
+
this._superInheritances.add(superInheritance);
|
|
33
|
+
superInheritance.subclass = this;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
private _subInheritances: Set<Inheritance> = new Set();
|
|
38
|
+
|
|
39
|
+
public addSubInheritance(subInheritance: Inheritance): void {
|
|
40
|
+
if (!this._subInheritances.has(subInheritance)) {
|
|
41
|
+
this._subInheritances.add(subInheritance);
|
|
42
|
+
subInheritance.superclass = this;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
public getJSON(): string {
|
|
48
|
+
const json: FamixJSONExporter = new FamixJSONExporter("Class", this);
|
|
49
|
+
this.addPropertiesToExporter(json);
|
|
50
|
+
return json.getJSON();
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
54
|
+
super.addPropertiesToExporter(exporter);
|
|
55
|
+
exporter.addProperty("isAbstract", this.isAbstract);
|
|
56
|
+
exporter.addProperty("attributes", this.properties); // Moose (10) codes them as attributes
|
|
57
|
+
exporter.addProperty("methods", this.methods);
|
|
58
|
+
exporter.addProperty("superInheritances", this.superInheritances);
|
|
59
|
+
exporter.addProperty("subInheritances", this.subInheritances);
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
get isAbstract(): boolean {
|
|
63
|
+
return this._isAbstract;
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
set isAbstract(isAbstract: boolean) {
|
|
67
|
+
this._isAbstract = isAbstract;
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
get properties(): Set<Property> {
|
|
71
|
+
return this._properties;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
get methods(): Set<Method> {
|
|
75
|
+
return this._methods;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
get superInheritances(): Set<Inheritance> {
|
|
79
|
+
return this._superInheritances;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
get subInheritances(): Set<Inheritance> {
|
|
83
|
+
return this._subInheritances;
|
|
84
|
+
}
|
|
85
|
+
}
|