Skip to content

Commit

Permalink
Reference FASTJavaBuilder instead of FASTBuilder in Java context
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel-Darbord committed Feb 14, 2024
1 parent 1907ad7 commit 36dfc93
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Famix-Value-Entities/FamixValueUnknownType.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ FamixValueUnknownType >> acceptValueVisitor: visitor forObject: object [
{ #category : #converting }
FamixValueUnknownType >> asFASTJavaTypeExpressionOn: visitor [

^ FASTBuilder current referType: self
^ FASTJavaBuilder current referType: self
]

{ #category : #testing }
Expand Down
6 changes: 6 additions & 0 deletions src/Famix-Value-Exporter/FASTBuilder.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ FASTBuilder class >> current [
^ Current ifNil: [ Current := self new ]
]

{ #category : #'class initialization' }
FASTBuilder class >> reset [

Current := nil
]

{ #category : #accessing }
FASTBuilder >> beCurrent [

Expand Down
2 changes: 1 addition & 1 deletion src/Famix-Value-Exporter/FamixJavaType.extension.st
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ FamixJavaType >> acceptValueVisitor: visitor forObject: object [
FamixJavaType >> asFASTJavaTypeExpressionOn: visitor [
"^ visitor makeClassTypeExpression: self typeName"

^ FASTBuilder current referType: self
^ FASTJavaBuilder current referType: self
]

{ #category : #'*Famix-Value-Exporter' }
Expand Down
3 changes: 2 additions & 1 deletion src/Famix-Value-Exporter/FamixValue2FASTJavaVisitor.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ FamixValue2FASTJavaVisitor >> makeHelper [
self model newCompilationUnit
packageDeclaration: (model newPackageDeclaration qualifiedName:
(model newQualifiedName name: 'fr.evref.modest'));
importDeclarations: FASTBuilder current makeImportDeclarations;
importDeclarations: FASTJavaBuilder current makeImportDeclarations;
addImportDeclaration: (model newImportDeclaration qualifiedName:
(model newQualifiedName name: 'java.io.IOException'));
addImportDeclaration: (model newImportDeclaration qualifiedName:
Expand Down Expand Up @@ -233,6 +233,7 @@ FamixValue2FASTJavaVisitor >> makeReflectionSetterInvocation: attribute [
"Use reflection to set an attribute on an object."

self flag: #TODO. "we need to make a variable to hold the field, make it accessible, then use it to set the value."
self halt. "current implementation does not work"
self markedForReflection add: attribute attribute.
self statementBlock addStatement:
(self model newExpressionStatement expression:
Expand Down

0 comments on commit 36dfc93

Please sign in to comment.