LLDB mainline
|
#include <ObjCLanguage.h>
Public Member Functions | |
bool | IsClassMethod () const |
Determines if this method is a class method. | |
bool | IsInstanceMethod () const |
Determines if this method is an instance method. | |
const std::string & | GetFullName () const |
Returns the full name of the method. | |
std::string | GetFullNameWithoutCategory () const |
Creates a variation of this method without the category. | |
llvm::StringRef | GetClassName () const |
Returns a reference to the class name. | |
llvm::StringRef | GetClassNameWithCategory () const |
Returns a reference to the class name with the category. | |
llvm::StringRef | GetCategory () const |
Returns a reference to the category name. | |
llvm::StringRef | GetSelector () const |
Returns a reference to the selector name. | |
Static Public Member Functions | |
static std::optional< const MethodName > | Create (llvm::StringRef name, bool strict) |
The static factory method for creating a MethodName. | |
Protected Types | |
enum | Type { eTypeUnspecified , eTypeClassMethod , eTypeInstanceMethod } |
Protected Member Functions | |
MethodName (llvm::StringRef name, Type type) | |
Protected Attributes | |
const std::string | m_full |
Type | m_type |
Definition at line 26 of file ObjCLanguage.h.
|
protected |
Enumerator | |
---|---|
eTypeUnspecified | |
eTypeClassMethod | |
eTypeInstanceMethod |
Definition at line 113 of file ObjCLanguage.h.
|
inlineprotected |
Definition at line 115 of file ObjCLanguage.h.
|
static |
The static factory method for creating a MethodName.
[in] | name | The name of the method. |
[in] | strict | Control whether or not the name parser is strict about +/- in the front of the name. |
Definition at line 64 of file ObjCLanguage.cpp.
References eTypeClassMethod, eTypeInstanceMethod, and eTypeUnspecified.
Referenced by lldb_private::ObjCLanguage::GetMethodNameVariants(), lldb_private::plugin::dwarf::ManualDWARFIndex::IndexUnitImpl(), and DWARFASTParserClang::ParseSubroutine().
llvm::StringRef ObjCLanguage::MethodName::GetCategory | ( | ) | const |
Returns a reference to the category name.
Example: Full name: "+[NSString(my_additions) myStringWithCString:]" will give you "my_additions"
Definition at line 132 of file ObjCLanguage.cpp.
llvm::StringRef ObjCLanguage::MethodName::GetClassName | ( | ) | const |
Returns a reference to the class name.
Example: Full name: "+[NSString(my_additions) myStringWithCString:]" will give you "NSString"
Definition at line 103 of file ObjCLanguage.cpp.
Referenced by DWARFASTParserClang::ParseObjCMethod().
llvm::StringRef ObjCLanguage::MethodName::GetClassNameWithCategory | ( | ) | const |
Returns a reference to the class name with the category.
Example: Full name: "+[NSString(my_additions) myStringWithCString:]" will give you "NSString(my_additions)"
Note: If your method has no category, this will give the same output as GetClassName
.
GetClassName
. Definition at line 116 of file ObjCLanguage.cpp.
|
inline |
Returns the full name of the method.
This includes the class name, the category name (if applicable), and the selector name.
Definition at line 60 of file ObjCLanguage.h.
References m_full.
std::string ObjCLanguage::MethodName::GetFullNameWithoutCategory | ( | ) | const |
Creates a variation of this method without the category.
If this method has no category, it returns an empty string.
Example: Full name: "+[NSString(my_additions) myStringWithCString:]" becomes "+[NSString myStringWithCString:]"
Definition at line 145 of file ObjCLanguage.cpp.
llvm::StringRef ObjCLanguage::MethodName::GetSelector | ( | ) | const |
Returns a reference to the selector name.
Example: Full name: "+[NSString(my_additions) myStringWithCString:]" will give you "myStringWithCString:"
Definition at line 123 of file ObjCLanguage.cpp.
|
inline |
Determines if this method is a class method.
Definition at line 45 of file ObjCLanguage.h.
References eTypeClassMethod, and m_type.
|
inline |
Determines if this method is an instance method.
Definition at line 51 of file ObjCLanguage.h.
References eTypeInstanceMethod, and m_type.
|
protected |
Definition at line 118 of file ObjCLanguage.h.
Referenced by GetFullName().
|
protected |
Definition at line 119 of file ObjCLanguage.h.
Referenced by IsClassMethod(), and IsInstanceMethod().