ts2famix 1.0.13 → 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.
Files changed (135) hide show
  1. package/.eslintrc.json +24 -24
  2. package/LICENSE +23 -23
  3. package/README.md +109 -109
  4. package/dist/analyze.js +107 -0
  5. package/dist/analyze_functions/processAccesses.js +55 -0
  6. package/dist/analyze_functions/processFiles.js +554 -0
  7. package/dist/analyze_functions/processImportClauses.js +70 -0
  8. package/dist/analyze_functions/processInheritances.js +73 -0
  9. package/dist/analyze_functions/processInvocations.js +49 -0
  10. package/dist/famix2puml.js +125 -0
  11. package/dist/famix_functions/famix_functions.js +520 -0
  12. package/dist/famix_functions/famix_functions_associations.js +213 -0
  13. package/dist/famix_functions/famix_functions_index.js +62 -0
  14. package/dist/famix_functions/famix_functions_types.js +114 -0
  15. package/dist/fqn.js +126 -0
  16. package/dist/lib/famix/src/famix_JSON_exporter.js +54 -0
  17. package/dist/lib/famix/src/famix_base_element.js +13 -0
  18. package/dist/lib/famix/src/famix_repository.js +187 -0
  19. package/dist/lib/famix/src/index.js +30 -0
  20. package/dist/lib/famix/src/model/famix/access.js +39 -0
  21. package/dist/lib/famix/src/model/famix/accessor.js +16 -0
  22. package/dist/lib/famix/src/model/famix/alias.js +32 -0
  23. package/dist/lib/famix/src/model/famix/association.js +36 -0
  24. package/dist/lib/famix/src/model/famix/behavioral_entity.js +81 -0
  25. package/dist/lib/famix/src/model/famix/c_source_language.js +16 -0
  26. package/dist/lib/famix/src/model/famix/class.js +70 -0
  27. package/dist/lib/famix/src/model/famix/comment.js +38 -0
  28. package/dist/lib/famix/src/model/famix/container_entity.js +125 -0
  29. package/dist/lib/famix/src/model/famix/custom_source_language.js +23 -0
  30. package/dist/lib/famix/src/model/famix/decorator.js +31 -0
  31. package/dist/lib/famix/src/model/famix/entity.js +16 -0
  32. package/dist/lib/famix/src/model/famix/enum.js +30 -0
  33. package/dist/lib/famix/src/model/famix/enum_value.js +24 -0
  34. package/dist/lib/famix/src/model/famix/function.js +16 -0
  35. package/dist/lib/famix/src/model/famix/implicit_variable.js +16 -0
  36. package/dist/lib/famix/src/model/famix/import_clause.js +39 -0
  37. package/dist/lib/famix/src/model/famix/index.js +87 -0
  38. package/dist/lib/famix/src/model/famix/indexed_file_anchor.js +37 -0
  39. package/dist/lib/famix/src/model/famix/inheritance.js +32 -0
  40. package/dist/lib/famix/src/model/famix/interface.js +63 -0
  41. package/dist/lib/famix/src/model/famix/invocation.js +53 -0
  42. package/dist/lib/famix/src/model/famix/method.js +66 -0
  43. package/dist/lib/famix/src/model/famix/module.js +30 -0
  44. package/dist/lib/famix/src/model/famix/named_entity.js +77 -0
  45. package/dist/lib/famix/src/model/famix/namespace.js +24 -0
  46. package/dist/lib/famix/src/model/famix/parameter.js +24 -0
  47. package/dist/lib/famix/src/model/famix/parameterizable_class.js +30 -0
  48. package/dist/lib/famix/src/model/famix/parameterizable_interface.js +30 -0
  49. package/dist/lib/famix/src/model/famix/parameterized_type.js +36 -0
  50. package/dist/lib/famix/src/model/famix/primitive_type.js +16 -0
  51. package/dist/lib/famix/src/model/famix/property.js +44 -0
  52. package/dist/lib/famix/src/model/famix/reference.js +32 -0
  53. package/dist/lib/famix/src/model/famix/scoping_entity.js +30 -0
  54. package/dist/lib/famix/src/model/famix/script_entity.js +30 -0
  55. package/dist/lib/famix/src/model/famix/source_anchor.js +26 -0
  56. package/dist/lib/famix/src/model/famix/source_language.js +30 -0
  57. package/dist/lib/famix/src/model/famix/sourced_entity.js +55 -0
  58. package/dist/lib/famix/src/model/famix/structural_entity.js +38 -0
  59. package/dist/lib/famix/src/model/famix/text_anchor.js +37 -0
  60. package/dist/lib/famix/src/model/famix/type.js +71 -0
  61. package/dist/lib/famix/src/model/famix/type_parameter.js +24 -0
  62. package/dist/lib/famix/src/model/famix/variable.js +23 -0
  63. package/dist/lib/ts-complex/cyclomatic-service.js +83 -0
  64. package/dist/ts2famix-cli.js +63 -0
  65. package/dist/ts2famix-tsconfig.js +53 -0
  66. package/jest.config-old.ts +199 -199
  67. package/package.json +47 -47
  68. package/src/analyze.ts +94 -94
  69. package/src/analyze_functions/processAccesses.ts +57 -57
  70. package/src/analyze_functions/processFiles.ts +669 -669
  71. package/src/analyze_functions/processImportClauses.ts +77 -77
  72. package/src/analyze_functions/processInheritances.ts +84 -84
  73. package/src/analyze_functions/processInvocations.ts +51 -51
  74. package/src/famix2puml.ts +119 -119
  75. package/src/famix_functions/famix_functions.ts +559 -559
  76. package/src/famix_functions/famix_functions_associations.ts +215 -215
  77. package/src/famix_functions/famix_functions_index.ts +44 -44
  78. package/src/famix_functions/famix_functions_types.ts +105 -105
  79. package/src/generate_uml.sh +16 -16
  80. package/src/lib/famix/License.md +22 -22
  81. package/src/lib/famix/package-lock.json +301 -301
  82. package/src/lib/famix/package.json +27 -27
  83. package/src/lib/famix/readme.md +4 -4
  84. package/src/lib/famix/src/famix_JSON_exporter.ts +56 -56
  85. package/src/lib/famix/src/famix_base_element.ts +18 -18
  86. package/src/lib/famix/src/famix_repository.ts +199 -199
  87. package/src/lib/famix/src/index.ts +8 -8
  88. package/src/lib/famix/src/model/famix/access.ts +53 -53
  89. package/src/lib/famix/src/model/famix/accessor.ts +15 -15
  90. package/src/lib/famix/src/model/famix/alias.ts +41 -41
  91. package/src/lib/famix/src/model/famix/association.ts +44 -44
  92. package/src/lib/famix/src/model/famix/behavioral_entity.ts +107 -107
  93. package/src/lib/famix/src/model/famix/c_source_language.ts +15 -15
  94. package/src/lib/famix/src/model/famix/class.ts +86 -86
  95. package/src/lib/famix/src/model/famix/comment.ts +50 -50
  96. package/src/lib/famix/src/model/famix/container_entity.ts +165 -165
  97. package/src/lib/famix/src/model/famix/custom_source_language.ts +27 -27
  98. package/src/lib/famix/src/model/famix/decorator.ts +39 -39
  99. package/src/lib/famix/src/model/famix/entity.ts +15 -15
  100. package/src/lib/famix/src/model/famix/enum.ts +31 -31
  101. package/src/lib/famix/src/model/famix/enum_value.ts +29 -29
  102. package/src/lib/famix/src/model/famix/function.ts +15 -15
  103. package/src/lib/famix/src/model/famix/implicit_variable.ts +15 -15
  104. package/src/lib/famix/src/model/famix/import_clause.ts +53 -53
  105. package/src/lib/famix/src/model/famix/index.ts +42 -42
  106. package/src/lib/famix/src/model/famix/indexed_file_anchor.ts +49 -49
  107. package/src/lib/famix/src/model/famix/inheritance.ts +42 -42
  108. package/src/lib/famix/src/model/famix/interface.ts +75 -75
  109. package/src/lib/famix/src/model/famix/invocation.ts +68 -68
  110. package/src/lib/famix/src/model/famix/method.ts +96 -96
  111. package/src/lib/famix/src/model/famix/module.ts +31 -31
  112. package/src/lib/famix/src/model/famix/named_entity.ts +98 -98
  113. package/src/lib/famix/src/model/famix/namespace.ts +28 -28
  114. package/src/lib/famix/src/model/famix/parameter.ts +29 -29
  115. package/src/lib/famix/src/model/famix/parameterizable_class.ts +31 -31
  116. package/src/lib/famix/src/model/famix/parameterizable_interface.ts +31 -31
  117. package/src/lib/famix/src/model/famix/parameterized_type.ts +40 -40
  118. package/src/lib/famix/src/model/famix/primitive_type.ts +15 -15
  119. package/src/lib/famix/src/model/famix/property.ts +54 -54
  120. package/src/lib/famix/src/model/famix/reference.ts +42 -42
  121. package/src/lib/famix/src/model/famix/scoping_entity.ts +31 -31
  122. package/src/lib/famix/src/model/famix/script_entity.ts +38 -38
  123. package/src/lib/famix/src/model/famix/source_anchor.ts +31 -31
  124. package/src/lib/famix/src/model/famix/source_language.ts +31 -31
  125. package/src/lib/famix/src/model/famix/sourced_entity.ts +70 -70
  126. package/src/lib/famix/src/model/famix/structural_entity.ts +44 -44
  127. package/src/lib/famix/src/model/famix/text_anchor.ts +49 -49
  128. package/src/lib/famix/src/model/famix/type.ts +88 -88
  129. package/src/lib/famix/src/model/famix/type_parameter.ts +33 -33
  130. package/src/lib/famix/src/model/famix/variable.ts +28 -28
  131. package/src/lib/famix/tsconfig.json +26 -26
  132. package/src/lib/famix/tslint.json +14 -14
  133. package/src/lib/ts-complex/cyclomatic-service.ts +85 -85
  134. package/src/ts2famix-cli.ts +39 -39
  135. package/tsconfig.json +69 -69
