Codota Logo
PetiteContainer.createBean
Code IndexAdd Codota to your IDE (free)

How to use
createBean
method
in
jodd.petite.PetiteContainer

Best Java code snippets using jodd.petite.PetiteContainer.createBean (Showing top 12 results out of 315)

  • Common ways to obtain PetiteContainer
private void myMethod () {
PetiteContainer p =
  • Codota Iconnew PetiteContainer()
  • Smart code suggestions by Codota
}
origin: oblac/jodd

/**
 * Creates and wires a bean within the container using default wiring mode and default init methods flag.
 * Bean is <b>not</b> registered.
 */
public <E> E createBean(final Class<E> type) {
  return createBean(type, null);
}
origin: oblac/jodd

  @Override
  protected ActionResult createResult(final Class<? extends ActionResult> actionResultClass) {
    return petiteContainer.createBean(actionResultClass);
  }
}
origin: oblac/jodd

/**
 * Acquires filter from Petite container.
 */
@Override
protected <R extends ActionFilter> R createWrapper(final Class<R> wrapperClass) {
  return petiteContainer.createBean(wrapperClass);
}
origin: oblac/jodd

/**
 * Acquires action from Petite container.
 */
@Override
@SuppressWarnings({"unchecked"})
protected Object createAction(final Class actionClass) {
  return petiteContainer.createBean(actionClass);
}
origin: oblac/jodd

  /**
   * Acquires interceptor from Petite container.
   */
  @Override
  protected <R extends ActionInterceptor> R createWrapper(final Class<R> wrapperClass) {
    return petiteContainer.createBean(wrapperClass);
  }
}
origin: oblac/jodd

/**
 * Performs search for the scope class and returns it's instance.
 */
protected MadvocScope getOrInitScope(final Class<? extends MadvocScope> madvocScopeType) {
  for (final MadvocScope s : allScopes) {
    if (s.getClass().equals(madvocScopeType)) {
      return s;
    }
  }
  // new scope detected
  final MadvocScope newScope;
  try {
    newScope = madpc.createBean(madvocScopeType);
  } catch (Exception ex) {
    throw new MadvocException("Unable to create scope: " + madvocScopeType, ex);
  }
  allScopes.add(newScope);
  return newScope;
}
origin: oblac/jodd

@Test
void testCreate() {
  PetiteContainer pc = new PetiteContainer();
  pc.registerPetiteBean(Foo.class, null, null, null, false, null);
  pc.registerPetiteBean(Zoo.class, null, null, null, false, null);
  pc.registerPetiteBean(Boo.class, null, null, null, false, null);
  assertEquals(3, pc.beansCount());
  assertEquals(1, pc.scopesCount());
  assertEquals(0, Foo.instanceCounter);
  Boo boo = pc.createBean(Boo.class);
  assertNotNull(boo);
  assertNotNull(boo.getFoo());
  assertNotNull(boo.zoo);
  assertNotSame(boo.zoo.boo, boo);        // not equal instances!!!
  assertEquals(1, boo.getFoo().hello());
  assertEquals(1, boo.getCount());
}
origin: org.jodd/jodd-petite

/**
 * Creates and wires a bean within the container using default wiring mode and default init methods flag.
 * Bean is <b>not</b> registered.
 */
public <E> E createBean(final Class<E> type) {
  return createBean(type, null);
}
origin: org.jodd/jodd-wot

  @Override
  protected ActionResult createResult(Class<? extends ActionResult> actionResultClass) {
    return petiteContainer.createBean(actionResultClass);
  }
}
origin: org.jodd/jodd-wot

  /**
   * Acquires interceptor from Petite container.
   */
  @Override
  protected ActionInterceptor createInterceptor(Class<? extends ActionInterceptor> interceptorClass) {
    return petiteContainer.createBean(interceptorClass);
  }
}
origin: org.jodd/jodd-wot

/**
 * Acquires action from Petite container.
 */
@Override
@SuppressWarnings({"unchecked"})
protected Object createAction(Class actionClass) {
  return petiteContainer.createBean(actionClass);
}
origin: org.jodd/jodd-wot

/**
 * Creates and wires a bean within the container using default wiring mode and default init methods flag.
 * Bean is <b>not</b> registered.
 */
public <E> E createBean(Class<E> type) {
  return createBean(type, null, petiteConfig.getDefaultRunInitMethods());
}
jodd.petitePetiteContainercreateBean

Javadoc

Creates and wires a bean within the container using default wiring mode and default init methods flag. Bean is not registered.

Popular methods of PetiteContainer

  • addBean
    Adds object instance to the container as singleton bean.
  • getBean
    Returns Petite bean instance named as one of the provided names.
  • registerPetiteBean
  • defineParameters
  • wire
    Wires provided bean with the container and optionally invokes init methods. Bean is not registered.
  • <init>
    Creates new Petite container using PetiteContainer.
  • addSelf
    Adds self instance to the container so internal beans may fetch container for further usage. No wiri
  • lookupBeanDefinition
  • resolveBeanName
  • shutdown
    Shutdowns container. After container is down, it can't be used anymore.
  • beansCount
  • config
  • beansCount,
  • config,
  • createBeanDefinitionForRegistration,
  • forEachBeanType,
  • lookupExistingBeanDefinition,
  • registerPetiteCtorInjectionPoint,
  • registerPetiteInitMethods,
  • registerPetiteMethodInjectionPoint,
  • registerPetitePropertyInjectionPoint

Popular in Java

  • Reactive rest calls using spring rest template
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • setContentView (Activity)
  • Iterator (java.util)
    An iterator over a collection. Iterator takes the place of Enumeration in the Java Collections Frame
  • ResourceBundle (java.util)
    Resource bundles contain locale-specific objects. When your program needs a locale-specific resource
  • TimeZone (java.util)
    TimeZone represents a time zone offset, and also figures out daylight savings. Typically, you get a
  • TreeMap (java.util)
    A Red-Black tree based NavigableMap implementation. The map is sorted according to the Comparable of
  • Executor (java.util.concurrent)
    An object that executes submitted Runnable tasks. This interface provides a way of decoupling task s
  • ThreadPoolExecutor (java.util.concurrent)
    An ExecutorService that executes each submitted task using one of possibly several pooled threads, n
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now