ts2famix 1.4.1 → 2.0.1
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/LICENSE +1 -0
- package/README.md +30 -61
- package/dist/analyze.js +4 -2
- package/dist/analyze_functions/process_functions.js +285 -131
- package/dist/famix_functions/EntityDictionary.js +864 -231
- package/dist/famix_functions/helpers_creation.js +61 -10
- package/dist/fqn.js +160 -111
- package/dist/lib/famix/famix_JSON_exporter.js +55 -0
- package/dist/lib/famix/famix_base_element.js +18 -0
- package/dist/lib/famix/famix_repository.js +224 -0
- package/dist/lib/famix/{src/index.js → index.js} +1 -0
- package/dist/lib/famix/model/famix/access.js +40 -0
- package/dist/lib/famix/model/famix/accessor.js +17 -0
- package/dist/lib/famix/model/famix/alias.js +33 -0
- package/dist/lib/famix/model/famix/arrow_function.js +17 -0
- package/dist/lib/famix/model/famix/behavioral_entity.js +79 -0
- package/dist/lib/famix/model/famix/class.js +71 -0
- package/dist/lib/famix/model/famix/comment.js +39 -0
- package/dist/lib/famix/model/famix/concretisation.js +31 -0
- package/dist/lib/famix/model/famix/container_entity.js +126 -0
- package/dist/lib/famix/model/famix/decorator.js +32 -0
- package/dist/lib/famix/model/famix/entity.js +17 -0
- package/dist/lib/famix/model/famix/enum.js +31 -0
- package/dist/lib/famix/model/famix/enum_value.js +25 -0
- package/dist/lib/famix/model/famix/function.js +17 -0
- package/dist/lib/famix/model/famix/import_clause.js +41 -0
- package/dist/lib/famix/model/famix/index.js +86 -0
- package/dist/lib/famix/model/famix/indexed_file_anchor.js +38 -0
- package/dist/lib/famix/model/famix/inheritance.js +33 -0
- package/dist/lib/famix/model/famix/interface.js +64 -0
- package/dist/lib/famix/model/famix/invocation.js +54 -0
- package/dist/lib/famix/model/famix/method.js +67 -0
- package/dist/lib/famix/model/famix/module.js +60 -0
- package/dist/lib/famix/model/famix/named_entity.js +78 -0
- package/dist/lib/famix/model/famix/parameter.js +25 -0
- package/dist/lib/famix/model/famix/parameter_concretisation.js +44 -0
- package/dist/lib/famix/model/famix/parameter_type.js +45 -0
- package/dist/lib/famix/model/famix/parametric_arrow_function.js +31 -0
- package/dist/lib/famix/model/famix/parametric_class.js +44 -0
- package/dist/lib/famix/model/famix/parametric_function.js +31 -0
- package/dist/lib/famix/model/famix/parametric_interface.js +44 -0
- package/dist/lib/famix/model/famix/parametric_method.js +31 -0
- package/dist/lib/famix/model/famix/primitive_type.js +17 -0
- package/dist/lib/famix/model/famix/property.js +73 -0
- package/dist/lib/famix/model/famix/reference.js +33 -0
- package/dist/lib/famix/model/famix/scoping_entity.js +36 -0
- package/dist/lib/famix/model/famix/script_entity.js +29 -0
- package/dist/lib/famix/model/famix/source_anchor.js +27 -0
- package/dist/lib/famix/model/famix/source_language.js +35 -0
- package/dist/lib/famix/model/famix/sourced_entity.js +60 -0
- package/dist/lib/famix/model/famix/structural_entity.js +39 -0
- package/dist/lib/famix/model/famix/type.js +73 -0
- package/dist/lib/famix/model/famix/variable.js +24 -0
- package/dist/lib/ts-complex/cyclomatic-service.js +3 -3
- package/dist/refactorer/refactor-getter-setter.js +142 -0
- package/dist/ts2famix-cli-wrapper.js +42 -0
- package/dist/ts2famix-cli.js +8 -1
- package/dist/ts2famix-tsconfig.js +1 -0
- package/doc-uml/famix-typescript-model.puml +608 -0
- package/doc-uml/famix-typescript-model.svg +1 -0
- package/jest.config.json +2 -1
- package/package.json +13 -12
- package/src/analyze.ts +24 -23
- package/src/analyze_functions/process_functions.ts +310 -129
- package/src/famix_functions/EntityDictionary.ts +949 -271
- package/src/famix_functions/helpers_creation.ts +64 -6
- package/src/fqn.ts +169 -96
- package/{dist/lib/famix/src/famix_JSON_exporter.js → src/lib/famix/famix_JSON_exporter.ts} +16 -14
- package/src/lib/famix/famix_base_element.ts +22 -0
- package/{dist/lib/famix/src/famix_repository.js → src/lib/famix/famix_repository.ts} +96 -75
- package/src/lib/famix/model/famix/access.ts +50 -0
- package/src/lib/famix/model/famix/alias.ts +39 -0
- package/src/lib/famix/{src/model/famix/implicit_variable.ts → model/famix/arrow_function.ts} +3 -3
- package/src/lib/famix/model/famix/behavioral_entity.ts +97 -0
- package/src/lib/famix/model/famix/class.ts +85 -0
- package/src/lib/famix/model/famix/comment.ts +47 -0
- package/src/lib/famix/model/famix/concretisation.ts +40 -0
- package/src/lib/famix/model/famix/container_entity.ts +160 -0
- package/src/lib/famix/model/famix/decorator.ts +37 -0
- package/src/lib/famix/model/famix/enum.ts +30 -0
- package/src/lib/famix/model/famix/enum_value.ts +28 -0
- package/src/lib/famix/model/famix/import_clause.ts +51 -0
- package/src/lib/famix/{src/model → model}/famix/index.ts +8 -7
- package/src/lib/famix/model/famix/indexed_file_anchor.ts +46 -0
- package/src/lib/famix/model/famix/inheritance.ts +40 -0
- package/src/lib/famix/model/famix/interface.ts +75 -0
- package/src/lib/famix/model/famix/invocation.ts +65 -0
- package/src/lib/famix/model/famix/method.ts +89 -0
- package/src/lib/famix/model/famix/module.ts +71 -0
- package/src/lib/famix/model/famix/named_entity.ts +95 -0
- package/src/lib/famix/{src/model → model}/famix/parameter.ts +11 -12
- package/src/lib/famix/model/famix/parameter_concretisation.ts +51 -0
- package/src/lib/famix/model/famix/parameter_type.ts +58 -0
- package/src/lib/famix/model/famix/parametric_arrow_function.ts +32 -0
- package/src/lib/famix/model/famix/parametric_class.ts +49 -0
- package/src/lib/famix/model/famix/parametric_function.ts +32 -0
- package/src/lib/famix/model/famix/parametric_interface.ts +49 -0
- package/src/lib/famix/model/famix/parametric_method.ts +32 -0
- package/src/lib/famix/model/famix/primitive_type.ts +15 -0
- package/src/lib/famix/model/famix/property.ts +94 -0
- package/src/lib/famix/model/famix/reference.ts +40 -0
- package/src/lib/famix/model/famix/scoping_entity.ts +35 -0
- package/src/lib/famix/model/famix/script_entity.ts +34 -0
- package/src/lib/famix/model/famix/source_anchor.ts +30 -0
- package/src/lib/famix/model/famix/source_language.ts +35 -0
- package/src/lib/famix/model/famix/sourced_entity.ts +70 -0
- package/src/lib/famix/model/famix/structural_entity.ts +43 -0
- package/src/lib/famix/model/famix/type.ts +87 -0
- package/src/lib/famix/model/famix/variable.ts +27 -0
- package/src/lib/famix/package.json +1 -1
- package/src/lib/ts-complex/cyclomatic-service.ts +10 -10
- package/src/refactorer/refactor-getter-setter.ts +140 -0
- package/src/ts2famix-cli-wrapper.ts +21 -0
- package/src/ts2famix-cli.ts +8 -2
- package/tsconfig.check-tests.json +14 -0
- package/tsconfig.json +71 -69
- package/dist/famix2puml.js +0 -125
- package/dist/lib/famix/src/famix_base_element.js +0 -17
- package/dist/lib/famix/src/model/famix/access.js +0 -39
- package/dist/lib/famix/src/model/famix/accessor.js +0 -16
- package/dist/lib/famix/src/model/famix/alias.js +0 -32
- package/dist/lib/famix/src/model/famix/association.js +0 -36
- package/dist/lib/famix/src/model/famix/behavioral_entity.js +0 -81
- package/dist/lib/famix/src/model/famix/class.js +0 -70
- package/dist/lib/famix/src/model/famix/comment.js +0 -38
- package/dist/lib/famix/src/model/famix/container_entity.js +0 -125
- package/dist/lib/famix/src/model/famix/decorator.js +0 -31
- package/dist/lib/famix/src/model/famix/entity.js +0 -16
- package/dist/lib/famix/src/model/famix/enum.js +0 -30
- package/dist/lib/famix/src/model/famix/enum_value.js +0 -24
- package/dist/lib/famix/src/model/famix/function.js +0 -16
- package/dist/lib/famix/src/model/famix/implicit_variable.js +0 -16
- package/dist/lib/famix/src/model/famix/import_clause.js +0 -39
- package/dist/lib/famix/src/model/famix/index.js +0 -83
- package/dist/lib/famix/src/model/famix/indexed_file_anchor.js +0 -51
- package/dist/lib/famix/src/model/famix/inheritance.js +0 -32
- package/dist/lib/famix/src/model/famix/interface.js +0 -63
- package/dist/lib/famix/src/model/famix/invocation.js +0 -53
- package/dist/lib/famix/src/model/famix/method.js +0 -66
- package/dist/lib/famix/src/model/famix/module.js +0 -31
- package/dist/lib/famix/src/model/famix/named_entity.js +0 -77
- package/dist/lib/famix/src/model/famix/namespace.js +0 -24
- package/dist/lib/famix/src/model/famix/parameter.js +0 -24
- package/dist/lib/famix/src/model/famix/parameter_type.js +0 -24
- package/dist/lib/famix/src/model/famix/parameterizable_class.js +0 -30
- package/dist/lib/famix/src/model/famix/parameterizable_interface.js +0 -30
- package/dist/lib/famix/src/model/famix/parameterized_type.js +0 -36
- package/dist/lib/famix/src/model/famix/primitive_type.js +0 -16
- package/dist/lib/famix/src/model/famix/property.js +0 -44
- package/dist/lib/famix/src/model/famix/reference.js +0 -32
- package/dist/lib/famix/src/model/famix/scoping_entity.js +0 -35
- package/dist/lib/famix/src/model/famix/script_entity.js +0 -30
- package/dist/lib/famix/src/model/famix/source_anchor.js +0 -26
- package/dist/lib/famix/src/model/famix/source_language.js +0 -35
- package/dist/lib/famix/src/model/famix/sourced_entity.js +0 -59
- package/dist/lib/famix/src/model/famix/structural_entity.js +0 -38
- package/dist/lib/famix/src/model/famix/text_anchor.js +0 -37
- package/dist/lib/famix/src/model/famix/type.js +0 -71
- package/dist/lib/famix/src/model/famix/variable.js +0 -23
- package/doc-uml/metamodel-full.svg +0 -1
- package/doc-uml/metamodel.svg +0 -1
- package/jest.config-old.ts +0 -199
- package/plantuml.jar +0 -0
- package/src/famix2puml.ts +0 -119
- package/src/lib/famix/package-lock.json +0 -301
- package/src/lib/famix/readme.md +0 -5
- package/src/lib/famix/src/famix_JSON_exporter.ts +0 -56
- package/src/lib/famix/src/famix_base_element.ts +0 -22
- package/src/lib/famix/src/famix_repository.ts +0 -243
- package/src/lib/famix/src/model/famix/access.ts +0 -53
- package/src/lib/famix/src/model/famix/alias.ts +0 -41
- package/src/lib/famix/src/model/famix/association.ts +0 -44
- package/src/lib/famix/src/model/famix/behavioral_entity.ts +0 -107
- package/src/lib/famix/src/model/famix/class.ts +0 -86
- package/src/lib/famix/src/model/famix/comment.ts +0 -50
- package/src/lib/famix/src/model/famix/container_entity.ts +0 -165
- package/src/lib/famix/src/model/famix/decorator.ts +0 -39
- package/src/lib/famix/src/model/famix/enum.ts +0 -31
- package/src/lib/famix/src/model/famix/enum_value.ts +0 -29
- package/src/lib/famix/src/model/famix/import_clause.ts +0 -53
- package/src/lib/famix/src/model/famix/indexed_file_anchor.ts +0 -71
- package/src/lib/famix/src/model/famix/inheritance.ts +0 -42
- package/src/lib/famix/src/model/famix/interface.ts +0 -75
- package/src/lib/famix/src/model/famix/invocation.ts +0 -68
- package/src/lib/famix/src/model/famix/method.ts +0 -96
- package/src/lib/famix/src/model/famix/module.ts +0 -31
- package/src/lib/famix/src/model/famix/named_entity.ts +0 -98
- package/src/lib/famix/src/model/famix/namespace.ts +0 -28
- package/src/lib/famix/src/model/famix/parameter_type.ts +0 -33
- package/src/lib/famix/src/model/famix/parameterizable_class.ts +0 -31
- package/src/lib/famix/src/model/famix/parameterizable_interface.ts +0 -31
- package/src/lib/famix/src/model/famix/parameterized_type.ts +0 -40
- package/src/lib/famix/src/model/famix/primitive_type.ts +0 -15
- package/src/lib/famix/src/model/famix/property.ts +0 -54
- package/src/lib/famix/src/model/famix/reference.ts +0 -42
- package/src/lib/famix/src/model/famix/scoping_entity.ts +0 -35
- package/src/lib/famix/src/model/famix/script_entity.ts +0 -38
- package/src/lib/famix/src/model/famix/source_anchor.ts +0 -31
- package/src/lib/famix/src/model/famix/source_language.ts +0 -37
- package/src/lib/famix/src/model/famix/sourced_entity.ts +0 -73
- package/src/lib/famix/src/model/famix/structural_entity.ts +0 -44
- package/src/lib/famix/src/model/famix/text_anchor.ts +0 -49
- package/src/lib/famix/src/model/famix/type.ts +0 -88
- package/src/lib/famix/src/model/famix/variable.ts +0 -28
- package/src/lib/famix/tsconfig.json +0 -27
- package/src/lib/famix/tslint.json +0 -15
- /package/src/lib/famix/{src/index.ts → index.ts} +0 -0
- /package/src/lib/famix/{src/model → model}/famix/accessor.ts +0 -0
- /package/src/lib/famix/{src/model → model}/famix/entity.ts +0 -0
- /package/src/lib/famix/{src/model → model}/famix/function.ts +0 -0
|
@@ -1,71 +0,0 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { SourceAnchor } from "./source_anchor";
|
|
3
|
-
|
|
4
|
-
export class IndexedFileAnchor extends SourceAnchor {
|
|
5
|
-
|
|
6
|
-
private startPos: number;
|
|
7
|
-
|
|
8
|
-
public getStartPos(): number {
|
|
9
|
-
return this.startPos;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
public setStartPos(startPos: number): void {
|
|
13
|
-
this.startPos = startPos;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
private endPos: number;
|
|
17
|
-
|
|
18
|
-
public getEndPos(): number {
|
|
19
|
-
return this.endPos;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
public setEndPos(endPos: number): void {
|
|
23
|
-
this.endPos = endPos;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
private endLine: number;
|
|
27
|
-
|
|
28
|
-
public getEndLine(): number {
|
|
29
|
-
return this.endLine;
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
public setEndLine(sourceEndLine: number) {
|
|
33
|
-
this.endLine = sourceEndLine;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
private startLine: number;
|
|
37
|
-
|
|
38
|
-
public getStartLine(): number {
|
|
39
|
-
return this.startLine;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
public setStartLine(sourceStartLine: number) {
|
|
43
|
-
this.startLine = sourceStartLine;
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
private fileName: string;
|
|
47
|
-
|
|
48
|
-
public getFileName(): string {
|
|
49
|
-
return this.fileName;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
public setFileName(fileName: string): void {
|
|
53
|
-
this.fileName = fileName;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
public getJSON(): string {
|
|
58
|
-
const json: FamixJSONExporter = new FamixJSONExporter("IndexedFileAnchor", this);
|
|
59
|
-
this.addPropertiesToExporter(json);
|
|
60
|
-
return json.getJSON();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
64
|
-
super.addPropertiesToExporter(exporter);
|
|
65
|
-
exporter.addProperty("startPos", this.getStartPos());
|
|
66
|
-
exporter.addProperty("endPos", this.getEndPos());
|
|
67
|
-
exporter.addProperty("startLine", this.getStartLine());
|
|
68
|
-
exporter.addProperty("endLine", this.getEndLine());
|
|
69
|
-
exporter.addProperty("fileName", this.getFileName());
|
|
70
|
-
}
|
|
71
|
-
}
|
|
@@ -1,42 +0,0 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { Association } from "./association";
|
|
3
|
-
import { Class } from "./class";
|
|
4
|
-
import { Interface } from "./interface";
|
|
5
|
-
|
|
6
|
-
export class Inheritance extends Association {
|
|
7
|
-
|
|
8
|
-
private superclass: Class | Interface;
|
|
9
|
-
|
|
10
|
-
public getSuperclass(): Class | Interface {
|
|
11
|
-
return this.superclass;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public setSuperclass(superclass: Class | Interface): void {
|
|
15
|
-
this.superclass = superclass;
|
|
16
|
-
superclass.addSubInheritance(this);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
private subclass: Class | Interface;
|
|
20
|
-
|
|
21
|
-
public getSubclass(): Class | Interface {
|
|
22
|
-
return this.subclass;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
public setSubclass(subclass: Class | Interface): void {
|
|
26
|
-
this.subclass = subclass;
|
|
27
|
-
subclass.addSuperInheritance(this);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
public getJSON(): string {
|
|
32
|
-
const json: FamixJSONExporter = new FamixJSONExporter("Inheritance", this);
|
|
33
|
-
this.addPropertiesToExporter(json);
|
|
34
|
-
return json.getJSON();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
38
|
-
super.addPropertiesToExporter(exporter);
|
|
39
|
-
exporter.addProperty("superclass", this.getSuperclass());
|
|
40
|
-
exporter.addProperty("subclass", this.getSubclass());
|
|
41
|
-
}
|
|
42
|
-
}
|
|
@@ -1,75 +0,0 @@
|
|
|
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 Interface extends Type {
|
|
8
|
-
|
|
9
|
-
private properties: Set<Property> = new Set();
|
|
10
|
-
|
|
11
|
-
public getProperties(): Set<Property> {
|
|
12
|
-
return this.properties;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
public addProperty(property: Property): void {
|
|
16
|
-
if (!this.properties.has(property)) {
|
|
17
|
-
this.properties.add(property);
|
|
18
|
-
property.setParentEntity(this);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
private methods: Set<Method> = new Set();
|
|
23
|
-
|
|
24
|
-
public getMethods(): Set<Method> {
|
|
25
|
-
return this.methods;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
public addMethod(method: Method): void {
|
|
29
|
-
if (!this.methods.has(method)) {
|
|
30
|
-
this.methods.add(method);
|
|
31
|
-
method.setParentEntity(this);
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
private superInheritances: Set<Inheritance> = new Set();
|
|
36
|
-
|
|
37
|
-
public getSuperInheritances(): Set<Inheritance> {
|
|
38
|
-
return this.superInheritances;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
public addSuperInheritance(superInheritance: Inheritance): void {
|
|
42
|
-
if (!this.superInheritances.has(superInheritance)) {
|
|
43
|
-
this.superInheritances.add(superInheritance);
|
|
44
|
-
superInheritance.setSubclass(this);
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
private subInheritances: Set<Inheritance> = new Set();
|
|
49
|
-
|
|
50
|
-
public getSubInheritances(): Set<Inheritance> {
|
|
51
|
-
return this.subInheritances;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
public addSubInheritance(subInheritance: Inheritance): void {
|
|
55
|
-
if (!this.subInheritances.has(subInheritance)) {
|
|
56
|
-
this.subInheritances.add(subInheritance);
|
|
57
|
-
subInheritance.setSuperclass(this);
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
public getJSON(): string {
|
|
63
|
-
const json: FamixJSONExporter = new FamixJSONExporter("Interface", this);
|
|
64
|
-
this.addPropertiesToExporter(json);
|
|
65
|
-
return json.getJSON();
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
69
|
-
super.addPropertiesToExporter(exporter);
|
|
70
|
-
exporter.addProperty("properties", this.getProperties());
|
|
71
|
-
exporter.addProperty("methods", this.getMethods());
|
|
72
|
-
exporter.addProperty("superInheritances", this.getSuperInheritances());
|
|
73
|
-
exporter.addProperty("subInheritances", this.getSubInheritances());
|
|
74
|
-
}
|
|
75
|
-
}
|
|
@@ -1,68 +0,0 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { NamedEntity } from "./named_entity";
|
|
3
|
-
import { Association } from "./association";
|
|
4
|
-
import { BehavioralEntity } from "./behavioral_entity";
|
|
5
|
-
import { ContainerEntity } from "./container_entity";
|
|
6
|
-
|
|
7
|
-
export class Invocation extends Association {
|
|
8
|
-
|
|
9
|
-
private candidates: Set<BehavioralEntity> = new Set();
|
|
10
|
-
|
|
11
|
-
public getCandidates(): Set<BehavioralEntity> {
|
|
12
|
-
return this.candidates;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
public addCandidate(candidate: BehavioralEntity): void {
|
|
16
|
-
if (!this.candidates.has(candidate)) {
|
|
17
|
-
this.candidates.add(candidate);
|
|
18
|
-
candidate.addIncomingInvocation(this);
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
private receiver: NamedEntity;
|
|
23
|
-
|
|
24
|
-
public getReceiver(): NamedEntity {
|
|
25
|
-
return this.receiver;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
public setReceiver(receiver: NamedEntity): void {
|
|
29
|
-
this.receiver = receiver;
|
|
30
|
-
receiver.addReceivedInvocation(this);
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
private sender: ContainerEntity;
|
|
34
|
-
|
|
35
|
-
public getSender(): ContainerEntity {
|
|
36
|
-
return this.sender;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
public setSender(sender: ContainerEntity): void {
|
|
40
|
-
this.sender = sender;
|
|
41
|
-
sender.addOutgoingInvocation(this);
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
private signature: string;
|
|
45
|
-
|
|
46
|
-
public getSignature(): string {
|
|
47
|
-
return this.signature;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
public setSignature(signature: string): void {
|
|
51
|
-
this.signature = signature;
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
public getJSON(): string {
|
|
56
|
-
const json: FamixJSONExporter = new FamixJSONExporter("Invocation", this);
|
|
57
|
-
this.addPropertiesToExporter(json);
|
|
58
|
-
return json.getJSON();
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
62
|
-
super.addPropertiesToExporter(exporter);
|
|
63
|
-
exporter.addProperty("candidates", this.getCandidates());
|
|
64
|
-
exporter.addProperty("receiver", this.getReceiver());
|
|
65
|
-
exporter.addProperty("sender", this.getSender());
|
|
66
|
-
exporter.addProperty("signature", this.getSignature());
|
|
67
|
-
}
|
|
68
|
-
}
|
|
@@ -1,96 +0,0 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { BehavioralEntity } from "./behavioral_entity";
|
|
3
|
-
import { Class } from "./class";
|
|
4
|
-
import { Interface } from "./interface";
|
|
5
|
-
|
|
6
|
-
export class Method extends BehavioralEntity {
|
|
7
|
-
|
|
8
|
-
private parentEntity: Class | Interface;
|
|
9
|
-
|
|
10
|
-
public getParentEntity(): Class | Interface {
|
|
11
|
-
return this.parentEntity;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public setParentEntity(parentEntity: Class | Interface): void {
|
|
15
|
-
this.parentEntity = parentEntity;
|
|
16
|
-
parentEntity.addMethod(this);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
private kind: string;
|
|
20
|
-
|
|
21
|
-
public getKind(): string {
|
|
22
|
-
return this.kind;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
public setKind(kind: string): void {
|
|
26
|
-
this.kind = kind;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
private isAbstract: boolean;
|
|
30
|
-
|
|
31
|
-
public getIsAbstract(): boolean {
|
|
32
|
-
return this.isAbstract;
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
public setIsAbstract(isAbstract: boolean): void {
|
|
36
|
-
this.isAbstract = isAbstract;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
private isClassSide: boolean;
|
|
40
|
-
|
|
41
|
-
public getIsClassSide(): boolean {
|
|
42
|
-
return this.isClassSide;
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
public setIsClassSide(isClassSide: boolean): void {
|
|
46
|
-
this.isClassSide = isClassSide;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
private isPrivate: boolean;
|
|
50
|
-
|
|
51
|
-
public getIsPrivate(): boolean {
|
|
52
|
-
return this.isPrivate;
|
|
53
|
-
}
|
|
54
|
-
|
|
55
|
-
public setIsPrivate(isPrivate: boolean): void {
|
|
56
|
-
this.isPrivate = isPrivate;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
private isPublic: boolean;
|
|
60
|
-
|
|
61
|
-
public getIsPublic(): boolean {
|
|
62
|
-
return this.isPublic;
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
public setIsPublic(isPublic: boolean): void {
|
|
66
|
-
this.isPublic = isPublic;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
private isProtected: boolean;
|
|
70
|
-
|
|
71
|
-
public getIsProtected(): boolean {
|
|
72
|
-
return this.isProtected;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
public setIsProtected(isProtected: boolean): void {
|
|
76
|
-
this.isProtected = isProtected;
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
public getJSON(): string {
|
|
81
|
-
const json: FamixJSONExporter = new FamixJSONExporter("Method", this);
|
|
82
|
-
this.addPropertiesToExporter(json);
|
|
83
|
-
return json.getJSON();
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
87
|
-
super.addPropertiesToExporter(exporter);
|
|
88
|
-
exporter.addProperty("parentEntity", this.getParentEntity());
|
|
89
|
-
exporter.addProperty("kind", this.getKind());
|
|
90
|
-
exporter.addProperty("isAbstract", this.getIsAbstract());
|
|
91
|
-
exporter.addProperty("isClassSide", this.getIsClassSide());
|
|
92
|
-
exporter.addProperty("isPrivate", this.getIsPrivate());
|
|
93
|
-
exporter.addProperty("isPublic", this.getIsPublic());
|
|
94
|
-
exporter.addProperty("isProtected", this.getIsProtected());
|
|
95
|
-
}
|
|
96
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { ScriptEntity } from "./script_entity";
|
|
3
|
-
import { ImportClause } from "./import_clause";
|
|
4
|
-
|
|
5
|
-
export class Module extends ScriptEntity {
|
|
6
|
-
|
|
7
|
-
// incomingImports are in NamedEntity
|
|
8
|
-
private outgoingImports: Set<ImportClause> = new Set();
|
|
9
|
-
|
|
10
|
-
getOutgoingImports() {
|
|
11
|
-
return this.outgoingImports;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
addOutgoingImport(importClause: ImportClause) {
|
|
15
|
-
if (!this.outgoingImports.has(importClause)) {
|
|
16
|
-
this.outgoingImports.add(importClause);
|
|
17
|
-
importClause.setImportingEntity(this); // opposite
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
public getJSON(): string {
|
|
22
|
-
const json: FamixJSONExporter = new FamixJSONExporter("Module", this);
|
|
23
|
-
this.addPropertiesToExporter(json);
|
|
24
|
-
return json.getJSON();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
28
|
-
super.addPropertiesToExporter(exporter);
|
|
29
|
-
exporter.addProperty("outgoingImports", this.getOutgoingImports());
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,98 +0,0 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { SourcedEntity } from "./sourced_entity";
|
|
3
|
-
import { Invocation } from "./invocation";
|
|
4
|
-
import { ImportClause } from "./import_clause";
|
|
5
|
-
import { Alias } from "./alias";
|
|
6
|
-
import { Decorator } from "./decorator";
|
|
7
|
-
|
|
8
|
-
export class NamedEntity extends SourcedEntity {
|
|
9
|
-
|
|
10
|
-
private fullyQualifiedName: string;
|
|
11
|
-
|
|
12
|
-
public getFullyQualifiedName(): string {
|
|
13
|
-
return this.fullyQualifiedName;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
public setFullyQualifiedName(fullyQualifiedName: string): void {
|
|
17
|
-
this.fullyQualifiedName = fullyQualifiedName;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
private receivedInvocations: Set<Invocation> = new Set();
|
|
21
|
-
|
|
22
|
-
public getReceivedInvocations(): Set<Invocation> {
|
|
23
|
-
return this.receivedInvocations;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public addReceivedInvocation(receivedInvocation: Invocation): void {
|
|
27
|
-
if (!this.receivedInvocations.has(receivedInvocation)) {
|
|
28
|
-
this.receivedInvocations.add(receivedInvocation);
|
|
29
|
-
receivedInvocation.setReceiver(this);
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
private incomingImports: Set<ImportClause> = new Set();
|
|
34
|
-
|
|
35
|
-
public getIncomingImports(): Set<ImportClause> {
|
|
36
|
-
return this.incomingImports;
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
public addIncomingImport(anImport: ImportClause): void {
|
|
40
|
-
if (!this.incomingImports.has(anImport)) {
|
|
41
|
-
this.incomingImports.add(anImport);
|
|
42
|
-
anImport.setImportedEntity(this); // opposite
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
private name: string;
|
|
47
|
-
|
|
48
|
-
public getName(): string {
|
|
49
|
-
return this.name;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
public setName(name: string): void {
|
|
53
|
-
this.name = name;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
private aliases: Set<Alias> = new Set();
|
|
57
|
-
|
|
58
|
-
public getAliases(): Set<Alias> {
|
|
59
|
-
return this.aliases;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
public addAlias(alias: Alias): void {
|
|
63
|
-
if (!this.aliases.has(alias)) {
|
|
64
|
-
this.aliases.add(alias);
|
|
65
|
-
alias.setParentEntity(this);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
private decorators: Set<Decorator> = new Set();
|
|
70
|
-
|
|
71
|
-
public getDecorators(): Set<Decorator> {
|
|
72
|
-
return this.decorators;
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
public addDecorator(decorator: Decorator): void {
|
|
76
|
-
if (!this.decorators.has(decorator)) {
|
|
77
|
-
this.decorators.add(decorator);
|
|
78
|
-
decorator.setDecoratedEntity(this);
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
public getJSON(): string {
|
|
84
|
-
const json: FamixJSONExporter = new FamixJSONExporter("NamedEntity", this);
|
|
85
|
-
this.addPropertiesToExporter(json);
|
|
86
|
-
return json.getJSON();
|
|
87
|
-
}
|
|
88
|
-
|
|
89
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
90
|
-
super.addPropertiesToExporter(exporter);
|
|
91
|
-
exporter.addProperty("fullyQualifiedName", this.getFullyQualifiedName());
|
|
92
|
-
exporter.addProperty("incomingInvocations", this.getReceivedInvocations());
|
|
93
|
-
exporter.addProperty("incomingImports", this.getIncomingImports());
|
|
94
|
-
exporter.addProperty("name", this.getName());
|
|
95
|
-
exporter.addProperty("aliases", this.getAliases());
|
|
96
|
-
exporter.addProperty("decorators", this.getDecorators());
|
|
97
|
-
}
|
|
98
|
-
}
|
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { ScopingEntity } from "./scoping_entity";
|
|
3
|
-
|
|
4
|
-
export class Namespace extends ScopingEntity {
|
|
5
|
-
|
|
6
|
-
private parentScope: ScopingEntity;
|
|
7
|
-
|
|
8
|
-
public getParentScope(): ScopingEntity {
|
|
9
|
-
return this.parentScope;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
public setParentScope(parentScope: ScopingEntity): void {
|
|
13
|
-
this.parentScope = parentScope;
|
|
14
|
-
parentScope.addNamespace(this);
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
public getJSON(): string {
|
|
19
|
-
const json: FamixJSONExporter = new FamixJSONExporter("Namespace", this);
|
|
20
|
-
this.addPropertiesToExporter(json);
|
|
21
|
-
return json.getJSON();
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
25
|
-
super.addPropertiesToExporter(exporter);
|
|
26
|
-
exporter.addProperty("parentScope", this.getParentScope());
|
|
27
|
-
}
|
|
28
|
-
}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { Type } from "./type";
|
|
3
|
-
import { ParameterizableClass } from "./parameterizable_class";
|
|
4
|
-
import { ParameterizableInterface } from "./parameterizable_interface";
|
|
5
|
-
import { Method } from "./method";
|
|
6
|
-
import { Function as FamixFunction } from "./function";
|
|
7
|
-
import { Accessor } from "./accessor";
|
|
8
|
-
|
|
9
|
-
export class ParameterType extends Type {
|
|
10
|
-
|
|
11
|
-
private parentGeneric: ParameterizableClass | ParameterizableInterface | Method | Accessor | FamixFunction;
|
|
12
|
-
|
|
13
|
-
public getParentGeneric(): ParameterizableClass | ParameterizableInterface | Method | Accessor | FamixFunction {
|
|
14
|
-
return this.parentGeneric;
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
public setParentGeneric(parentGeneric: ParameterizableClass | ParameterizableInterface | Method | Accessor | FamixFunction): void {
|
|
18
|
-
this.parentGeneric = parentGeneric;
|
|
19
|
-
parentGeneric.addParameterType(this);
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
public getJSON(): string {
|
|
24
|
-
const json: FamixJSONExporter = new FamixJSONExporter("ParameterType", this);
|
|
25
|
-
this.addPropertiesToExporter(json);
|
|
26
|
-
return json.getJSON();
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
30
|
-
super.addPropertiesToExporter(exporter);
|
|
31
|
-
exporter.addProperty("parentGeneric", this.getParentGeneric());
|
|
32
|
-
}
|
|
33
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { Class } from "./class";
|
|
3
|
-
import { ParameterType } from "./parameter_type";
|
|
4
|
-
|
|
5
|
-
export class ParameterizableClass extends Class {
|
|
6
|
-
|
|
7
|
-
private parameterTypes: Set<ParameterType> = new Set();
|
|
8
|
-
|
|
9
|
-
public getParameterTypes(): Set<ParameterType> {
|
|
10
|
-
return this.parameterTypes;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
public addParameterType(parameterType: ParameterType): void {
|
|
14
|
-
if (!this.parameterTypes.has(parameterType)) {
|
|
15
|
-
this.parameterTypes.add(parameterType);
|
|
16
|
-
parameterType.setParentGeneric(this);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
public getJSON(): string {
|
|
22
|
-
const json: FamixJSONExporter = new FamixJSONExporter("ParameterizableClass", this);
|
|
23
|
-
this.addPropertiesToExporter(json);
|
|
24
|
-
return json.getJSON();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
28
|
-
super.addPropertiesToExporter(exporter);
|
|
29
|
-
exporter.addProperty("parameterTypes", this.getParameterTypes());
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { Interface } from "./interface";
|
|
3
|
-
import { ParameterType } from "./parameter_type";
|
|
4
|
-
|
|
5
|
-
export class ParameterizableInterface extends Interface {
|
|
6
|
-
|
|
7
|
-
private parameterTypes: Set<ParameterType> = new Set();
|
|
8
|
-
|
|
9
|
-
public getParameterTypes(): Set<ParameterType> {
|
|
10
|
-
return this.parameterTypes;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
public addParameterType(parameterType: ParameterType): void {
|
|
14
|
-
if (!this.parameterTypes.has(parameterType)) {
|
|
15
|
-
this.parameterTypes.add(parameterType);
|
|
16
|
-
parameterType.setParentGeneric(this);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
public getJSON(): string {
|
|
22
|
-
const json: FamixJSONExporter = new FamixJSONExporter("ParameterizableInterface", this);
|
|
23
|
-
this.addPropertiesToExporter(json);
|
|
24
|
-
return json.getJSON();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
28
|
-
super.addPropertiesToExporter(exporter);
|
|
29
|
-
exporter.addProperty("parameterTypes", this.getParameterTypes());
|
|
30
|
-
}
|
|
31
|
-
}
|
|
@@ -1,40 +0,0 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { Type } from "./type";
|
|
3
|
-
|
|
4
|
-
export class ParameterizedType extends Type {
|
|
5
|
-
|
|
6
|
-
private baseType: Type;
|
|
7
|
-
|
|
8
|
-
public getBaseType(): Type {
|
|
9
|
-
return this.baseType;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
public setBaseType(baseType: Type): void {
|
|
13
|
-
this.baseType = baseType;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
private arguments: Set<Type> = new Set();
|
|
17
|
-
|
|
18
|
-
public getArguments(): Set<Type> {
|
|
19
|
-
return this.arguments;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
public addArgument(argument: Type): void {
|
|
23
|
-
if (!this.arguments.has(argument)) {
|
|
24
|
-
this.arguments.add(argument);
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
public getJSON(): string {
|
|
30
|
-
const json: FamixJSONExporter = new FamixJSONExporter("ParameterizedType", this);
|
|
31
|
-
this.addPropertiesToExporter(json);
|
|
32
|
-
return json.getJSON();
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
36
|
-
super.addPropertiesToExporter(exporter);
|
|
37
|
-
exporter.addProperty("baseType", this.getBaseType());
|
|
38
|
-
exporter.addProperty("arguments", this.getArguments());
|
|
39
|
-
}
|
|
40
|
-
}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { Type } from "./type";
|
|
3
|
-
|
|
4
|
-
export class PrimitiveType extends Type {
|
|
5
|
-
|
|
6
|
-
public getJSON(): string {
|
|
7
|
-
const json: FamixJSONExporter = new FamixJSONExporter("PrimitiveType", this);
|
|
8
|
-
this.addPropertiesToExporter(json);
|
|
9
|
-
return json.getJSON();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
13
|
-
super.addPropertiesToExporter(exporter);
|
|
14
|
-
}
|
|
15
|
-
}
|