I am trying to create a script that will loop through all classes in a given schema and tell me if there are any references to it. Essentially this is the same functionality as right-clicking on a class in the Jade environment and selecting references. The purpose is to identify all classes that no longer have references and therefore MAY be obsolete.
I have looked for methods on the Schema and Class object but can only find methods that find references to methods that are in use and not the actual class.
At a basic level the script will be something like...
Code: Select all
allClasses := currentSchema.getAllClasses(false);
foreach class in allClasses discreteLock do
if class.someMethodThatCountsNumberOfReferencesThisClassHas = 0 then
write class.name;
endif;
endforeach;
Thanks