StaticPropertyValue adds a data property spec to the class constructor.
(name string, spec ValueSpec, flags ...int)
| 264 | |
| 265 | // StaticPropertyValue adds a data property spec to the class constructor. |
| 266 | func (cb *ClassBuilder) StaticPropertyValue(name string, spec ValueSpec, flags ...int) *ClassBuilder { |
| 267 | propFlags := PropertyDefault |
| 268 | if len(flags) > 0 { |
| 269 | propFlags = flags[0] |
| 270 | } |
| 271 | |
| 272 | cb.properties = append(cb.properties, PropertyEntry{ |
| 273 | Name: name, |
| 274 | Spec: spec, |
| 275 | Static: true, // Static property |
| 276 | Flags: propFlags, |
| 277 | }) |
| 278 | return cb |
| 279 | } |
| 280 | |
| 281 | // StaticPropertyLiteral adds a literal data property to the class constructor. |
| 282 | func (cb *ClassBuilder) StaticPropertyLiteral(name string, value interface{}, flags ...int) *ClassBuilder { |
no outgoing calls