Package org.jibeframework.core.annotation

Examples of org.jibeframework.core.annotation.UIComponent


        } else {
          args[i] = arg;
        }
      }
      if (args[i] == null) {
        UIComponent uiCmpAnn = parameters[i].getParameterAnnotation(UIComponent.class);
        if (uiCmpAnn != null) {
          args[i] = applicationContext.getBean(uiCmpAnn.value());
        } else {
          UIController cntAnn = parameters[i].getParameterAnnotation(UIController.class);
          if (cntAnn != null) {
            args[i] = applicationContext.getBean(cntAnn.value());
          }
View Full Code Here


      compileScriptClass(scriptSource);
    }
    try {

      GroovyObject goo = (GroovyObject) scriptClass.newInstance();
      UIComponent ann = AnnotationUtils.findAnnotation(scriptClass, UIComponent.class);
      if (ann != null) {
        UIComponentMixin.applyMixin(ann.value(), goo, applicationContext);
      }
      Context context = Context.getCurrentContext();
      for (Map.Entry<Field, Object> f : injectionCache.entrySet()) {
        ReflectionUtils.makeAccessible(f.getKey());
        Object dependency = null;
View Full Code Here

          injectionCache.clear();
          Class<?> targetClass = this.scriptClass;
          while (targetClass != null && targetClass != Object.class) {
            for (Field field : targetClass.getDeclaredFields()) {
              if (!Modifier.isStatic(field.getModifiers())) {
                UIComponent dann = field.getAnnotation(UIComponent.class);
                if (dann != null) {
                  injectionCache.put(field, dann.value());
                } else {
                  UIController cann = field.getAnnotation(UIController.class);
                  if (cann != null) {
                    injectionCache.put(field, cann.value());
                  } else {
View Full Code Here

          if (!scripts.contains(path)) {
            String className = StringUtils.substringBeforeLast(StringUtils.substringAfter(path,
                p + separator).replace(separator.charAt(0), '.'), ".");
            Class<?> clazz = Class.forName(className);
            UIComponent uiAnn = AnnotationUtils.findAnnotation(clazz, UIComponent.class);
            if (uiAnn != null) {
              String beanName = uiAnn.value();
              scripts.add(f.getAbsolutePath());
              registerBean(beanName, f, "conversation");

            }
            UIController cntAnn = AnnotationUtils.findAnnotation(clazz, UIController.class);
View Full Code Here

TOP

Related Classes of org.jibeframework.core.annotation.UIComponent

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.