Skip to content

Commit

Permalink
Merge pull request #628 from moosetechnology/609-understands-should-b…
Browse files Browse the repository at this point in the history
…e-moved

Fix #609
  • Loading branch information
LABSARI authored Sep 29, 2023
2 parents a09e9af + 6f6484d commit 4c654ff
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 30 deletions.
15 changes: 0 additions & 15 deletions src/Famix-Java-Entities/FamixJavaType.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -60,12 +60,6 @@ FamixJavaType >> implementedInterfaces [
^ self directSuperclasses select: #isInterface
]

{ #category : #'Famix-Implementation' }
FamixJavaType >> implements: aString [
^ self methods
anySatisfy: [ :each | aString = each signature "was changed from match: for performances and because signature is case sensitive" ]
]

{ #category : #testing }
FamixJavaType >> isAnonymousClass [

Expand Down Expand Up @@ -168,15 +162,6 @@ FamixJavaType >> printOn: aStream [
nextPut: $)
]

{ #category : #'Famix-Implementation' }
FamixJavaType >> understands: signature [
"returns true if a class is able to respond to an invocation to aSignature on itself; false otherwise"

self withSuperclassesDo: [:each |
(each implements: signature) ifTrue: [^true]].
^false
]

{ #category : #'Famix-Implementation' }
FamixJavaType >> withSuperclassHierarchyGroup [
<navigation: 'With all superclasses'>
Expand Down
15 changes: 0 additions & 15 deletions src/Famix-PharoSmalltalk-Entities/FamixStClass.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,6 @@ FamixStClass >> extendedMethods [
^ self methods select: #isExtension
]

{ #category : #testing }
FamixStClass >> implements: aString [
"Was changed from match: for performances and because signature is case sensitive"

^ self methods anySatisfy: [ :each | aString = each signature ]
]

{ #category : #accessing }
FamixStClass >> instanceSide [
^ self isClassSide
Expand Down Expand Up @@ -181,11 +174,3 @@ FamixStClass >> sourceText [
ifNotNil: [ :aClass | TonelWriter sourceCodeOf: aClass ]
ifNil: [ super sourceText ]
]

{ #category : #testing }
FamixStClass >> understands: signature [
"returns true if a class is able to respond to an invocation to aSignature on itself; false otherwise"

self withSuperclassesDo: [ :each | (each implements: signature) ifTrue: [ ^ true ] ].
^ false
]
9 changes: 9 additions & 0 deletions src/Famix-Traits/FamixTWithInheritances.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,15 @@ FamixTWithInheritances >> superclassHierarchyGroup [
withDescription: 'All superclasses of ' , self mooseName
]

{ #category : #'Famix-Implementation' }
FamixTWithInheritances >> understands: signature [
"returns true if a class is able to respond to an invocation to aSignature on itself; false otherwise"

self withSuperclassesDo: [:each |
(each implements: signature) ifTrue: [^true]].
^false
]

{ #category : #enumerating }
FamixTWithInheritances >> withSubclassHierarchy [
^ self subclassHierarchy
Expand Down
7 changes: 7 additions & 0 deletions src/Famix-Traits/FamixTWithMethods.trait.st
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ FamixTWithMethods >> addMethod: aMethod [
methods add: aMethod
]

{ #category : #testing }
FamixTWithMethods >> implements: aString [
"Was changed from match: for performances and because signature is case sensitive"

^ self methods anySatisfy: [ :each | aString = each signature ]
]

{ #category : #accessing }
FamixTWithMethods >> methods [
"Relation named: #methods type: #FamixTMethod opposite: #parentType"
Expand Down

0 comments on commit 4c654ff

Please sign in to comment.