• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

moosetechnology / Famix-Value / 15446436712

04 Jun 2025 03:34PM UTC coverage: 22.736% (-0.02%) from 22.756%
15446436712

push

github

Gabriel-Darbord
Add `ignoreUnknownAttributes` importer option
+ Categorize
+ Prettier comments

0 of 38 new or added lines in 4 files covered. (0.0%)

9 existing lines in 2 files now uncovered.

796 of 3501 relevant lines covered (22.74%)

0.23 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

67.86
/src/Famix-Value-Exporter/FASTJavaBuilder.class.st
1
"
2
I am used to handle Java type references and imports.
3
"
4
Class {
5
        #name : 'FASTJavaBuilder',
6
        #superclass : 'FASTBuilder',
7
        #instVars : [
8
                'typeNameDictionary'
9
        ],
10
        #category : 'Famix-Value-Exporter-Helpers',
11
        #package : 'Famix-Value-Exporter',
12
        #tag : 'Helpers'
13
}
14

15
{ #category : 'initialization' }
16
FASTJavaBuilder >> initialize [
1✔
17

1✔
18
        typeNameDictionary := Dictionary new
1✔
19
]
1✔
20

21
{ #category : 'ast' }
22
FASTJavaBuilder >> makeImportDeclaration: aFamixType [
×
23

×
24
        ^ self model newImportDeclaration qualifiedName:
×
UNCOV
25
                  (aFamixType fullyQualifiedNameOn: self model)
×
UNCOV
26
]
×
27

28
{ #category : 'ast' }
UNCOV
29
FASTJavaBuilder >> makeImportDeclarations [
×
UNCOV
30
        "Make an import declaration for each type processed by this builder."
×
UNCOV
31

×
UNCOV
32
        ^ typeNameDictionary values collect: [ :type |
×
33
                  self makeImportDeclaration: type ]
×
34
]
×
35

36
{ #category : 'ast' }
37
FASTJavaBuilder >> makeImportDeclarations: anEntity [
×
UNCOV
38
        "Make import declarations for all types related to the given entity."
×
UNCOV
39

×
40
        ^ (anEntity allTypes select: [ :type | type needsJavaImport ])
×
41
                  collect: [ :type | self makeImportDeclaration: type ]
×
42
                  as: OrderedCollection
×
43
]
×
44

45
{ #category : 'processing' }
46
FASTJavaBuilder >> processType: aFamixType [
1✔
47
        "Process the given type and its related types, for example if it has concrete type parameters.
1✔
48
        This lets the builder know how to refer to the type.
1✔
49
        If the type is in the typeNameDict, it will be imported, so it can be referenced by its unqualified name."
1✔
50

1✔
51
        | type |
1✔
52
        type := aFamixType isParametricEntity
1✔
53
                        ifTrue: [
1✔
54
                                aFamixType concreteParameters do: [ :parameter |
1✔
55
                                        self processType: parameter ].
1✔
56
                                aFamixType genericEntity ]
1✔
57
                        ifFalse: [ aFamixType ].
1✔
58
        type needsJavaImport ifTrue: [
1✔
59
                typeNameDictionary at: type name ifAbsentPut: type ]
1✔
60
]
1✔
61

62
{ #category : 'processing' }
63
FASTJavaBuilder >> referType: aFamixType [
1✔
64
        "Process a type and return a FAST expression to reference it.
1✔
65
        Use its unqualified name when importing the type, otherwise use its fully qualified name."
1✔
66

1✔
67
        | registeredType |
1✔
68
        self processType: aFamixType.
1✔
69
        registeredType := typeNameDictionary
1✔
70
                                  at: aFamixType name
1✔
71
                                  ifAbsent: nil.
1✔
72
        ^ self model newClassTypeExpression typeName:
1✔
73
                  ((registeredType == aFamixType or: [
1✔
74
                            aFamixType needsJavaImport not or: [
1✔
75
                                    aFamixType isParametricEntity and: [
1✔
76
                                            registeredType == aFamixType genericEntity ] ] ])
1✔
77
                           ifTrue: [ "has import"
1✔
78
                           model newTypeName name: aFamixType baseName ]
1✔
79
                           ifFalse: [ "no import"
1✔
80
                           aFamixType fullyQualifiedTypeNameOn: self model ])
1✔
81
]
1✔
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc