Method.h 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #pragma once
  2. #include <stdint.h>
  3. #include <string>
  4. #include "il2cpp-config.h"
  5. struct MethodInfo;
  6. struct PropertyInfo;
  7. struct ParameterInfo;
  8. struct Il2CppString;
  9. struct Il2CppType;
  10. struct Il2CppClass;
  11. namespace il2cpp
  12. {
  13. namespace vm
  14. {
  15. class LIBIL2CPP_CODEGEN_API Method
  16. {
  17. public:
  18. static const Il2CppType* GetReturnType(const MethodInfo* method);
  19. static const char* GetName(const MethodInfo *method);
  20. static std::string GetNameWithGenericTypes(const MethodInfo* method);
  21. static std::string GetFullName(const MethodInfo* method);
  22. static bool IsGeneric(const MethodInfo *method);
  23. static bool IsInflated(const MethodInfo *method);
  24. static bool IsInstance(const MethodInfo *method);
  25. static bool IsGenericInstance(const MethodInfo *method);
  26. static bool IsGenericInstanceMethod(const MethodInfo *method);
  27. static bool IsDefaultInterfaceMethodOnGenericInstance(const MethodInfo* method);
  28. static uint32_t GetParamCount(const MethodInfo *method);
  29. static uint32_t GetGenericParamCount(const MethodInfo *method);
  30. static const Il2CppType* GetParam(const MethodInfo *method, uint32_t index);
  31. static Il2CppClass* GetClass(const MethodInfo *method);
  32. static bool HasAttribute(const MethodInfo *method, Il2CppClass *attr_class);
  33. static Il2CppClass *GetDeclaringType(const MethodInfo* method);
  34. static uint32_t GetImplementationFlags(const MethodInfo *method);
  35. static uint32_t GetFlags(const MethodInfo *method);
  36. static uint32_t GetToken(const MethodInfo *method);
  37. static const char* GetParamName(const MethodInfo *method, uint32_t index);
  38. static bool IsSameOverloadSignature(const MethodInfo* method1, const MethodInfo* method2);
  39. static bool IsSameOverloadSignature(const PropertyInfo* property1, const PropertyInfo* property2);
  40. static int CompareOverloadSignature(const PropertyInfo* property1, const PropertyInfo* property2);
  41. static const char* GetParameterDefaultValue(const MethodInfo *method, int32_t parameterPosition, const Il2CppType** type, bool* isExplicitySetNullDefaultValue);
  42. static uint32_t GetParameterToken(const MethodInfo* method, int32_t parameterPosition);
  43. static const MethodInfo* GetAmbiguousMethodInfo();
  44. static const MethodInfo* GetEntryPointNotFoundMethodInfo();
  45. static bool IsAmbiguousMethodInfo(const MethodInfo* method);
  46. static bool IsEntryPointNotFoundMethodInfo(const MethodInfo* method);
  47. static bool HasFullGenericSharingSignature(const MethodInfo* method);
  48. };
  49. } /* namespace vm */
  50. } /* namespace il2cpp */