congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
HaCdiCommons.getBeanRegistry
Code IndexAdd Tabnine to your IDE (free)

How to use
getBeanRegistry
method
in
org.hotswap.agent.plugin.cdi.HaCdiCommons

Best Java code snippets using org.hotswap.agent.plugin.cdi.HaCdiCommons.getBeanRegistry (Showing top 1 results out of 315)

origin: HotswapProjects/HotswapAgent

/**
 * Return all bean instances.
 *
 * @param bean the bean
 * @return the bean instances
 */
@SuppressWarnings({ "rawtypes", "unchecked" })
public static List<Object> getBeanInstances(Bean<?> bean) {
  List<Object> result = new ArrayList<>();
  Class<? extends Context> contextClass = getContextClass(bean.getScope());
  Map beanRegistry = (Map) getBeanRegistry(contextClass);
  if (beanRegistry != null) {
    Map m = (Map) beanRegistry.get(bean.getBeanClass().getName());
    if (m != null) {
      result.addAll(m.keySet());
    } else {
      LOGGER.debug("BeanRegistry is empty for bean class '{}'", bean.getBeanClass().getName());
    }
  } else {
    LOGGER.error("BeanRegistry field not found in context class '{}'", contextClass.getName());
  }
  return result;
}
org.hotswap.agent.plugin.cdiHaCdiCommonsgetBeanRegistry

Popular methods of HaCdiCommons

  • transformContext
    Add bean registry field to context, register bean instances in get(...) methods
  • getBeanInstances
    Return all bean instances.
  • isRegisteredScope
    Checks if scope is registered
  • addBeanRegistryToContext
    Adds the bean registry to context.
  • getContextClass
    Gets the context class for specified scope.
  • getCurrentScopeToContextMap
  • getRegistrationCode
  • transformGet1
    Transform 1 argument get method :public T get(Contextual contextual);
  • transformGet2
    Transform 2 arguments get method :public T get(Contextual contextual, CreationalContext creationalCo

Popular in Java

  • Reading from database using SQL prepared statement
  • notifyDataSetChanged (ArrayAdapter)
  • requestLocationUpdates (LocationManager)
  • scheduleAtFixedRate (Timer)
  • Component (java.awt)
    A component is an object having a graphical representation that can be displayed on the screen and t
  • InetAddress (java.net)
    An Internet Protocol (IP) address. This can be either an IPv4 address or an IPv6 address, and in pra
  • MessageDigest (java.security)
    Uses a one-way hash function to turn an arbitrary number of bytes into a fixed-length byte sequence.
  • MessageFormat (java.text)
    Produces concatenated messages in language-neutral way. New code should probably use java.util.Forma
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • JLabel (javax.swing)
  • 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