ts2famix 1.0.13 → 1.0.15
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 +525 -0
- package/dist/famix_functions/famix_functions_associations.js +223 -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 +199 -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 +31 -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 +34 -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 +565 -559
- package/src/famix_functions/famix_functions_associations.ts +225 -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 +212 -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 +34 -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
|
@@ -1,42 +1,42 @@
|
|
|
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 mse: FamixJSONExporter = new FamixJSONExporter("Inheritance", this);
|
|
33
|
-
this.addPropertiesToExporter(mse);
|
|
34
|
-
return mse.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
|
+
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 mse: FamixJSONExporter = new FamixJSONExporter("Inheritance", this);
|
|
33
|
+
this.addPropertiesToExporter(mse);
|
|
34
|
+
return mse.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 +1,75 @@
|
|
|
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 mse: FamixJSONExporter = new FamixJSONExporter("Interface", this);
|
|
64
|
-
this.addPropertiesToExporter(mse);
|
|
65
|
-
return mse.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
|
+
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 mse: FamixJSONExporter = new FamixJSONExporter("Interface", this);
|
|
64
|
+
this.addPropertiesToExporter(mse);
|
|
65
|
+
return mse.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 +1,68 @@
|
|
|
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 mse: FamixJSONExporter = new FamixJSONExporter("Invocation", this);
|
|
57
|
-
this.addPropertiesToExporter(mse);
|
|
58
|
-
return mse.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
|
+
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 mse: FamixJSONExporter = new FamixJSONExporter("Invocation", this);
|
|
57
|
+
this.addPropertiesToExporter(mse);
|
|
58
|
+
return mse.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 +1,96 @@
|
|
|
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 mse: FamixJSONExporter = new FamixJSONExporter("Method", this);
|
|
82
|
-
this.addPropertiesToExporter(mse);
|
|
83
|
-
return mse.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
|
+
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 mse: FamixJSONExporter = new FamixJSONExporter("Method", this);
|
|
82
|
+
this.addPropertiesToExporter(mse);
|
|
83
|
+
return mse.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 +1,31 @@
|
|
|
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
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
public getJSON(): string {
|
|
22
|
-
const mse: FamixJSONExporter = new FamixJSONExporter("Module", this);
|
|
23
|
-
this.addPropertiesToExporter(mse);
|
|
24
|
-
return mse.getJSON();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
28
|
-
super.addPropertiesToExporter(exporter);
|
|
29
|
-
exporter.addProperty("
|
|
30
|
-
}
|
|
31
|
-
}
|
|
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 mse: FamixJSONExporter = new FamixJSONExporter("Module", this);
|
|
23
|
+
this.addPropertiesToExporter(mse);
|
|
24
|
+
return mse.getJSON();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
28
|
+
super.addPropertiesToExporter(exporter);
|
|
29
|
+
exporter.addProperty("outgoingImports", this.getOutgoingImports());
|
|
30
|
+
}
|
|
31
|
+
}
|