少年修仙传客户端基础资源
hch
2024-04-01 d01413b00ef631ac20347716b23818b0b811f65f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#pragma once
 
#include <stdint.h>
#include "il2cpp-config.h"
#include "il2cpp-metadata.h"
 
struct Il2CppString;
struct Il2CppArray;
struct Il2CppReflectionAssembly;
struct Il2CppReflectionAssemblyName;
struct Il2CppReflectionField;
struct Il2CppReflectionMethod;
struct Il2CppReflectionModule;
struct Il2CppReflectionProperty;
struct Il2CppReflectionEvent;
struct Il2CppReflectionType;
struct Il2CppReflectionParameter;
struct Il2CppClass;
struct FieldInfo;
struct MethodInfo;
struct PropertyInfo;
struct EventInfo;
struct Il2CppClass;
struct CustomAttributesCache;
struct CustomAttributeTypeCache;
struct Il2CppAssembly;
struct Il2CppAssemblyName;
struct Il2CppImage;
struct Il2CppType;
struct Il2CppObject;
struct MonoGenericParameterInfo;
struct Il2CppGenericParameter;
struct Il2CppMonoAssemblyName;
 
namespace il2cpp
{
namespace vm
{
    class LIBIL2CPP_CODEGEN_API Reflection
    {
// exported
    public:
        static Il2CppReflectionAssembly* GetAssemblyObject(const Il2CppAssembly *assembly);
        static Il2CppReflectionAssemblyName* GetAssemblyNameObject(const Il2CppAssemblyName *assemblyName);
        static Il2CppReflectionField* GetFieldObject(Il2CppClass *klass, FieldInfo *field);
        static Il2CppReflectionProperty* GetPropertyObject(Il2CppClass *klass, const PropertyInfo *property);
        static Il2CppReflectionEvent* GetEventObject(Il2CppClass *klass, const EventInfo *event);
        static Il2CppReflectionMethod* GetMethodObject(const MethodInfo *method, Il2CppClass *refclass);
        static const MethodInfo* GetMethod(const Il2CppReflectionMethod* method);
        static Il2CppReflectionModule* GetModuleObject(const Il2CppImage *image);
        static Il2CppReflectionType* GetTypeObject(const Il2CppType *type);
        static Il2CppArray* GetParamObjects(const MethodInfo *method, Il2CppClass *refclass);
        static CustomAttributesCache* GetCustomAttrsInfo(Il2CppObject *obj);
        static const MonoGenericParameterInfo* GetMonoGenericParameterInfo(const Il2CppGenericParameter *param);
        static void SetMonoGenericParameterInfo(const Il2CppGenericParameter *param, const MonoGenericParameterInfo *monoParam);
        static const Il2CppMonoAssemblyName* GetMonoAssemblyName(const Il2CppAssembly *assembly);
        static void SetMonoAssemblyName(const Il2CppAssembly *assembly, const Il2CppMonoAssemblyName *aname);
 
        static bool HasAttribute(Il2CppObject *obj, Il2CppClass *attribute);
        static bool HasAttribute(FieldInfo *field, Il2CppClass *attribute);
        static bool HasAttribute(const MethodInfo *method, Il2CppClass *attribute);
        static bool HasAttribute(Il2CppClass *klass, Il2CppClass *attribute);
 
        static bool IsType(Il2CppObject *obj);
        static bool IsField(Il2CppObject *obj);
        static bool IsAnyMethod(Il2CppObject *obj);
        static bool IsProperty(Il2CppObject *obj);
        static bool IsEvent(Il2CppObject *obj);
 
// internal
    public:
        static void Initialize();
        static Il2CppClass* TypeGetHandle(Il2CppReflectionType* ref);
        static Il2CppObject* GetDBNullObject();
 
        static Il2CppObject* GetCustomAttribute(CustomAttributeIndex index, Il2CppClass* attribute);
        static Il2CppArray* ConstructCustomAttributes(CustomAttributeIndex index);
 
        static CustomAttributesCache* GetCustomAttributesCacheFor(Il2CppClass *klass);
        static CustomAttributesCache* GetCustomAttributesCacheFor(const MethodInfo *method);
 
    private:
        static bool HasAttribute(Il2CppReflectionParameter *parameter, Il2CppClass* attribute);
        static CustomAttributesCache* GetCustomAttributesCacheFor(const PropertyInfo *property);
        static CustomAttributesCache* GetCustomAttributesCacheFor(FieldInfo *field);
        static CustomAttributesCache* GetCustomAttributesCacheFor(const EventInfo *event);
        static CustomAttributesCache* GetCustomAttributesCacheFor(Il2CppReflectionParameter *param);
        static CustomAttributesCache* GetCustomAttributesCacheFor(const Il2CppAssembly *assembly);
    };
} /* namespace vm */
} /* namespace il2cpp */