Skip to content

Commit

Permalink
Update exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel-Darbord committed Jan 14, 2024
1 parent 567c588 commit 796f89d
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/Famix-Value-Exporter/FamixValue2FASTJavaVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ FamixValue2FASTJavaVisitor >> findConstructorFor: object [
constructors
detect: [ :constructor | constructor isPublic ]
ifNone: [ "fallback to using reflection"
self markedForReflection add: constructors anyOne ] ] ]
self markedForReflection add: constructors first ] ] ]
]

{ #category : #private }
Expand Down Expand Up @@ -163,12 +163,21 @@ FamixValue2FASTJavaVisitor >> makeReflectionSetterInvocation: attribute [
{ #category : #ast }
FamixValue2FASTJavaVisitor >> makeSetterInvocation: setter for: attribute [

self
makeSetterInvocation: setter
for: attribute
named: (self varNameFor: attribute value)
]

{ #category : #ast }
FamixValue2FASTJavaVisitor >> makeSetterInvocation: setter for: attribute named: aString [

self statementBlock addStatement:
(self model newExpressionStatement expression:
(model newMethodInvocation
receiver: (self makeIdentifier: attribute object);
name: setter name;
addArgument: (self makeVariableExpression: attribute value);
addArgument: (model newVariableExpression name: aString);
famixMethod: setter))
]

Expand Down

0 comments on commit 796f89d

Please sign in to comment.