-
Notifications
You must be signed in to change notification settings - Fork 1
Pattern: Abstract Factory
justinmann edited this page Dec 24, 2017
·
4 revisions
In SJ, the abstract factory pattern can be implemented using interfaces, as in the below example:
#button(
click()'void
)
#buttonFactory(
create()'#button
)
linuxButton#button(
click() {
// Handle click
void
}
)
linuxButtonFactory#buttonFactory(
create() {
linuxButton() as button
}
)