StaticAccessor adds a read-write static accessor to the class constructor - unchanged Pass nil for getter to create write-only accessor Pass nil for setter to create read-only accessor
(name string, getter ClassGetterFunc, setter ClassSetterFunc)
| 205 | // Pass nil for getter to create write-only accessor |
| 206 | // Pass nil for setter to create read-only accessor |
| 207 | func (cb *ClassBuilder) StaticAccessor(name string, getter ClassGetterFunc, setter ClassSetterFunc) *ClassBuilder { |
| 208 | cb.accessors = append(cb.accessors, AccessorEntry{ |
| 209 | Name: name, |
| 210 | Getter: getter, |
| 211 | Setter: setter, |
| 212 | Static: true, |
| 213 | }) |
| 214 | return cb |
| 215 | } |
| 216 | |
| 217 | // ============================================================================= |
| 218 | // PROPERTY API METHODS |
no outgoing calls