Examples of PetiteBean


Examples of jodd.petite.meta.PetiteBean

    try {
      beanClass = loadClass(entryName);
    } catch (ClassNotFoundException cnfex) {
      throw new PetiteException("Unable to load class: " + cnfex, cnfex);
    }
    PetiteBean petiteBean = beanClass.getAnnotation(PetiteBean.class);
    if (petiteBean == null) {
      return;
    }
    container.registerPetiteBean(beanClass, null, null, null, false);
  }
View Full Code Here

Examples of jodd.petite.meta.PetiteBean

  /**
   * Resolves bean's auto-wire flag from the annotation. Returns default auto-wire if annotation doesn't exist.
   */
  public static WiringMode resolveBeanWiringMode(Class type) {
    PetiteBean petiteBean = ((Class<?>) type).getAnnotation(PetiteBean.class);
    return petiteBean != null ? petiteBean.wiring() : WiringMode.DEFAULT;
  }
View Full Code Here

Examples of jodd.petite.meta.PetiteBean

  /**
   * Resolves bean's scope type from the annotation. Returns <code>null</code>
   * if annotation doesn't exist.
   */
  public static Class<? extends Scope> resolveBeanScopeType(Class type) {
    PetiteBean petiteBean = ((Class<?>) type).getAnnotation(PetiteBean.class);
    return petiteBean != null ? petiteBean.scope() : null;
  }
View Full Code Here

Examples of jodd.petite.meta.PetiteBean

  /**
   * Resolves bean's name from bean annotation or type name. May be used for resolving bean name
   * of base type during registration of bean subclass.
   */
  public static String resolveBeanName(Class type, boolean useLongTypeName) {
    PetiteBean petiteBean = ((Class<?>)type).getAnnotation(PetiteBean.class);
    String name = null;
    if (petiteBean != null) {
      name = petiteBean.value().trim();
    }
    if ((name == null) || (name.length() == 0)) {
      if (useLongTypeName) {
        name = type.getName();
      } else {
View Full Code Here

Examples of jodd.petite.meta.PetiteBean

    if (beanClass == null) {
      return;
    }

    PetiteBean petiteBean = beanClass.getAnnotation(PetiteBean.class);
    if (petiteBean == null) {
      return;
    }
    container.registerPetiteBean(beanClass, null, null, null, false);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.