congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
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

  • Reactive rest calls using spring rest template
  • findViewById (Activity)
  • onRequestPermissionsResult (Fragment)
  • getExternalFilesDir (Context)
  • Container (java.awt)
    A generic Abstract Window Toolkit(AWT) container object is a component that can contain other AWT co
  • BigDecimal (java.math)
    An immutable arbitrary-precision signed decimal.A value is represented by an arbitrary-precision "un
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • ImageIO (javax.imageio)
  • JButton (javax.swing)
  • Top Sublime Text plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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