@@ -1,98 +1,98 @@
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 imports: Set<ImportClause> = new Set();
34
-
35
- public getImports(): Set<ImportClause> {
36
- return this.imports;
37
- }
38
-
39
- public addImport(anImport: ImportClause): void {
40
- if (!this.imports.has(anImport)) {
41
- this.imports.add(anImport);
42
- anImport.setImportedEntity(this);
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 mse: FamixJSONExporter = new FamixJSONExporter("NamedEntity", this);
85
- this.addPropertiesToExporter(mse);
86
- return mse.getJSON();
87
- }
88
-
89
- public addPropertiesToExporter(exporter: FamixJSONExporter): void {
90
- super.addPropertiesToExporter(exporter);
91
- exporter.addProperty("fullyQualifiedName", this.getFullyQualifiedName());
92
- exporter.addProperty("receivedInvocations", this.getReceivedInvocations());
93
- exporter.addProperty("imports", this.getImports());
94
- exporter.addProperty("name", this.getName());
95
- exporter.addProperty("aliases", this.getAliases());
96
- exporter.addProperty("decorators", this.getDecorators());
97
- }
98
- }
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 imports: Set<ImportClause> = new Set();
34
+
35
+ public getImports(): Set<ImportClause> {
36
+ return this.imports;
37
+ }
38
+
39
+ public addImport(anImport: ImportClause): void {
40
+ if (!this.imports.has(anImport)) {
41
+ this.imports.add(anImport);
42
+ anImport.setImportedEntity(this);
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 mse: FamixJSONExporter = new FamixJSONExporter("NamedEntity", this);
85
+ this.addPropertiesToExporter(mse);
86
+ return mse.getJSON();
87
+ }
88
+
89
+ public addPropertiesToExporter(exporter: FamixJSONExporter): void {
90
+ super.addPropertiesToExporter(exporter);
91
+ exporter.addProperty("fullyQualifiedName", this.getFullyQualifiedName());
92
+ exporter.addProperty("receivedInvocations", this.getReceivedInvocations());
93
+ exporter.addProperty("imports", this.getImports());
94
+ exporter.addProperty("name", this.getName());
95
+ exporter.addProperty("aliases", this.getAliases());
96
+ exporter.addProperty("decorators", this.getDecorators());
97
+ }
98
+ }
@@ -1,28 +1,28 @@
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 mse: FamixJSONExporter = new FamixJSONExporter("Namespace", this);
20
- this.addPropertiesToExporter(mse);
21
- return mse.getJSON();
22
- }
23
-
24
- public addPropertiesToExporter(exporter: FamixJSONExporter): void {
25
- super.addPropertiesToExporter(exporter);
26
- exporter.addProperty("parentScope", this.getParentScope());
27
- }
28
- }
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 mse: FamixJSONExporter = new FamixJSONExporter("Namespace", this);
20
+ this.addPropertiesToExporter(mse);
21
+ return mse.getJSON();
22
+ }
23
+
24
+ public addPropertiesToExporter(exporter: FamixJSONExporter): void {
25
+ super.addPropertiesToExporter(exporter);
26
+ exporter.addProperty("parentScope", this.getParentScope());
27
+ }
28
+ }
@@ -1,29 +1,29 @@
1
- import { FamixJSONExporter } from "../../famix_JSON_exporter";
2
- import { StructuralEntity } from "./structural_entity";
3
- import { BehavioralEntity } from "./behavioral_entity";
4
-
5
- export class Parameter extends StructuralEntity {
6
-
7
- private parentEntity: BehavioralEntity;
8
-
9
- public getParentEntity(): BehavioralEntity {
10
- return this.parentEntity;
11
- }
12
-
13
- public setParentEntity(parentEntity: BehavioralEntity): void {
14
- this.parentEntity = parentEntity;
15
- parentEntity.addParameter(this);
16
- }
17
-
18
-
19
- public getJSON(): string {
20
- const mse: FamixJSONExporter = new FamixJSONExporter("Parameter", this);
21
- this.addPropertiesToExporter(mse);
22
- return mse.getJSON();
23
- }
24
-
25
- public addPropertiesToExporter(exporter: FamixJSONExporter): void {
26
- super.addPropertiesToExporter(exporter);
27
- exporter.addProperty("parentEntity", this.getParentEntity());
28
- }
29
- }
1
+ import { FamixJSONExporter } from "../../famix_JSON_exporter";
2
+ import { StructuralEntity } from "./structural_entity";
3
+ import { BehavioralEntity } from "./behavioral_entity";
4
+
5
+ export class Parameter extends StructuralEntity {
6
+
7
+ private parentEntity: BehavioralEntity;
8
+
9
+ public getParentEntity(): BehavioralEntity {
10
+ return this.parentEntity;
11
+ }
12
+
13
+ public setParentEntity(parentEntity: BehavioralEntity): void {
14
+ this.parentEntity = parentEntity;
15
+ parentEntity.addParameter(this);
16
+ }
17
+
18
+
19
+ public getJSON(): string {
20
+ const mse: FamixJSONExporter = new FamixJSONExporter("Parameter", this);
21
+ this.addPropertiesToExporter(mse);
22
+ return mse.getJSON();
23
+ }
24
+
25
+ public addPropertiesToExporter(exporter: FamixJSONExporter): void {
26
+ super.addPropertiesToExporter(exporter);
27
+ exporter.addProperty("parentEntity", this.getParentEntity());
28
+ }
29
+ }
@@ -1,31 +1,31 @@
1
- import { FamixJSONExporter } from "../../famix_JSON_exporter";
2
- import { Class } from "./class";
3
- import { TypeParameter } from "./type_parameter";
4
-
5
- export class ParameterizableClass extends Class {
6
-
7
- private typeParameters: Set<TypeParameter> = new Set();
8
-
9
- public getTypeParameters(): Set<TypeParameter> {
10
- return this.typeParameters;
11
- }
12
-
13
- public addTypeParameter(typeParameter: TypeParameter): void {
14
- if (!this.typeParameters.has(typeParameter)) {
15
- this.typeParameters.add(typeParameter);
16
- typeParameter.setParentGeneric(this);
17
- }
18
- }
19
-
20
-
21
- public getJSON(): string {
22
- const mse: FamixJSONExporter = new FamixJSONExporter("ParameterizableClass", this);
23
- this.addPropertiesToExporter(mse);
24
- return mse.getJSON();
25
- }
26
-
27
- public addPropertiesToExporter(exporter: FamixJSONExporter): void {
28
- super.addPropertiesToExporter(exporter);
29
- exporter.addProperty("typeParameters", this.getTypeParameters());
30
- }
31
- }
1
+ import { FamixJSONExporter } from "../../famix_JSON_exporter";
2
+ import { Class } from "./class";
3
+ import { TypeParameter } from "./type_parameter";
4
+
5
+ export class ParameterizableClass extends Class {
6
+
7
+ private typeParameters: Set<TypeParameter> = new Set();
8
+
9
+ public getTypeParameters(): Set<TypeParameter> {
10
+ return this.typeParameters;
11
+ }
12
+
13
+ public addTypeParameter(typeParameter: TypeParameter): void {
14
+ if (!this.typeParameters.has(typeParameter)) {
15
+ this.typeParameters.add(typeParameter);
16
+ typeParameter.setParentGeneric(this);
17
+ }
18
+ }
19
+
20
+
21
+ public getJSON(): string {
22
+ const mse: FamixJSONExporter = new FamixJSONExporter("ParameterizableClass", this);
23
+ this.addPropertiesToExporter(mse);
24
+ return mse.getJSON();
25
+ }
26
+
27
+ public addPropertiesToExporter(exporter: FamixJSONExporter): void {
28
+ super.addPropertiesToExporter(exporter);
29
+ exporter.addProperty("typeParameters", this.getTypeParameters());
30
+ }
31
+ }
@@ -1,31 +1,31 @@
1
- import { FamixJSONExporter } from "../../famix_JSON_exporter";
2
- import { Interface } from "./interface";
3
- import { TypeParameter } from "./type_parameter";
4
-
5
- export class ParameterizableInterface extends Interface {
6
-
7
- private typeParameters: Set<TypeParameter> = new Set();
8
-
9
- public getTypeParameters(): Set<TypeParameter> {
10
- return this.typeParameters;
11
- }
12
-
13
- public addTypeParameter(typeParameter: TypeParameter): void {
14
- if (!this.typeParameters.has(typeParameter)) {
15
- this.typeParameters.add(typeParameter);
16
- typeParameter.setParentGeneric(this);
17
- }
18
- }
19
-
20
-
21
- public getJSON(): string {
22
- const mse: FamixJSONExporter = new FamixJSONExporter("ParameterizableInterface", this);
23
- this.addPropertiesToExporter(mse);
24
- return mse.getJSON();
25
- }
26
-
27
- public addPropertiesToExporter(exporter: FamixJSONExporter): void {
28
- super.addPropertiesToExporter(exporter);
29
- exporter.addProperty("typeParameters", this.getTypeParameters());
30
- }
31
- }
1
+ import { FamixJSONExporter } from "../../famix_JSON_exporter";
2
+ import { Interface } from "./interface";
3
+ import { TypeParameter } from "./type_parameter";
4
+
5
+ export class ParameterizableInterface extends Interface {
6
+
7
+ private typeParameters: Set<TypeParameter> = new Set();
8
+
9
+ public getTypeParameters(): Set<TypeParameter> {
10
+ return this.typeParameters;
11
+ }
12
+
13
+ public addTypeParameter(typeParameter: TypeParameter): void {
14
+ if (!this.typeParameters.has(typeParameter)) {
15
+ this.typeParameters.add(typeParameter);
16
+ typeParameter.setParentGeneric(this);
17
+ }
18
+ }
19
+
20
+
21
+ public getJSON(): string {
22
+ const mse: FamixJSONExporter = new FamixJSONExporter("ParameterizableInterface", this);
23
+ this.addPropertiesToExporter(mse);
24
+ return mse.getJSON();
25
+ }
26
+
27
+ public addPropertiesToExporter(exporter: FamixJSONExporter): void {
28
+ super.addPropertiesToExporter(exporter);
29
+ exporter.addProperty("typeParameters", this.getTypeParameters());
30
+ }
31
+ }
@@ -1,40 +1,40 @@
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 mse: FamixJSONExporter = new FamixJSONExporter("ParameterizedType", this);
31
- this.addPropertiesToExporter(mse);
32
- return mse.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
+ 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 mse: FamixJSONExporter = new FamixJSONExporter("ParameterizedType", this);
31
+ this.addPropertiesToExporter(mse);
32
+ return mse.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 +1,15 @@
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 mse: FamixJSONExporter = new FamixJSONExporter("PrimitiveType", 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 { Type } from "./type";
3
+
4
+ export class PrimitiveType extends Type {
5
+
6
+ public getJSON(): string {
7
+ const mse: FamixJSONExporter = new FamixJSONExporter("PrimitiveType", this);
8
+ this.addPropertiesToExporter(mse);
9
+ return mse.getJSON();
10
+ }
11
+
12
+ public addPropertiesToExporter(exporter: FamixJSONExporter): void {
13
+ super.addPropertiesToExporter(exporter);
14
+ }
15
+ }
@@ -1,54 +1,54 @@
1
- import { FamixJSONExporter } from "../../famix_JSON_exporter";
2
- import { Class } from "./class";
3
- import { Interface } from "./interface";
4
- import { StructuralEntity } from "./structural_entity";
5
-
6
- export class Property extends StructuralEntity {
7
-
8
- private isClassSide: boolean;
9
-
10
- public getIsClassSide(): boolean {
11
- return this.isClassSide;
12
- }
13
-
14
- public setIsClassSide(isClassSide: boolean): void {
15
- this.isClassSide = isClassSide;
16
- }
17
-
18
- private parentEntity: Class | Interface;
19
-
20
- public getParentEntity(): Class | Interface {
21
- return this.parentEntity;
22
- }
23
-
24
- public setParentEntity(parentEntity: Class | Interface): void {
25
- this.parentEntity = parentEntity;
26
- parentEntity.addProperty(this);
27
- }
28
-
29
- private modifiers: Set<string> = new Set();
30
-
31
- public getModifiers(): Set<string> {
32
- return this.modifiers;
33
- }
34
-
35
- public addModifier(modifier: string): void {
36
- if (!this.modifiers.has(modifier)) {
37
- this.modifiers.add(modifier);
38
- }
39
- }
40
-
41
-
42
- public getJSON(): string {
43
- const mse: FamixJSONExporter = new FamixJSONExporter("Property", this);
44
- this.addPropertiesToExporter(mse);
45
- return mse.getJSON();
46
- }
47
-
48
- public addPropertiesToExporter(exporter: FamixJSONExporter): void {
49
- super.addPropertiesToExporter(exporter);
50
- exporter.addProperty("isClassSide", this.getIsClassSide());
51
- exporter.addProperty("parentEntity", this.getParentEntity());
52
- exporter.addProperty("modifiers", this.getModifiers());
53
- }
54
- }
1
+ import { FamixJSONExporter } from "../../famix_JSON_exporter";
2
+ import { Class } from "./class";
3
+ import { Interface } from "./interface";
4
+ import { StructuralEntity } from "./structural_entity";
5
+
6
+ export class Property extends StructuralEntity {
7
+
8
+ private isClassSide: boolean;
9
+
10
+ public getIsClassSide(): boolean {
11
+ return this.isClassSide;
12
+ }
13
+
14
+ public setIsClassSide(isClassSide: boolean): void {
15
+ this.isClassSide = isClassSide;
16
+ }
17
+
18
+ private parentEntity: Class | Interface;
19
+
20
+ public getParentEntity(): Class | Interface {
21
+ return this.parentEntity;
22
+ }
23
+
24
+ public setParentEntity(parentEntity: Class | Interface): void {
25
+ this.parentEntity = parentEntity;
26
+ parentEntity.addProperty(this);
27
+ }
28
+
29
+ private modifiers: Set<string> = new Set();
30
+
31
+ public getModifiers(): Set<string> {
32
+ return this.modifiers;
33
+ }
34
+
35
+ public addModifier(modifier: string): void {
36
+ if (!this.modifiers.has(modifier)) {
37
+ this.modifiers.add(modifier);
38
+ }
39
+ }
40
+
41
+
42
+ public getJSON(): string {
43
+ const mse: FamixJSONExporter = new FamixJSONExporter("Property", this);
44
+ this.addPropertiesToExporter(mse);
45
+ return mse.getJSON();
46
+ }
47
+
48
+ public addPropertiesToExporter(exporter: FamixJSONExporter): void {
49
+ super.addPropertiesToExporter(exporter);
50
+ exporter.addProperty("isClassSide", this.getIsClassSide());
51
+ exporter.addProperty("parentEntity", this.getParentEntity());
52
+ exporter.addProperty("modifiers", this.getModifiers());
53
+ }
54
+ }