missing AbstractClassScanner
Hi,
in spring-as3 1.1 there was a class AbstractClassScanner which implements IMetaDataProcessor. You have refactored a lot in the code base for 2.0. I seems that the class scanning topic is delegated to as3commons-metadata, which brings its own IMetaDataProcessor and an implementation via AbstractMetaDataProcessor.
In 2.0 the is a new interface IClassScanner - extended from IMetaDataProcessor. The intention is to add custom Metadata in a class, which has to be processes lazy. Currently we are using AbstractClassScanner (1.1) and override the scan(classNames:String) method; where is the related part in 2.0 which does this scanning process?
Maybe someone can help?
One Problem solved, new ones pops up - getObjectsOfType(class:Class)
Hi Roland,
it seems that i have completely overlooked the mentioned section in the manual:); Now this class is processes each class which is declared with the required Metadata.
This is how we did the registration:
var factory:ClassScannerObjectFactoryPostProcessor = new ClassScannerObjectFactoryPostProcessor();
factory.addScanner(new ExtensionClassScanner());
appContext.addObjectFactoryPostProcessor(factory);
appContext.load();
Now i have the following problem:
Class A, annotated with metadata gets detected. At this moment a instance of the class is not available. The classname is included in the metadata - deffered instantiation. In version 1.1 the context knews about a registration, e.g. when Class A is detected, the bundlecontext gets informed to know about the detection, too. In version 1.1 we did the following to get all references.
var list:Object = _context.getObjectsOfType(BundleData); //getObjectsOfType(class:Class) is not available in 2.0
so i thought give the following a try
var list:Object = _context.objectDefinitionRegistry.getObjectDefinit ionsForType(BundleData); //list a bunch of registered objects; all these have in common that are registered immediately via a Configuration;
so every time this function is called a null reference returns;
What is the equivalent to _context.getObjectsOfType?
We saw an Object in the context called cache; It seems this class lists the registered class names, in a Vector.<String>, but not the references to the registered class objects.
Maybe you can help out?
Thanks!