congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
BeanDefinition.addDestroyMethodPoints
Code IndexAdd Tabnine to your IDE (free)

How to use
addDestroyMethodPoints
method
in
jodd.petite.BeanDefinition

Best Java code snippets using jodd.petite.BeanDefinition.addDestroyMethodPoints (Showing top 2 results out of 315)

origin: oblac/jodd

/**
 * Registers destroy method.
 *
 * @param beanName bean name
 * @param destroyMethodNames destroy method names
 */
public void registerPetiteDestroyMethods(final String beanName, String... destroyMethodNames) {
  BeanDefinition beanDefinition = lookupExistingBeanDefinition(beanName);
  ClassDescriptor cd = ClassIntrospector.get().lookup(beanDefinition.type);
  if (destroyMethodNames == null) {
    destroyMethodNames = StringPool.EMPTY_ARRAY;
  }
  int total = destroyMethodNames.length;
  DestroyMethodPoint[] destroyMethodPoints = new DestroyMethodPoint[total];
  int i;
  for (i = 0; i < destroyMethodNames.length; i++) {
    MethodDescriptor md = cd.getMethodDescriptor(destroyMethodNames[i], ClassUtil.EMPTY_CLASS_ARRAY, true);
    if (md == null) {
      throw new PetiteException("Destroy method not found: " + beanDefinition.type.getName() + '#' + destroyMethodNames[i]);
    }
    destroyMethodPoints[i] = new DestroyMethodPoint(md.getMethod());
  }
  beanDefinition.addDestroyMethodPoints(destroyMethodPoints);
}
origin: org.jodd/jodd-petite

/**
 * Registers destroy method.
 *
 * @param beanName bean name
 * @param destroyMethodNames destroy method names
 */
public void registerPetiteDestroyMethods(final String beanName, String... destroyMethodNames) {
  BeanDefinition beanDefinition = lookupExistingBeanDefinition(beanName);
  ClassDescriptor cd = ClassIntrospector.get().lookup(beanDefinition.type);
  if (destroyMethodNames == null) {
    destroyMethodNames = StringPool.EMPTY_ARRAY;
  }
  int total = destroyMethodNames.length;
  DestroyMethodPoint[] destroyMethodPoints = new DestroyMethodPoint[total];
  int i;
  for (i = 0; i < destroyMethodNames.length; i++) {
    MethodDescriptor md = cd.getMethodDescriptor(destroyMethodNames[i], ClassUtil.EMPTY_CLASS_ARRAY, true);
    if (md == null) {
      throw new PetiteException("Destroy method not found: " + beanDefinition.type.getName() + '#' + destroyMethodNames[i]);
    }
    destroyMethodPoints[i] = new DestroyMethodPoint(md.getMethod());
  }
  beanDefinition.addDestroyMethodPoints(destroyMethodPoints);
}
jodd.petiteBeanDefinitionaddDestroyMethodPoints

Javadoc

Adds destroy methods.

Popular methods of BeanDefinition

  • name
    Returns bean name.
  • type
    Returns bean type.
  • <init>
  • addInitMethodPoints
    Adds init methods.
  • addMethodInjectionPoint
    Adds method injection point.
  • addPropertyInjectionPoint
    Adds property injection point.
  • addSetInjectionPoint
    Adds set injection point.
  • scopeLookup
    Delegates to jodd.petite.scope.Scope#lookup(String).
  • scopeRegister
    Delegates to jodd.petite.scope.Scope#register(jodd.petite.BeanDefinition,Object)if scope is defined.
  • scopeRemove
    Delegates to jodd.petite.scope.Scope#remove(String).
  • consumer
    Returns an optional consumer.
  • destroyMethodPoints
    Returns destroy method points.
  • consumer,
  • destroyMethodPoints,
  • initMethodPoints,
  • scope

Popular in Java

  • Start an intent from android
  • runOnUiThread (Activity)
  • getSupportFragmentManager (FragmentActivity)
  • getSharedPreferences (Context)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Graphics2D (java.awt)
    This Graphics2D class extends the Graphics class to provide more sophisticated control overgraphics
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now