mirror of
https://github.com/FunkinCrew/Funkin.git
synced 2025-04-09 05:24:39 -04:00
Granted access to scripts to some otherwise blacklisted functions.
This commit is contained in:
parent
75af1b3947
commit
4d7f3a3643
1 changed files with 36 additions and 0 deletions
36
source/funkin/util/ReflectUtil.hx
Normal file
36
source/funkin/util/ReflectUtil.hx
Normal file
|
@ -0,0 +1,36 @@
|
|||
package funkin.util;
|
||||
|
||||
import Type;
|
||||
|
||||
class ReflectUtil
|
||||
{
|
||||
public static function getClassFields(cls:Class<Dynamic>):Array<String>
|
||||
{
|
||||
return Type.getClassFields(cls);
|
||||
}
|
||||
|
||||
public static function getClassFieldsOf(obj:Dynamic):Array<String>
|
||||
{
|
||||
return Type.getClassFields(Type.getClass(obj));
|
||||
}
|
||||
|
||||
public static function getInstanceFields(cls:Class<Dynamic>):Array<String>
|
||||
{
|
||||
return Type.getInstanceFields(cls);
|
||||
}
|
||||
|
||||
public static function getInstanceFieldsOf(obj:Dynamic):Array<String>
|
||||
{
|
||||
return Type.getInstanceFields(Type.getClass(obj));
|
||||
}
|
||||
|
||||
public static function getClassName(cls:Class<Dynamic>):String
|
||||
{
|
||||
return Type.getClassName(cls);
|
||||
}
|
||||
|
||||
public static function getClassNameOf(obj:Dynamic):String
|
||||
{
|
||||
return Type.getClassName(Type.getClass(obj));
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue