mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 13:10:44 +00:00
Refactor a findProducers method out of processAllMetaDataProducersInPackage, for more flexibility (e.g., in QBitProducers)
This commit is contained in:
@ -106,14 +106,10 @@ public class MetaDataProducerHelper
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/***************************************************************************
|
||||||
/*******************************************************************************
|
|
||||||
** Recursively find all classes in the given package, that implement MetaDataProducerInterface
|
|
||||||
** run them, and add their output to the given qInstance.
|
|
||||||
**
|
**
|
||||||
** Note - they'll be sorted by the sortOrder they provide.
|
***************************************************************************/
|
||||||
*******************************************************************************/
|
public static List<MetaDataProducerInterface<?>> findProducers(String packageName) throws QException
|
||||||
public static void processAllMetaDataProducersInPackage(QInstance instance, String packageName) throws QException
|
|
||||||
{
|
{
|
||||||
List<Class<?>> classesInPackage;
|
List<Class<?>> classesInPackage;
|
||||||
try
|
try
|
||||||
@ -196,6 +192,20 @@ public class MetaDataProducerHelper
|
|||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
|
|
||||||
|
return (producers);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
** Recursively find all classes in the given package, that implement MetaDataProducerInterface
|
||||||
|
** run them, and add their output to the given qInstance.
|
||||||
|
**
|
||||||
|
** Note - they'll be sorted by the sortOrder they provide.
|
||||||
|
*******************************************************************************/
|
||||||
|
public static void processAllMetaDataProducersInPackage(QInstance instance, String packageName) throws QException
|
||||||
|
{
|
||||||
|
List<MetaDataProducerInterface<?>> producers = findProducers(packageName);
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
// execute each one (if enabled), adding their meta data to the instance //
|
// execute each one (if enabled), adding their meta data to the instance //
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
Reference in New Issue
Block a user