1
0
Fork 0
mirror of https://github.com/beefytech/Beef.git synced 2025-06-09 03:52:19 +02:00

Added reflect method filters

This commit is contained in:
Brian Fiete 2020-07-14 08:27:25 -07:00
parent f566daacea
commit f9c0f2a311
9 changed files with 204 additions and 112 deletions

View file

@ -6042,19 +6042,9 @@ BfIRValue BfModule::CreateTypeData(BfType* type, Dictionary<int, int>& usedStrin
if ((methodDef->mIsStatic) && ((methodReflectKind & ReflectKind_StaticMethods) != 0))
includeMethod = true;
if (methodDef->mMethodType == BfMethodType_Ctor)
{
if (typeOptions != NULL)
includeMethod = typeOptions->Apply(includeMethod, BfOptionFlags_ReflectConstructors);
}
else
{
if ((!methodDef->mIsStatic) && (typeOptions != NULL))
includeMethod = typeOptions->Apply(includeMethod, BfOptionFlags_ReflectNonStaticMethods);
if ((methodDef->mIsStatic) && (typeOptions != NULL))
includeMethod = typeOptions->Apply(includeMethod, BfOptionFlags_ReflectStaticMethods);
}
if ((!includeMethod) && (typeOptions != NULL))
includeMethod = ApplyTypeOptionMethodFilters(includeMethod, methodDef, typeOptions);
if (!includeMethod)
continue;