Skip to content

Commit

Permalink
removed MetaElement direct class reference
Browse files Browse the repository at this point in the history
  • Loading branch information
JanBliznicenko committed Jun 18, 2024
1 parent e379d33 commit 8928a2e
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions repository/OP-UML-Metamodel/OPUMLMetaElement.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,13 @@ OPUMLMetaElement >> oclAsType: aClassifier [

{ #category : 'ocl-experimental' }
OPUMLMetaElement >> oclClassifierNameFrom: anObject [
(anObject isKindOf: OPUMLMetaElement class)
ifTrue: [ ^ anObject name withoutPrefix: 'OPUML' ].
(anObject isKindOf: OPUMLMetaElement)
ifTrue: [ ^ anObject name ].
anObject isString
ifTrue: [ ^ anObject ].

| metaElementClass |
metaElementClass := Smalltalk globals at: #OPUMLMetaElement.
(anObject isKindOf: metaElementClass class) ifTrue: [
^ anObject name withoutPrefix: 'OPUML' ].
(anObject isKindOf: metaElementClass) ifTrue: [ ^ anObject name ].
anObject isString ifTrue: [ ^ anObject ].
self error: 'Unknown classifier ' , anObject asString
]

Expand Down

0 comments on commit 8928a2e

Please sign in to comment.