ts2famix 1.0.11 → 1.0.13
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/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 -661
- 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 -555
- 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 -100
- 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
- package/dist/analyze.js +0 -102
- package/dist/analyze_functions/processAccesses.js +0 -47
- package/dist/analyze_functions/processFiles.js +0 -540
- package/dist/analyze_functions/processImportClauses.js +0 -70
- package/dist/analyze_functions/processInheritances.js +0 -73
- package/dist/analyze_functions/processInvocations.js +0 -49
- package/dist/famix2puml.js +0 -125
- package/dist/famix_functions/famix_functions.js +0 -513
- package/dist/famix_functions/famix_functions_associations.js +0 -205
- package/dist/famix_functions/famix_functions_index.js +0 -62
- package/dist/famix_functions/famix_functions_types.js +0 -110
- package/dist/fqn.js +0 -126
- package/dist/fqp_implementation.js +0 -73
- package/dist/lib/famix/src/famix_JSON_exporter.js +0 -54
- package/dist/lib/famix/src/famix_base_element.js +0 -13
- package/dist/lib/famix/src/famix_repository.js +0 -187
- package/dist/lib/famix/src/index.js +0 -30
- 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/c_source_language.js +0 -16
- 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/custom_source_language.js +0 -23
- 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 -87
- package/dist/lib/famix/src/model/famix/indexed_file_anchor.js +0 -37
- 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 -30
- 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/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 -30
- 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 -30
- package/dist/lib/famix/src/model/famix/sourced_entity.js +0 -55
- 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/type_parameter.js +0 -24
- package/dist/lib/famix/src/model/famix/variable.js +0 -23
- package/dist/lib/ts-complex/cyclomatic-service.js +0 -83
- package/dist/ts2famix-cli.js +0 -63
- package/dist/ts2famix-tsconfig.js +0 -53
- package/metrics.ts +0 -23
- package/output.debug.txt +0 -1351
- package/src/fqp_implementation.ts +0 -66
|
@@ -1,42 +1,42 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { Type } from "./type";
|
|
3
|
-
import { Association } from "./association";
|
|
4
|
-
import { ContainerEntity } from "./container_entity";
|
|
5
|
-
|
|
6
|
-
export class Reference extends Association {
|
|
7
|
-
|
|
8
|
-
private source: ContainerEntity;
|
|
9
|
-
|
|
10
|
-
public getSource(): ContainerEntity {
|
|
11
|
-
return this.source;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public setSource(source: ContainerEntity): void {
|
|
15
|
-
this.source = source;
|
|
16
|
-
source.addOutgoingReference(this);
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
private target: Type;
|
|
20
|
-
|
|
21
|
-
public getTarget(): Type {
|
|
22
|
-
return this.target;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
public setTarget(target: Type): void {
|
|
26
|
-
this.target = target;
|
|
27
|
-
target.addIncomingReference(this);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
public getJSON(): string {
|
|
32
|
-
const mse: FamixJSONExporter = new FamixJSONExporter("Reference", this);
|
|
33
|
-
this.addPropertiesToExporter(mse);
|
|
34
|
-
return mse.getJSON();
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
38
|
-
super.addPropertiesToExporter(exporter);
|
|
39
|
-
exporter.addProperty("source", this.getSource());
|
|
40
|
-
exporter.addProperty("target", this.getTarget());
|
|
41
|
-
}
|
|
42
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { Type } from "./type";
|
|
3
|
+
import { Association } from "./association";
|
|
4
|
+
import { ContainerEntity } from "./container_entity";
|
|
5
|
+
|
|
6
|
+
export class Reference extends Association {
|
|
7
|
+
|
|
8
|
+
private source: ContainerEntity;
|
|
9
|
+
|
|
10
|
+
public getSource(): ContainerEntity {
|
|
11
|
+
return this.source;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public setSource(source: ContainerEntity): void {
|
|
15
|
+
this.source = source;
|
|
16
|
+
source.addOutgoingReference(this);
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
private target: Type;
|
|
20
|
+
|
|
21
|
+
public getTarget(): Type {
|
|
22
|
+
return this.target;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public setTarget(target: Type): void {
|
|
26
|
+
this.target = target;
|
|
27
|
+
target.addIncomingReference(this);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
public getJSON(): string {
|
|
32
|
+
const mse: FamixJSONExporter = new FamixJSONExporter("Reference", this);
|
|
33
|
+
this.addPropertiesToExporter(mse);
|
|
34
|
+
return mse.getJSON();
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
38
|
+
super.addPropertiesToExporter(exporter);
|
|
39
|
+
exporter.addProperty("source", this.getSource());
|
|
40
|
+
exporter.addProperty("target", this.getTarget());
|
|
41
|
+
}
|
|
42
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { ContainerEntity } from "./container_entity";
|
|
3
|
-
import { Namespace } from "./namespace";
|
|
4
|
-
|
|
5
|
-
export class ScopingEntity extends ContainerEntity {
|
|
6
|
-
|
|
7
|
-
private childrenNamespaces: Set<Namespace> = new Set();
|
|
8
|
-
|
|
9
|
-
public getNamespaces(): Set<Namespace> {
|
|
10
|
-
return this.childrenNamespaces;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
public addNamespace(childNamespace: Namespace): void {
|
|
14
|
-
if (!this.childrenNamespaces.has(childNamespace)) {
|
|
15
|
-
this.childrenNamespaces.add(childNamespace);
|
|
16
|
-
childNamespace.setParentScope(this);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
public getJSON(): string {
|
|
22
|
-
const mse: FamixJSONExporter = new FamixJSONExporter("ScopingEntity", this);
|
|
23
|
-
this.addPropertiesToExporter(mse);
|
|
24
|
-
return mse.getJSON();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
28
|
-
super.addPropertiesToExporter(exporter);
|
|
29
|
-
exporter.addProperty("namespaces", this.getNamespaces());
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { ContainerEntity } from "./container_entity";
|
|
3
|
+
import { Namespace } from "./namespace";
|
|
4
|
+
|
|
5
|
+
export class ScopingEntity extends ContainerEntity {
|
|
6
|
+
|
|
7
|
+
private childrenNamespaces: Set<Namespace> = new Set();
|
|
8
|
+
|
|
9
|
+
public getNamespaces(): Set<Namespace> {
|
|
10
|
+
return this.childrenNamespaces;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public addNamespace(childNamespace: Namespace): void {
|
|
14
|
+
if (!this.childrenNamespaces.has(childNamespace)) {
|
|
15
|
+
this.childrenNamespaces.add(childNamespace);
|
|
16
|
+
childNamespace.setParentScope(this);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
public getJSON(): string {
|
|
22
|
+
const mse: FamixJSONExporter = new FamixJSONExporter("ScopingEntity", this);
|
|
23
|
+
this.addPropertiesToExporter(mse);
|
|
24
|
+
return mse.getJSON();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
28
|
+
super.addPropertiesToExporter(exporter);
|
|
29
|
+
exporter.addProperty("namespaces", this.getNamespaces());
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,38 +1,38 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { ScopingEntity } from "./scoping_entity";
|
|
3
|
-
|
|
4
|
-
export class ScriptEntity extends ScopingEntity {
|
|
5
|
-
|
|
6
|
-
private numberOfLinesOfText: number;
|
|
7
|
-
|
|
8
|
-
public getNumberOfLinesOfText(): number {
|
|
9
|
-
return this.numberOfLinesOfText;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
public setNumberOfLinesOfText(numberOfLinesOfText: number): void {
|
|
13
|
-
this.numberOfLinesOfText = numberOfLinesOfText;
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
private numberOfCharacters: number;
|
|
17
|
-
|
|
18
|
-
public getNumberOfCharacters(): number {
|
|
19
|
-
return this.numberOfCharacters;
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
public setNumberOfCharacters(numberOfCharacters: number): void {
|
|
23
|
-
this.numberOfCharacters = numberOfCharacters;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
public getJSON(): string {
|
|
28
|
-
const mse: FamixJSONExporter = new FamixJSONExporter("ScriptEntity", this);
|
|
29
|
-
this.addPropertiesToExporter(mse);
|
|
30
|
-
return mse.getJSON();
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
34
|
-
super.addPropertiesToExporter(exporter);
|
|
35
|
-
exporter.addProperty("numberOfLinesOfText", this.getNumberOfLinesOfText());
|
|
36
|
-
exporter.addProperty("numberOfCharacters", this.getNumberOfCharacters());
|
|
37
|
-
}
|
|
38
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { ScopingEntity } from "./scoping_entity";
|
|
3
|
+
|
|
4
|
+
export class ScriptEntity extends ScopingEntity {
|
|
5
|
+
|
|
6
|
+
private numberOfLinesOfText: number;
|
|
7
|
+
|
|
8
|
+
public getNumberOfLinesOfText(): number {
|
|
9
|
+
return this.numberOfLinesOfText;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
public setNumberOfLinesOfText(numberOfLinesOfText: number): void {
|
|
13
|
+
this.numberOfLinesOfText = numberOfLinesOfText;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
private numberOfCharacters: number;
|
|
17
|
+
|
|
18
|
+
public getNumberOfCharacters(): number {
|
|
19
|
+
return this.numberOfCharacters;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
public setNumberOfCharacters(numberOfCharacters: number): void {
|
|
23
|
+
this.numberOfCharacters = numberOfCharacters;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
public getJSON(): string {
|
|
28
|
+
const mse: FamixJSONExporter = new FamixJSONExporter("ScriptEntity", this);
|
|
29
|
+
this.addPropertiesToExporter(mse);
|
|
30
|
+
return mse.getJSON();
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
34
|
+
super.addPropertiesToExporter(exporter);
|
|
35
|
+
exporter.addProperty("numberOfLinesOfText", this.getNumberOfLinesOfText());
|
|
36
|
+
exporter.addProperty("numberOfCharacters", this.getNumberOfCharacters());
|
|
37
|
+
}
|
|
38
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { Entity } from "./entity";
|
|
3
|
-
import { SourcedEntity } from "./sourced_entity";
|
|
4
|
-
|
|
5
|
-
export class SourceAnchor extends Entity {
|
|
6
|
-
|
|
7
|
-
private element: SourcedEntity;
|
|
8
|
-
|
|
9
|
-
public getElement(): SourcedEntity {
|
|
10
|
-
return this.element;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
public setElement(element: SourcedEntity): void {
|
|
14
|
-
if (this.element === undefined) {
|
|
15
|
-
this.element = element;
|
|
16
|
-
element.setSourceAnchor(this);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
public getJSON(): string {
|
|
22
|
-
const mse: FamixJSONExporter = new FamixJSONExporter("SourceAnchor", this);
|
|
23
|
-
this.addPropertiesToExporter(mse);
|
|
24
|
-
return mse.getJSON();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
28
|
-
super.addPropertiesToExporter(exporter);
|
|
29
|
-
exporter.addProperty("element", this.getElement());
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { Entity } from "./entity";
|
|
3
|
+
import { SourcedEntity } from "./sourced_entity";
|
|
4
|
+
|
|
5
|
+
export class SourceAnchor extends Entity {
|
|
6
|
+
|
|
7
|
+
private element: SourcedEntity;
|
|
8
|
+
|
|
9
|
+
public getElement(): SourcedEntity {
|
|
10
|
+
return this.element;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public setElement(element: SourcedEntity): void {
|
|
14
|
+
if (this.element === undefined) {
|
|
15
|
+
this.element = element;
|
|
16
|
+
element.setSourceAnchor(this);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
public getJSON(): string {
|
|
22
|
+
const mse: FamixJSONExporter = new FamixJSONExporter("SourceAnchor", this);
|
|
23
|
+
this.addPropertiesToExporter(mse);
|
|
24
|
+
return mse.getJSON();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
28
|
+
super.addPropertiesToExporter(exporter);
|
|
29
|
+
exporter.addProperty("element", this.getElement());
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { Entity } from "./entity";
|
|
3
|
-
import { SourcedEntity } from "./sourced_entity";
|
|
4
|
-
|
|
5
|
-
export class SourceLanguage extends Entity {
|
|
6
|
-
|
|
7
|
-
private sourcedEntities: Set<SourcedEntity> = new Set();
|
|
8
|
-
|
|
9
|
-
public getSourcedEntities(): Set<SourcedEntity> {
|
|
10
|
-
return this.sourcedEntities;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
public addSourcedEntity(sourcedEntity: SourcedEntity): void {
|
|
14
|
-
if (!this.sourcedEntities.has(sourcedEntity)) {
|
|
15
|
-
this.sourcedEntities.add(sourcedEntity);
|
|
16
|
-
sourcedEntity.setDeclaredSourceLanguage(this);
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
public getJSON(): string {
|
|
22
|
-
const mse: FamixJSONExporter = new FamixJSONExporter("SourceLanguage", this);
|
|
23
|
-
this.addPropertiesToExporter(mse);
|
|
24
|
-
return mse.getJSON();
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
28
|
-
super.addPropertiesToExporter(exporter);
|
|
29
|
-
exporter.addProperty("sourcedEntities", this.getSourcedEntities());
|
|
30
|
-
}
|
|
31
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { Entity } from "./entity";
|
|
3
|
+
import { SourcedEntity } from "./sourced_entity";
|
|
4
|
+
|
|
5
|
+
export class SourceLanguage extends Entity {
|
|
6
|
+
|
|
7
|
+
private sourcedEntities: Set<SourcedEntity> = new Set();
|
|
8
|
+
|
|
9
|
+
public getSourcedEntities(): Set<SourcedEntity> {
|
|
10
|
+
return this.sourcedEntities;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
public addSourcedEntity(sourcedEntity: SourcedEntity): void {
|
|
14
|
+
if (!this.sourcedEntities.has(sourcedEntity)) {
|
|
15
|
+
this.sourcedEntities.add(sourcedEntity);
|
|
16
|
+
sourcedEntity.setDeclaredSourceLanguage(this);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
public getJSON(): string {
|
|
22
|
+
const mse: FamixJSONExporter = new FamixJSONExporter("SourceLanguage", this);
|
|
23
|
+
this.addPropertiesToExporter(mse);
|
|
24
|
+
return mse.getJSON();
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
28
|
+
super.addPropertiesToExporter(exporter);
|
|
29
|
+
exporter.addProperty("sourcedEntities", this.getSourcedEntities());
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { SourceLanguage } from "./source_language";
|
|
3
|
-
import { Entity } from "./entity";
|
|
4
|
-
import { Comment } from "./comment";
|
|
5
|
-
import { SourceAnchor } from "./source_anchor";
|
|
6
|
-
|
|
7
|
-
export class SourcedEntity extends Entity {
|
|
8
|
-
|
|
9
|
-
private isStub: boolean;
|
|
10
|
-
|
|
11
|
-
public getIsStub(): boolean {
|
|
12
|
-
return this.isStub;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
public setIsStub(isStub: boolean): void {
|
|
16
|
-
this.isStub = isStub;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
private sourceAnchor: SourceAnchor;
|
|
20
|
-
|
|
21
|
-
public getSourceAnchor(): SourceAnchor {
|
|
22
|
-
return this.sourceAnchor;
|
|
23
|
-
}
|
|
24
|
-
|
|
25
|
-
public setSourceAnchor(sourceAnchor: SourceAnchor): void {
|
|
26
|
-
if (this.sourceAnchor === undefined) {
|
|
27
|
-
this.sourceAnchor = sourceAnchor;
|
|
28
|
-
sourceAnchor.setElement(this);
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
private comments: Set<Comment> = new Set();
|
|
33
|
-
|
|
34
|
-
public getComments(): Set<Comment> {
|
|
35
|
-
return this.comments;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
public addComment(comment: Comment): void {
|
|
39
|
-
if (!this.comments.has(comment)) {
|
|
40
|
-
this.comments.add(comment);
|
|
41
|
-
comment.setContainer(this);
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
private declaredSourceLanguage: SourceLanguage;
|
|
46
|
-
|
|
47
|
-
public getDeclaredSourceLanguage(): SourceLanguage {
|
|
48
|
-
return this.declaredSourceLanguage;
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
public setDeclaredSourceLanguage(declaredSourceLanguage: SourceLanguage): void {
|
|
52
|
-
this.declaredSourceLanguage = declaredSourceLanguage;
|
|
53
|
-
declaredSourceLanguage.addSourcedEntity(this);
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
public getJSON(): string {
|
|
58
|
-
const mse: FamixJSONExporter = new FamixJSONExporter("SourcedEntity", this);
|
|
59
|
-
this.addPropertiesToExporter(mse);
|
|
60
|
-
return mse.getJSON();
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
64
|
-
super.addPropertiesToExporter(exporter);
|
|
65
|
-
exporter.addProperty("isStub", this.getIsStub());
|
|
66
|
-
exporter.addProperty("sourceAnchor", this.getSourceAnchor());
|
|
67
|
-
exporter.addProperty("comments", this.getComments());
|
|
68
|
-
exporter.addProperty("declaredSourceLanguage", this.getDeclaredSourceLanguage());
|
|
69
|
-
}
|
|
70
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { SourceLanguage } from "./source_language";
|
|
3
|
+
import { Entity } from "./entity";
|
|
4
|
+
import { Comment } from "./comment";
|
|
5
|
+
import { SourceAnchor } from "./source_anchor";
|
|
6
|
+
|
|
7
|
+
export class SourcedEntity extends Entity {
|
|
8
|
+
|
|
9
|
+
private isStub: boolean;
|
|
10
|
+
|
|
11
|
+
public getIsStub(): boolean {
|
|
12
|
+
return this.isStub;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
public setIsStub(isStub: boolean): void {
|
|
16
|
+
this.isStub = isStub;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
private sourceAnchor: SourceAnchor;
|
|
20
|
+
|
|
21
|
+
public getSourceAnchor(): SourceAnchor {
|
|
22
|
+
return this.sourceAnchor;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
public setSourceAnchor(sourceAnchor: SourceAnchor): void {
|
|
26
|
+
if (this.sourceAnchor === undefined) {
|
|
27
|
+
this.sourceAnchor = sourceAnchor;
|
|
28
|
+
sourceAnchor.setElement(this);
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
private comments: Set<Comment> = new Set();
|
|
33
|
+
|
|
34
|
+
public getComments(): Set<Comment> {
|
|
35
|
+
return this.comments;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
public addComment(comment: Comment): void {
|
|
39
|
+
if (!this.comments.has(comment)) {
|
|
40
|
+
this.comments.add(comment);
|
|
41
|
+
comment.setContainer(this);
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
private declaredSourceLanguage: SourceLanguage;
|
|
46
|
+
|
|
47
|
+
public getDeclaredSourceLanguage(): SourceLanguage {
|
|
48
|
+
return this.declaredSourceLanguage;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
public setDeclaredSourceLanguage(declaredSourceLanguage: SourceLanguage): void {
|
|
52
|
+
this.declaredSourceLanguage = declaredSourceLanguage;
|
|
53
|
+
declaredSourceLanguage.addSourcedEntity(this);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
public getJSON(): string {
|
|
58
|
+
const mse: FamixJSONExporter = new FamixJSONExporter("SourcedEntity", this);
|
|
59
|
+
this.addPropertiesToExporter(mse);
|
|
60
|
+
return mse.getJSON();
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
64
|
+
super.addPropertiesToExporter(exporter);
|
|
65
|
+
exporter.addProperty("isStub", this.getIsStub());
|
|
66
|
+
exporter.addProperty("sourceAnchor", this.getSourceAnchor());
|
|
67
|
+
exporter.addProperty("comments", this.getComments());
|
|
68
|
+
exporter.addProperty("declaredSourceLanguage", this.getDeclaredSourceLanguage());
|
|
69
|
+
}
|
|
70
|
+
}
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
-
import { Type } from "./type";
|
|
3
|
-
import { Access } from "./access";
|
|
4
|
-
import { NamedEntity } from "./named_entity";
|
|
5
|
-
|
|
6
|
-
export class StructuralEntity extends NamedEntity {
|
|
7
|
-
|
|
8
|
-
private incomingAccesses: Set<Access> = new Set();
|
|
9
|
-
|
|
10
|
-
public getIncomingAccesses(): Set<Access> {
|
|
11
|
-
return this.incomingAccesses;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
public addIncomingAccess(incomingAccess: Access): void {
|
|
15
|
-
if (!this.incomingAccesses.has(incomingAccess)) {
|
|
16
|
-
this.incomingAccesses.add(incomingAccess);
|
|
17
|
-
incomingAccess.setVariable(this);
|
|
18
|
-
}
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
private declaredType: Type;
|
|
22
|
-
|
|
23
|
-
public getDeclaredType(): Type {
|
|
24
|
-
return this.declaredType;
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
public setDeclaredType(declaredType: Type): void {
|
|
28
|
-
this.declaredType = declaredType;
|
|
29
|
-
declaredType.addStructureWithDeclaredType(this);
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
public getJSON(): string {
|
|
34
|
-
const mse: FamixJSONExporter = new FamixJSONExporter("StructuralEntity", this);
|
|
35
|
-
this.addPropertiesToExporter(mse);
|
|
36
|
-
return mse.getJSON();
|
|
37
|
-
}
|
|
38
|
-
|
|
39
|
-
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
40
|
-
super.addPropertiesToExporter(exporter);
|
|
41
|
-
exporter.addProperty("incomingAccesses", this.getIncomingAccesses());
|
|
42
|
-
exporter.addProperty("declaredType", this.getDeclaredType());
|
|
43
|
-
}
|
|
44
|
-
}
|
|
1
|
+
import { FamixJSONExporter } from "../../famix_JSON_exporter";
|
|
2
|
+
import { Type } from "./type";
|
|
3
|
+
import { Access } from "./access";
|
|
4
|
+
import { NamedEntity } from "./named_entity";
|
|
5
|
+
|
|
6
|
+
export class StructuralEntity extends NamedEntity {
|
|
7
|
+
|
|
8
|
+
private incomingAccesses: Set<Access> = new Set();
|
|
9
|
+
|
|
10
|
+
public getIncomingAccesses(): Set<Access> {
|
|
11
|
+
return this.incomingAccesses;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
public addIncomingAccess(incomingAccess: Access): void {
|
|
15
|
+
if (!this.incomingAccesses.has(incomingAccess)) {
|
|
16
|
+
this.incomingAccesses.add(incomingAccess);
|
|
17
|
+
incomingAccess.setVariable(this);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
private declaredType: Type;
|
|
22
|
+
|
|
23
|
+
public getDeclaredType(): Type {
|
|
24
|
+
return this.declaredType;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
public setDeclaredType(declaredType: Type): void {
|
|
28
|
+
this.declaredType = declaredType;
|
|
29
|
+
declaredType.addStructureWithDeclaredType(this);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
public getJSON(): string {
|
|
34
|
+
const mse: FamixJSONExporter = new FamixJSONExporter("StructuralEntity", this);
|
|
35
|
+
this.addPropertiesToExporter(mse);
|
|
36
|
+
return mse.getJSON();
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
public addPropertiesToExporter(exporter: FamixJSONExporter): void {
|
|
40
|
+
super.addPropertiesToExporter(exporter);
|
|
41
|
+
exporter.addProperty("incomingAccesses", this.getIncomingAccesses());
|
|
42
|
+
exporter.addProperty("declaredType", this.getDeclaredType());
|
|
43
|
+
}
|
|
44
|
+
}
|