CallStackParser
public class CallStackParser
A class for parsing the current call stack in scope.
-
Takes a specific item from ‘NSThread.callStackSymbols()’ and returns the class and method call contained within.
Declaration
Swift
public class func classAndMethodForStackSymbol(_ stackSymbol: String, includeImmediateParentClass: Bool? = false) -> (String, String)?
Parameters
stackSymbol
a specific item from ‘NSThread.callStackSymbols()’
includeImmediateParentClass
Whether or not to include the parent class in an innerclass situation.
Return Value
a tuple containing the (class,method) or nil if it could not be parsed
-
Analyses the ‘NSThread.callStackSymbols()’ and returns the calling class and method in the scope of the caller.
Declaration
Swift
public class func getCallingClassAndMethodInScope(includeImmediateParentClass: Bool? = false) -> (String, String)?
Parameters
includeImmediateParentClass
Whether or not to include the parent class in an innerclass situation.
Return Value
a tuple containing the (class,method) or nil if it could not be parsed
-
Analyses the ‘NSThread.callStackSymbols()’ and returns the current class and method in the scope of the caller.
Declaration
Swift
public class func getThisClassAndMethodInScope(includeImmediateParentClass: Bool? = false) -> (String, String)?
Parameters
includeImmediateParentClass
Whether or not to include the parent class in an inner class situation.
Return Value
a tuple containing the (class,method) or nil if it could not be parsed