public ServletConfiguration() { ComponentScanner.getInstance().scanPackage(BaseComponent.class.getPackage()); EventTypeScanner.getInstance().scanPackage(Event.class.getPackage()); }
/** * Creates and registers a component definition for a class by scanning the class and its * superclasses for method annotations. * * @param clazz Class to scan. */ @Override protected void doScanClass(Class<BaseComponent> clazz) { if (log.isDebugEnabled()) { log.debug("Processing @Component annotation for class " + clazz); } ComponentDefinition def = new ComponentDefinition(clazz); scanMethods(def, clazz, false); scanMethods(def, def.getFactoryClass(), true); ComponentRegistry.getInstance().register(def); }
scanMethods(def, clazz.getSuperclass(), factoryMethods);
/** * Load time initializations. */ public static void init() { ComponentScanner.getInstance().scanPackage(Util.class.getPackage()); plotTypes.put("area", PlotArea.class); plotTypes.put("arearange", PlotAreaRange.class); plotTypes.put("areaspline", PlotAreaSpline.class); plotTypes.put("areasplinerange", PlotAreaSplineRange.class); plotTypes.put("bar", PlotBar.class); plotTypes.put("boxplot", PlotBox.class); plotTypes.put("bubble", PlotBubble.class); plotTypes.put("column", PlotColumn.class); plotTypes.put("columnrange", PlotColumnRange.class); plotTypes.put("errorbar", PlotErrorBar.class); plotTypes.put("funnel", PlotFunnel.class); plotTypes.put("gauge", PlotGauge.class); plotTypes.put("line", PlotLine.class); plotTypes.put("pie", PlotPie.class); plotTypes.put("scatter", PlotScatter.class); plotTypes.put("solidgauge", PlotSolidGauge.class); plotTypes.put("spline", PlotSpline.class); plotTypes.put("waterfall", PlotWaterfall.class); }
ComponentScanner.getInstance().scanPackage(pkg);