Macros to generate lists of classes at compile time.

This code is a bitch glad Jason figured it out. Based on code from CompileTime: https://github.com/jasononeil/compiletime

Static methods

staticlistClassesInPackage(targetPackage:Dynamic, includeSubPackages:Dynamic):Iterable<Class<Dynamic>>

Gets a list of Class<T> for all classes in a specified package.

Example: var list:Array<Class<Dynamic>> = listClassesInPackage("funkin", true);

Parameters:

targetPackage

A String containing the package name to query.

includeSubPackages

Whether to include classes located in sub-packages of the target package.

Returns:

A list of classes matching the specified criteria.

staticlistSubclassesOf<T>(targetClassExpr:Class<T>):List<Class<T>>

Get a list of Class<T> for all classes extending a specified class.

Example: var list:Array<Class<FlxSprite>> = listSubclassesOf(FlxSprite);

Parameters:

targetClass

The class to query for subclasses.

Returns:

A list of classes matching the specified criteria.