ts2famix 1.0.12 → 1.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.eslintrc.json +24 -24
- package/LICENSE +23 -23
- package/README.md +109 -109
- package/dist/analyze.js +107 -0
- package/dist/analyze_functions/processAccesses.js +55 -0
- package/dist/analyze_functions/processFiles.js +554 -0
- package/dist/analyze_functions/processImportClauses.js +70 -0
- package/dist/analyze_functions/processInheritances.js +73 -0
- package/dist/analyze_functions/processInvocations.js +49 -0
- package/dist/famix2puml.js +125 -0
- package/dist/famix_functions/famix_functions.js +520 -0
- package/dist/famix_functions/famix_functions_associations.js +213 -0
- package/dist/famix_functions/famix_functions_index.js +62 -0
- package/dist/famix_functions/famix_functions_types.js +114 -0
- package/dist/fqn.js +126 -0
- package/dist/lib/famix/src/famix_JSON_exporter.js +54 -0
- package/dist/lib/famix/src/famix_base_element.js +13 -0
- package/dist/lib/famix/src/famix_repository.js +187 -0
- package/dist/lib/famix/src/index.js +30 -0
- package/dist/lib/famix/src/model/famix/access.js +39 -0
- package/dist/lib/famix/src/model/famix/accessor.js +16 -0
- package/dist/lib/famix/src/model/famix/alias.js +32 -0
- package/dist/lib/famix/src/model/famix/association.js +36 -0
- package/dist/lib/famix/src/model/famix/behavioral_entity.js +81 -0
- package/dist/lib/famix/src/model/famix/c_source_language.js +16 -0
- package/dist/lib/famix/src/model/famix/class.js +70 -0
- package/dist/lib/famix/src/model/famix/comment.js +38 -0
- package/dist/lib/famix/src/model/famix/container_entity.js +125 -0
- package/dist/lib/famix/src/model/famix/custom_source_language.js +23 -0
- package/dist/lib/famix/src/model/famix/decorator.js +31 -0
- package/dist/lib/famix/src/model/famix/entity.js +16 -0
- package/dist/lib/famix/src/model/famix/enum.js +30 -0
- package/dist/lib/famix/src/model/famix/enum_value.js +24 -0
- package/dist/lib/famix/src/model/famix/function.js +16 -0
- package/dist/lib/famix/src/model/famix/implicit_variable.js +16 -0
- package/dist/lib/famix/src/model/famix/import_clause.js +39 -0
- package/dist/lib/famix/src/model/famix/index.js +87 -0
- package/dist/lib/famix/src/model/famix/indexed_file_anchor.js +37 -0
- package/dist/lib/famix/src/model/famix/inheritance.js +32 -0
- package/dist/lib/famix/src/model/famix/interface.js +63 -0
- package/dist/lib/famix/src/model/famix/invocation.js +53 -0
- package/dist/lib/famix/src/model/famix/method.js +66 -0
- package/dist/lib/famix/src/model/famix/module.js +30 -0
- package/dist/lib/famix/src/model/famix/named_entity.js +77 -0
- package/dist/lib/famix/src/model/famix/namespace.js +24 -0
- package/dist/lib/famix/src/model/famix/parameter.js +24 -0
- package/dist/lib/famix/src/model/famix/parameterizable_class.js +30 -0
- package/dist/lib/famix/src/model/famix/parameterizable_interface.js +30 -0
- package/dist/lib/famix/src/model/famix/parameterized_type.js +36 -0
- package/dist/lib/famix/src/model/famix/primitive_type.js +16 -0
- package/dist/lib/famix/src/model/famix/property.js +44 -0
- package/dist/lib/famix/src/model/famix/reference.js +32 -0
- package/dist/lib/famix/src/model/famix/scoping_entity.js +30 -0
- package/dist/lib/famix/src/model/famix/script_entity.js +30 -0
- package/dist/lib/famix/src/model/famix/source_anchor.js +26 -0
- package/dist/lib/famix/src/model/famix/source_language.js +30 -0
- package/dist/lib/famix/src/model/famix/sourced_entity.js +55 -0
- package/dist/lib/famix/src/model/famix/structural_entity.js +38 -0
- package/dist/lib/famix/src/model/famix/text_anchor.js +37 -0
- package/dist/lib/famix/src/model/famix/type.js +71 -0
- package/dist/lib/famix/src/model/famix/type_parameter.js +24 -0
- package/dist/lib/famix/src/model/famix/variable.js +23 -0
- package/dist/lib/ts-complex/cyclomatic-service.js +83 -0
- package/dist/ts2famix-cli.js +63 -0
- package/dist/ts2famix-tsconfig.js +53 -0
- package/jest.config-old.ts +199 -199
- package/package.json +47 -47
- package/src/analyze.ts +94 -94
- package/src/analyze_functions/processAccesses.ts +57 -57
- package/src/analyze_functions/processFiles.ts +669 -669
- package/src/analyze_functions/processImportClauses.ts +77 -77
- package/src/analyze_functions/processInheritances.ts +84 -84
- package/src/analyze_functions/processInvocations.ts +51 -51
- package/src/famix2puml.ts +119 -119
- package/src/famix_functions/famix_functions.ts +559 -559
- package/src/famix_functions/famix_functions_associations.ts +215 -215
- package/src/famix_functions/famix_functions_index.ts +44 -44
- package/src/famix_functions/famix_functions_types.ts +105 -105
- package/src/generate_uml.sh +16 -16
- package/src/lib/famix/License.md +22 -22
- package/src/lib/famix/package-lock.json +301 -301
- package/src/lib/famix/package.json +27 -27
- package/src/lib/famix/readme.md +4 -4
- package/src/lib/famix/src/famix_JSON_exporter.ts +56 -56
- package/src/lib/famix/src/famix_base_element.ts +18 -18
- package/src/lib/famix/src/famix_repository.ts +199 -199
- package/src/lib/famix/src/index.ts +8 -8
- package/src/lib/famix/src/model/famix/access.ts +53 -53
- package/src/lib/famix/src/model/famix/accessor.ts +15 -15
- package/src/lib/famix/src/model/famix/alias.ts +41 -41
- package/src/lib/famix/src/model/famix/association.ts +44 -44
- package/src/lib/famix/src/model/famix/behavioral_entity.ts +107 -107
- package/src/lib/famix/src/model/famix/c_source_language.ts +15 -15
- package/src/lib/famix/src/model/famix/class.ts +86 -86
- package/src/lib/famix/src/model/famix/comment.ts +50 -50
- package/src/lib/famix/src/model/famix/container_entity.ts +165 -165
- package/src/lib/famix/src/model/famix/custom_source_language.ts +27 -27
- package/src/lib/famix/src/model/famix/decorator.ts +39 -39
- package/src/lib/famix/src/model/famix/entity.ts +15 -15
- package/src/lib/famix/src/model/famix/enum.ts +31 -31
- package/src/lib/famix/src/model/famix/enum_value.ts +29 -29
- package/src/lib/famix/src/model/famix/function.ts +15 -15
- package/src/lib/famix/src/model/famix/implicit_variable.ts +15 -15
- package/src/lib/famix/src/model/famix/import_clause.ts +53 -53
- package/src/lib/famix/src/model/famix/index.ts +42 -42
- package/src/lib/famix/src/model/famix/indexed_file_anchor.ts +49 -49
- package/src/lib/famix/src/model/famix/inheritance.ts +42 -42
- package/src/lib/famix/src/model/famix/interface.ts +75 -75
- package/src/lib/famix/src/model/famix/invocation.ts +68 -68
- package/src/lib/famix/src/model/famix/method.ts +96 -96
- package/src/lib/famix/src/model/famix/module.ts +31 -31
- package/src/lib/famix/src/model/famix/named_entity.ts +98 -98
- package/src/lib/famix/src/model/famix/namespace.ts +28 -28
- package/src/lib/famix/src/model/famix/parameter.ts +29 -29
- package/src/lib/famix/src/model/famix/parameterizable_class.ts +31 -31
- package/src/lib/famix/src/model/famix/parameterizable_interface.ts +31 -31
- package/src/lib/famix/src/model/famix/parameterized_type.ts +40 -40
- package/src/lib/famix/src/model/famix/primitive_type.ts +15 -15
- package/src/lib/famix/src/model/famix/property.ts +54 -54
- package/src/lib/famix/src/model/famix/reference.ts +42 -42
- package/src/lib/famix/src/model/famix/scoping_entity.ts +31 -31
- package/src/lib/famix/src/model/famix/script_entity.ts +38 -38
- package/src/lib/famix/src/model/famix/source_anchor.ts +31 -31
- package/src/lib/famix/src/model/famix/source_language.ts +31 -31
- package/src/lib/famix/src/model/famix/sourced_entity.ts +70 -70
- package/src/lib/famix/src/model/famix/structural_entity.ts +44 -44
- package/src/lib/famix/src/model/famix/text_anchor.ts +49 -49
- package/src/lib/famix/src/model/famix/type.ts +88 -88
- package/src/lib/famix/src/model/famix/type_parameter.ts +33 -33
- package/src/lib/famix/src/model/famix/variable.ts +28 -28
- package/src/lib/famix/tsconfig.json +26 -26
- package/src/lib/famix/tslint.json +14 -14
- package/src/lib/ts-complex/cyclomatic-service.ts +85 -85
- package/src/ts2famix-cli.ts +39 -39
- package/tsconfig.json +69 -69
|
@@ -1,53 +1,53 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { StructuralEntity } from "./structural_entity";
|
|
3
|
-
import { Association } from "./association";
|
|
4
|
-
import { ContainerEntity } from "./container_entity";
|
|
5
|
-
|
|
6
|
-
export class Access extends Association {
|
|
7
|
-
|
|
8
|
-
private accessor: ContainerEntity;
|
|
9
|
-
|
|
10
|
-
public getAccessor(): ContainerEntity {
|
|
11
|
-
return this.accessor;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public setAccessor(accessor: ContainerEntity): void {
|
|
15
|
-
this.accessor = accessor;
|
|
16
|
-
accessor.addAccess(this);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
private variable: StructuralEntity;
|
|
20
|
-
|
|
21
|
-
public getVariable(): StructuralEntity {
|
|
22
|
-
return this.variable;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
public setVariable(variable: StructuralEntity): void {
|
|
26
|
-
this.variable = variable;
|
|
27
|
-
variable.addIncomingAccess(this);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
private isWrite: boolean;
|
|
31
|
-
|
|
32
|
-
public getIsWrite(): boolean {
|
|
33
|
-
return this.isWrite;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
public setIsWrite(isWrite: boolean): void {
|
|
37
|
-
this.isWrite = isWrite;
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
public getJSON(): string {
|
|
42
|
-
const mse: FamixJSONExporter = new FamixJSONExporter("Access", this);
|
|
43
|
-
this.addPropertiesToExporter(mse);
|
|
44
|
-
return mse.getJSON();
|
|
45
|
-
}
|
|
46
|
-
|
|
47
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
48
|
-
super.addPropertiesToExporter(exporter);
|
|
49
|
-
exporter.addProperty("accessor", this.getAccessor());
|
|
50
|
-
exporter.addProperty("variable", this.getVariable());
|
|
51
|
-
exporter.addProperty("isWrite", this.getIsWrite());
|
|
52
|
-
}
|
|
53
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { StructuralEntity } from "./structural_entity";
|
|
3
|
+
import { Association } from "./association";
|
|
4
|
+
import { ContainerEntity } from "./container_entity";
|
|
5
|
+
|
|
6
|
+
export class Access extends Association {
|
|
7
|
+
|
|
8
|
+
private accessor: ContainerEntity;
|
|
9
|
+
|
|
10
|
+
public getAccessor(): ContainerEntity {
|
|
11
|
+
return this.accessor;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public setAccessor(accessor: ContainerEntity): void {
|
|
15
|
+
this.accessor = accessor;
|
|
16
|
+
accessor.addAccess(this);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
private variable: StructuralEntity;
|
|
20
|
+
|
|
21
|
+
public getVariable(): StructuralEntity {
|
|
22
|
+
return this.variable;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public setVariable(variable: StructuralEntity): void {
|
|
26
|
+
this.variable = variable;
|
|
27
|
+
variable.addIncomingAccess(this);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
private isWrite: boolean;
|
|
31
|
+
|
|
32
|
+
public getIsWrite(): boolean {
|
|
33
|
+
return this.isWrite;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public setIsWrite(isWrite: boolean): void {
|
|
37
|
+
this.isWrite = isWrite;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
public getJSON(): string {
|
|
42
|
+
const mse: FamixJSONExporter = new FamixJSONExporter("Access", this);
|
|
43
|
+
this.addPropertiesToExporter(mse);
|
|
44
|
+
return mse.getJSON();
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
48
|
+
super.addPropertiesToExporter(exporter);
|
|
49
|
+
exporter.addProperty("accessor", this.getAccessor());
|
|
50
|
+
exporter.addProperty("variable", this.getVariable());
|
|
51
|
+
exporter.addProperty("isWrite", this.getIsWrite());
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -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 mse: FamixJSONExporter = new FamixJSONExporter("Accessor", this);
|
|
8
|
-
this.addPropertiesToExporter(mse);
|
|
9
|
-
return mse.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 mse: FamixJSONExporter = new FamixJSONExporter("Accessor", this);
|
|
8
|
+
this.addPropertiesToExporter(mse);
|
|
9
|
+
return mse.getJSON();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
13
|
+
super.addPropertiesToExporter(exporter);
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -1,41 +1,41 @@
|
|
|
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
|
-
|
|
9
|
-
public getParentEntity(): NamedEntity {
|
|
10
|
-
return this.parentEntity;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
public setParentEntity(parentEntity: NamedEntity): void {
|
|
14
|
-
this.parentEntity = parentEntity;
|
|
15
|
-
parentEntity.addAlias(this);
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
private aliasedEntity: Type;
|
|
19
|
-
|
|
20
|
-
public getAliasedEntity(): Type {
|
|
21
|
-
return this.aliasedEntity;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
public setAliasedEntity(aliasedEntity: Type): void {
|
|
25
|
-
this.aliasedEntity = aliasedEntity;
|
|
26
|
-
aliasedEntity.addTypeAlias(this);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
public getJSON(): string {
|
|
31
|
-
const mse: FamixJSONExporter = new FamixJSONExporter("Alias", this);
|
|
32
|
-
this.addPropertiesToExporter(mse);
|
|
33
|
-
return mse.getJSON();
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
37
|
-
super.addPropertiesToExporter(exporter);
|
|
38
|
-
exporter.addProperty("parentEntity", this.getParentEntity());
|
|
39
|
-
exporter.addProperty("aliasedEntity", this.getAliasedEntity());
|
|
40
|
-
}
|
|
41
|
-
}
|
|
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
|
+
|
|
9
|
+
public getParentEntity(): NamedEntity {
|
|
10
|
+
return this.parentEntity;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public setParentEntity(parentEntity: NamedEntity): void {
|
|
14
|
+
this.parentEntity = parentEntity;
|
|
15
|
+
parentEntity.addAlias(this);
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
private aliasedEntity: Type;
|
|
19
|
+
|
|
20
|
+
public getAliasedEntity(): Type {
|
|
21
|
+
return this.aliasedEntity;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
public setAliasedEntity(aliasedEntity: Type): void {
|
|
25
|
+
this.aliasedEntity = aliasedEntity;
|
|
26
|
+
aliasedEntity.addTypeAlias(this);
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
public getJSON(): string {
|
|
31
|
+
const mse: FamixJSONExporter = new FamixJSONExporter("Alias", this);
|
|
32
|
+
this.addPropertiesToExporter(mse);
|
|
33
|
+
return mse.getJSON();
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
37
|
+
super.addPropertiesToExporter(exporter);
|
|
38
|
+
exporter.addProperty("parentEntity", this.getParentEntity());
|
|
39
|
+
exporter.addProperty("aliasedEntity", this.getAliasedEntity());
|
|
40
|
+
}
|
|
41
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { SourcedEntity } from "./sourced_entity";
|
|
3
|
-
|
|
4
|
-
export class Association extends SourcedEntity {
|
|
5
|
-
|
|
6
|
-
private next: Association;
|
|
7
|
-
|
|
8
|
-
public getNext(): Association {
|
|
9
|
-
return this.next;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
public setNext(next: Association): void {
|
|
13
|
-
if (this.next === undefined) {
|
|
14
|
-
this.next = next;
|
|
15
|
-
next.setPrevious(this);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
private previous: Association;
|
|
20
|
-
|
|
21
|
-
public getPrevious(): Association {
|
|
22
|
-
return this.previous;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
public setPrevious(previous: Association): void {
|
|
26
|
-
if (this.previous === undefined) {
|
|
27
|
-
this.previous = previous;
|
|
28
|
-
previous.setNext(this);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
public getJSON(): string {
|
|
34
|
-
const mse: FamixJSONExporter = new FamixJSONExporter("Association", this);
|
|
35
|
-
this.addPropertiesToExporter(mse);
|
|
36
|
-
return mse.getJSON();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
40
|
-
super.addPropertiesToExporter(exporter);
|
|
41
|
-
exporter.addProperty("next", this.getNext());
|
|
42
|
-
exporter.addProperty("previous", this.getPrevious());
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { SourcedEntity } from "./sourced_entity";
|
|
3
|
+
|
|
4
|
+
export class Association extends SourcedEntity {
|
|
5
|
+
|
|
6
|
+
private next: Association;
|
|
7
|
+
|
|
8
|
+
public getNext(): Association {
|
|
9
|
+
return this.next;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public setNext(next: Association): void {
|
|
13
|
+
if (this.next === undefined) {
|
|
14
|
+
this.next = next;
|
|
15
|
+
next.setPrevious(this);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
private previous: Association;
|
|
20
|
+
|
|
21
|
+
public getPrevious(): Association {
|
|
22
|
+
return this.previous;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public setPrevious(previous: Association): void {
|
|
26
|
+
if (this.previous === undefined) {
|
|
27
|
+
this.previous = previous;
|
|
28
|
+
previous.setNext(this);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
public getJSON(): string {
|
|
34
|
+
const mse: FamixJSONExporter = new FamixJSONExporter("Association", this);
|
|
35
|
+
this.addPropertiesToExporter(mse);
|
|
36
|
+
return mse.getJSON();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
40
|
+
super.addPropertiesToExporter(exporter);
|
|
41
|
+
exporter.addProperty("next", this.getNext());
|
|
42
|
+
exporter.addProperty("previous", this.getPrevious());
|
|
43
|
+
}
|
|
44
|
+
}
|
|
@@ -1,107 +1,107 @@
|
|
|
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 { TypeParameter } from "./type_parameter";
|
|
7
|
-
|
|
8
|
-
export class BehavioralEntity extends ContainerEntity {
|
|
9
|
-
|
|
10
|
-
private isGeneric: boolean;
|
|
11
|
-
|
|
12
|
-
public getIsGeneric(): boolean {
|
|
13
|
-
return this.isGeneric;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
public setIsGeneric(isGeneric: boolean): void {
|
|
17
|
-
this.isGeneric = isGeneric;
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
private signature: string;
|
|
21
|
-
|
|
22
|
-
public getSignature(): string {
|
|
23
|
-
return this.signature;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
public setSignature(signature: string): void {
|
|
27
|
-
this.signature = signature;
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
private parameters: Set<Parameter> = new Set();
|
|
31
|
-
|
|
32
|
-
public getParameters(): Set<Parameter> {
|
|
33
|
-
return this.parameters;
|
|
34
|
-
}
|
|
35
|
-
|
|
36
|
-
public addParameter(parameter: Parameter): void {
|
|
37
|
-
if (!this.parameters.has(parameter)) {
|
|
38
|
-
this.parameters.add(parameter);
|
|
39
|
-
parameter.setParentEntity(this);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
private numberOfParameters: number;
|
|
44
|
-
|
|
45
|
-
public getNumberOfParameters(): number {
|
|
46
|
-
return this.numberOfParameters;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
public setNumberOfParameters(numberOfParameters: number): void {
|
|
50
|
-
this.numberOfParameters = numberOfParameters;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
private incomingInvocations: Set<Invocation> = new Set();
|
|
54
|
-
|
|
55
|
-
public getIncomingInvocations(): Set<Invocation> {
|
|
56
|
-
return this.incomingInvocations;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
public addIncomingInvocation(incomingInvocation: Invocation): void {
|
|
60
|
-
if (!this.incomingInvocations.has(incomingInvocation)) {
|
|
61
|
-
this.incomingInvocations.add(incomingInvocation);
|
|
62
|
-
incomingInvocation.addCandidate(this);
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
private declaredType: Type;
|
|
67
|
-
|
|
68
|
-
public getDeclaredType(): Type {
|
|
69
|
-
return this.declaredType;
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
public setDeclaredType(declaredType: Type): void {
|
|
73
|
-
this.declaredType = declaredType;
|
|
74
|
-
declaredType.addBehavioralEntityWithDeclaredType(this);
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
private typeParameters: Set<TypeParameter> = new Set();
|
|
78
|
-
|
|
79
|
-
public getTypeParameters(): Set<TypeParameter> {
|
|
80
|
-
return this.typeParameters;
|
|
81
|
-
}
|
|
82
|
-
|
|
83
|
-
public addTypeParameter(typeParameter: TypeParameter): void {
|
|
84
|
-
if (!this.typeParameters.has(typeParameter)) {
|
|
85
|
-
this.typeParameters.add(typeParameter);
|
|
86
|
-
typeParameter.setParentGeneric(this);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
public getJSON(): string {
|
|
92
|
-
const mse: FamixJSONExporter = new FamixJSONExporter("BehavioralEntity", this);
|
|
93
|
-
this.addPropertiesToExporter(mse);
|
|
94
|
-
return mse.getJSON();
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
98
|
-
super.addPropertiesToExporter(exporter);
|
|
99
|
-
exporter.addProperty("isGeneric", this.getIsGeneric());
|
|
100
|
-
exporter.addProperty("signature", this.getSignature());
|
|
101
|
-
exporter.addProperty("parameters", this.getParameters());
|
|
102
|
-
exporter.addProperty("numberOfParameters", this.getNumberOfParameters());
|
|
103
|
-
exporter.addProperty("incomingInvocations", this.getIncomingInvocations());
|
|
104
|
-
exporter.addProperty("declaredType", this.getDeclaredType());
|
|
105
|
-
exporter.addProperty("typeParameters", this.getTypeParameters());
|
|
106
|
-
}
|
|
107
|
-
}
|
|
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 { TypeParameter } from "./type_parameter";
|
|
7
|
+
|
|
8
|
+
export class BehavioralEntity extends ContainerEntity {
|
|
9
|
+
|
|
10
|
+
private isGeneric: boolean;
|
|
11
|
+
|
|
12
|
+
public getIsGeneric(): boolean {
|
|
13
|
+
return this.isGeneric;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
public setIsGeneric(isGeneric: boolean): void {
|
|
17
|
+
this.isGeneric = isGeneric;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
private signature: string;
|
|
21
|
+
|
|
22
|
+
public getSignature(): string {
|
|
23
|
+
return this.signature;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
public setSignature(signature: string): void {
|
|
27
|
+
this.signature = signature;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
private parameters: Set<Parameter> = new Set();
|
|
31
|
+
|
|
32
|
+
public getParameters(): Set<Parameter> {
|
|
33
|
+
return this.parameters;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
public addParameter(parameter: Parameter): void {
|
|
37
|
+
if (!this.parameters.has(parameter)) {
|
|
38
|
+
this.parameters.add(parameter);
|
|
39
|
+
parameter.setParentEntity(this);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
private numberOfParameters: number;
|
|
44
|
+
|
|
45
|
+
public getNumberOfParameters(): number {
|
|
46
|
+
return this.numberOfParameters;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
public setNumberOfParameters(numberOfParameters: number): void {
|
|
50
|
+
this.numberOfParameters = numberOfParameters;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
private incomingInvocations: Set<Invocation> = new Set();
|
|
54
|
+
|
|
55
|
+
public getIncomingInvocations(): Set<Invocation> {
|
|
56
|
+
return this.incomingInvocations;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
public addIncomingInvocation(incomingInvocation: Invocation): void {
|
|
60
|
+
if (!this.incomingInvocations.has(incomingInvocation)) {
|
|
61
|
+
this.incomingInvocations.add(incomingInvocation);
|
|
62
|
+
incomingInvocation.addCandidate(this);
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
private declaredType: Type;
|
|
67
|
+
|
|
68
|
+
public getDeclaredType(): Type {
|
|
69
|
+
return this.declaredType;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
public setDeclaredType(declaredType: Type): void {
|
|
73
|
+
this.declaredType = declaredType;
|
|
74
|
+
declaredType.addBehavioralEntityWithDeclaredType(this);
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
private typeParameters: Set<TypeParameter> = new Set();
|
|
78
|
+
|
|
79
|
+
public getTypeParameters(): Set<TypeParameter> {
|
|
80
|
+
return this.typeParameters;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
public addTypeParameter(typeParameter: TypeParameter): void {
|
|
84
|
+
if (!this.typeParameters.has(typeParameter)) {
|
|
85
|
+
this.typeParameters.add(typeParameter);
|
|
86
|
+
typeParameter.setParentGeneric(this);
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
public getJSON(): string {
|
|
92
|
+
const mse: FamixJSONExporter = new FamixJSONExporter("BehavioralEntity", this);
|
|
93
|
+
this.addPropertiesToExporter(mse);
|
|
94
|
+
return mse.getJSON();
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
98
|
+
super.addPropertiesToExporter(exporter);
|
|
99
|
+
exporter.addProperty("isGeneric", this.getIsGeneric());
|
|
100
|
+
exporter.addProperty("signature", this.getSignature());
|
|
101
|
+
exporter.addProperty("parameters", this.getParameters());
|
|
102
|
+
exporter.addProperty("numberOfParameters", this.getNumberOfParameters());
|
|
103
|
+
exporter.addProperty("incomingInvocations", this.getIncomingInvocations());
|
|
104
|
+
exporter.addProperty("declaredType", this.getDeclaredType());
|
|
105
|
+
exporter.addProperty("typeParameters", this.getTypeParameters());
|
|
106
|
+
}
|
|
107
|
+
}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { SourceLanguage } from "./source_language";
|
|
3
|
-
|
|
4
|
-
export class CSourceLanguage extends SourceLanguage {
|
|
5
|
-
|
|
6
|
-
public getJSON(): string {
|
|
7
|
-
const mse: FamixJSONExporter = new FamixJSONExporter("CSourceLanguage", this);
|
|
8
|
-
this.addPropertiesToExporter(mse);
|
|
9
|
-
return mse.getJSON();
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
13
|
-
super.addPropertiesToExporter(exporter);
|
|
14
|
-
}
|
|
15
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { SourceLanguage } from "./source_language";
|
|
3
|
+
|
|
4
|
+
export class CSourceLanguage extends SourceLanguage {
|
|
5
|
+
|
|
6
|
+
public getJSON(): string {
|
|
7
|
+
const mse: FamixJSONExporter = new FamixJSONExporter("CSourceLanguage", this);
|
|
8
|
+
this.addPropertiesToExporter(mse);
|
|
9
|
+
return mse.getJSON();
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
13
|
+
super.addPropertiesToExporter(exporter);
|
|
14
|
+
}
|
|
15
|
+
}
|