Skip to content

Commit

Permalink
Generated entities
Browse files Browse the repository at this point in the history
  • Loading branch information
fuhrmanator committed Jul 30, 2024
1 parent 7ec87f0 commit db9eb5f
Showing 1 changed file with 51 additions and 0 deletions.
51 changes: 51 additions & 0 deletions src/Famix-TypeScript-Entities/FamixTypeScriptProperty.class.st
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,9 @@ I represent a TypeScript class property.
| Name | Type | Default value | Comment |
|---|
| `isClassSide` | `Boolean` | false | Entity can be declared class side i.e. static|
| `isDefinitelyAssigned` | `Boolean` | false | Properties may be postfixed with a definitely assigned modifier.|
| `isJavaScriptPrivate` | `Boolean` | false | Properties may be postfixed with a private modifier that makes the property private even in JavaScript.|
| `isOptional` | `Boolean` | false | Properties may be postfixed with an optional modifier.|
| `isStub` | `Boolean` | false | Flag true if the entity attributes are incomplete, either because the entity is missing or not imported.|
| `name` | `String` | nil | Basic name of the entity, not full reference.|
| `readOnly` | `Boolean` | false | Properties may be prefixed with the readonly modifier. This prevents assignments to the field outside of the constructor.|
Expand All @@ -39,6 +42,9 @@ Class {
#traits : 'FamixTAttribute + FamixTCanBeClassSide + FamixTHasVisibility',
#classTraits : 'FamixTAttribute classTrait + FamixTCanBeClassSide classTrait + FamixTHasVisibility classTrait',
#instVars : [
'#isDefinitelyAssigned => FMProperty defaultValue: false',
'#isJavaScriptPrivate => FMProperty defaultValue: false',
'#isOptional => FMProperty defaultValue: false',
'#readOnly => FMProperty defaultValue: false'
],
#category : #'Famix-TypeScript-Entities-Entities'
Expand All @@ -53,6 +59,51 @@ FamixTypeScriptProperty class >> annotation [
^ self
]

{ #category : #accessing }
FamixTypeScriptProperty >> isDefinitelyAssigned [

<FMProperty: #isDefinitelyAssigned type: #Boolean defaultValue: false>
<generated>
<FMComment: 'Properties may be postfixed with a definitely assigned modifier.'>
^ isDefinitelyAssigned ifNil: [ isDefinitelyAssigned := false ]
]

{ #category : #accessing }
FamixTypeScriptProperty >> isDefinitelyAssigned: anObject [
<generated>
isDefinitelyAssigned := anObject
]

{ #category : #accessing }
FamixTypeScriptProperty >> isJavaScriptPrivate [

<FMProperty: #isJavaScriptPrivate type: #Boolean defaultValue: false>
<generated>
<FMComment: 'Properties may be postfixed with a private modifier that makes the property private even in JavaScript.'>
^ isJavaScriptPrivate ifNil: [ isJavaScriptPrivate := false ]
]

{ #category : #accessing }
FamixTypeScriptProperty >> isJavaScriptPrivate: anObject [
<generated>
isJavaScriptPrivate := anObject
]

{ #category : #accessing }
FamixTypeScriptProperty >> isOptional [

<FMProperty: #isOptional type: #Boolean defaultValue: false>
<generated>
<FMComment: 'Properties may be postfixed with an optional modifier.'>
^ isOptional ifNil: [ isOptional := false ]
]

{ #category : #accessing }
FamixTypeScriptProperty >> isOptional: anObject [
<generated>
isOptional := anObject
]

{ #category : #accessing }
FamixTypeScriptProperty >> readOnly [

Expand Down

0 comments on commit db9eb5f

Please sign in to comment.