Package com.citytechinc.cq.component.annotations.config

Examples of com.citytechinc.cq.component.annotations.config.Widget


    Reflections reflections) throws ClassNotFoundException, NotFoundException, MalformedURLException {
    List<WidgetConfigHolder> builtInWidgets = new ArrayList<WidgetConfigHolder>();

    for (Class<?> c : reflections.getTypesAnnotatedWith(Widget.class)) {
      CtClass clazz = classPool.getCtClass(c.getName());
      Widget widgetAnnotation = (Widget) clazz.getAnnotation(Widget.class);

      Class<? extends Annotation> annotationClass = widgetAnnotation.annotationClass();

      Class<? extends WidgetMaker> makerClass = widgetAnnotation.makerClass();
      Class<? extends AbstractWidget> widgetClass = classLoader.loadClass(clazz.getName()).asSubclass(
        AbstractWidget.class);
      WidgetConfigHolder widgetConfig = new WidgetConfigHolder(annotationClass, widgetClass, makerClass,
        widgetAnnotation.xtype(), widgetAnnotation.ranking());

      builtInWidgets.add(widgetConfig);

    }
    return builtInWidgets;
View Full Code Here


    Reflections reflections) throws ClassNotFoundException, NotFoundException, MalformedURLException {
    List<WidgetConfigHolder> builtInWidgets = new ArrayList<WidgetConfigHolder>();

    for (Class<?> c : reflections.getTypesAnnotatedWith(Widget.class)) {
      CtClass clazz = classPool.getCtClass(c.getName());
      Widget widgetAnnotation = (Widget) clazz.getAnnotation(Widget.class);

      Class<? extends Annotation> annotationClass = widgetAnnotation.annotationClass();

      Class<? extends WidgetMaker> makerClass = widgetAnnotation.makerClass();
      Class<? extends AbstractWidget> widgetClass = classLoader.loadClass(clazz.getName()).asSubclass(
        AbstractWidget.class);
      WidgetConfigHolder widgetConfig = new WidgetConfigHolder(annotationClass, widgetClass, makerClass,
        widgetAnnotation.xtype(), widgetAnnotation.ranking());

      builtInWidgets.add(widgetConfig);

    }
    return builtInWidgets;
View Full Code Here

TOP

Related Classes of com.citytechinc.cq.component.annotations.config.Widget

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.