mirror of
https://github.com/Ranchero-Software/NetNewsWire
synced 2026-11-30 17:29:23 +00:00
Mark classes as final when they can be, to communicate intent (don’t subclass these). Fix #4751.
This commit is contained in:
1 parent
c6585994fb
commit
4b7ea6d920
170 files changed
+188
-188
No files matched your search
@@ -12,7 +12,7 @@ import Articles
|
||||
import RSCore
|
||||
|
||||
@objc(ScriptableAccount)
|
||||
class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
final class ScriptableAccount: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
|
||||
let account:Account
|
||||
init (_ account:Account) {
|
||||
|
||||
@@ -91,7 +91,7 @@ extension AppDelegate : AppDelegateAppleEvents {
|
||||
}
|
||||
}
|
||||
|
||||
class NetNewsWireCreateElementCommand : NSCreateCommand {
|
||||
final class NetNewsWireCreateElementCommand : NSCreateCommand {
|
||||
override func performDefaultImplementation() -> Any? {
|
||||
let classDescription = self.createClassDescription
|
||||
if (classDescription.className == "webFeed") {
|
||||
@@ -111,7 +111,7 @@ class NetNewsWireCreateElementCommand : NSCreateCommand {
|
||||
is ambiguity about whether specifiers are lists or single objects, the code switches
|
||||
based on which it is.
|
||||
*/
|
||||
class NetNewsWireDeleteCommand : NSDeleteCommand {
|
||||
final class NetNewsWireDeleteCommand : NSDeleteCommand {
|
||||
|
||||
/*
|
||||
delete(objectToDelete:, from container:)
|
||||
@@ -166,7 +166,7 @@ class NetNewsWireDeleteCommand : NSDeleteCommand {
|
||||
}
|
||||
}
|
||||
|
||||
class NetNewsWireExistsCommand : NSExistsCommand {
|
||||
final class NetNewsWireExistsCommand : NSExistsCommand {
|
||||
|
||||
// cocoa default behavior doesn't work here, because of cases where we define an object's property
|
||||
// to be another object type. e.g., 'permalink of the current article' parses as
|
||||
|
||||
@@ -11,7 +11,7 @@ import Account
|
||||
import Articles
|
||||
|
||||
@objc(ScriptableArticle)
|
||||
class ScriptableArticle: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
final class ScriptableArticle: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
|
||||
let article:Article
|
||||
let container:ScriptingObjectContainer
|
||||
|
||||
@@ -11,7 +11,7 @@ import Account
|
||||
import Articles
|
||||
|
||||
@objc(ScriptableAuthor)
|
||||
class ScriptableAuthor: NSObject, UniqueIdScriptingObject {
|
||||
final class ScriptableAuthor: NSObject, UniqueIdScriptingObject {
|
||||
|
||||
let author:Author
|
||||
let container:ScriptingObjectContainer
|
||||
|
||||
@@ -12,7 +12,7 @@ import Articles
|
||||
import RSCore
|
||||
|
||||
@objc(ScriptableFolder)
|
||||
class ScriptableFolder: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
final class ScriptableFolder: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
|
||||
let folder:Folder
|
||||
let container:ScriptingObjectContainer
|
||||
|
||||
@@ -12,7 +12,7 @@ import Account
|
||||
import Articles
|
||||
|
||||
@objc(ScriptableWebFeed)
|
||||
class ScriptableWebFeed: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
final class ScriptableWebFeed: NSObject, UniqueIdScriptingObject, ScriptingObjectContainer {
|
||||
|
||||
let webFeed:WebFeed
|
||||
let container:ScriptingObjectContainer
|
||||
|
||||
Reference in new issue
Block a user