Tabnine Logo
BeanMetaData
Code IndexAdd Tabnine to your IDE (free)

How to use
BeanMetaData
in
org.jboss.beans.metadata.spi

Best Java code snippets using org.jboss.beans.metadata.spi.BeanMetaData (Showing top 20 results out of 315)

origin: org.jboss.deployers/jboss-deployers-vfs

  protected String getComponentName(BeanMetaData attachment)
  {
   return attachment.getName();
  }
}
origin: org.jboss.kernel/jboss-weld-int

/**
* Checks if the context contains the passed in dependency
* 
* @param dependency the dependency to check
* @return true if the context contains the dependency
*/
private boolean containsDependency(DependencyMetaData dependency)
{
 return context.getBeanMetaData().getDepends() != null && context.getBeanMetaData().getDepends().contains(dependency);
}
origin: org.jboss.kernel/jboss-spring-int

  @Override
  protected boolean isMetaDataAlreadyPresent(ClassInfo info, SpringBean annotation, BeanMetaData beanMetaData)
  {
   Set<PropertyMetaData> properties = beanMetaData.getProperties();
   if (properties != null && properties.isEmpty() == false)
   {
     for (PropertyMetaData property : properties)
     {
      if (BNP.equals(property.getName()))
      {
        return true;
      }
     }
   }
   return false;
  }
}
origin: org.jboss.microcontainer/jboss-kernel

public BeanInfo getBeanInfo(BeanMetaData metaData) throws Throwable
{
 ClassLoader cl = Configurator.getClassLoader(metaData);
 String className = metaData.getBean();
 if (className == null)
   return null;
 return getBeanInfo(className, cl, metaData.getAccessMode());
}
origin: org.jboss.deployers/jboss-deployers-vfs

@Override
public void undeploy(DeploymentUnit unit, BeanMetaData deployment)
{
 BeanMetaDataDeployerPlugin plugin = deployedWithPlugin.remove(deployment.getName());
 if (plugin == null || plugin.uninstallContext(controller, unit, deployment) == false)
 {
   ControllerContext context = controller.uninstall(deployment.getName());
   removeContext(context, unit.getParent());
 }
 
 // Remove any classloader metadata we added (not necessary if we clone above)
 ClassLoaderMetaData classLoader = deployment.getClassLoader();
 if (classLoader instanceof DeploymentClassLoaderMetaData)
   deployment.setClassLoader(null);
}
origin: org.jboss.microcontainer/jboss-kernel

/**
* Update class annotations
* 
* @param mutable the mutable metadata
* @param context the context
* @param add true for add, false for remove
*/
private void updateClassAnnotations(MutableMetaDataLoader mutable, KernelControllerContext context, boolean add)
{
 BeanMetaData beanMetaData = context.getBeanMetaData();
 if (beanMetaData != null)
 {
   ClassLoader cl;
   try
   {
    cl = Configurator.getClassLoader(beanMetaData);
   }
   catch(Throwable t)
   {
    throw new RuntimeException("Error getting classloader for " + beanMetaData.getName(), t);
   }
   updateAnnotations(cl, mutable, beanMetaData.getAnnotations(), add);
 }
}
origin: org.jboss.microcontainer/jboss-kernel

if (classLoaderBean.getClassLoader() == null)
  classLoaderBean.setClassLoader(new AbstractClassLoaderMetaData(new AbstractValueMetaData()));
result.add((BeanMetaData) classLoader);
     Set<AnnotationMetaData> annotationsBMD = bmd.getAnnotations();
     if (annotationsBMD == null)
      bmd.setAnnotations(annotationsBMD);
   ClassLoaderMetaData beanClassLoader = bmd.getClassLoader();
   if (beanClassLoader == null)
      if (classLoader instanceof BeanMetaData)
        classLoader = new AbstractDependencyValueMetaData(((BeanMetaData) classLoader).getName());
        beanClassLoader = new AbstractClassLoaderMetaData(classLoader);
      bmd.setClassLoader(beanClassLoader);
origin: org.jboss.microcontainer/jboss-kernel

/**
* Create an abstract controller context
*
* @param info     the bean info
* @param metaData the meta data
* @param target   any target object
*/
public AbstractKernelControllerContext(BeanInfo info, BeanMetaData metaData, Object target)
{
 super(metaData.getName(), determineAliases(metaData), target == null ? actions : noInstantiate, new AbstractDependencyInfo(), target);
 this.info = info;
 this.metaData = metaData;
 ControllerMode mode = metaData.getMode();
 if (mode != null)
   setMode(mode);
 ErrorHandlingMode errorHandlingMode = metaData.getErrorHandlingMode();
 if (errorHandlingMode != null)
   setErrorHandlingMode(errorHandlingMode);
 boolean autowireCandidate = metaData.isAutowireCandidate();
 getDependencyInfo().setAutowireCandidate(autowireCandidate);
 if (System.getSecurityManager() != null)
   accessContext = AccessController.getContext();
 initKernelScopeInfo();
}
origin: org.jboss.microcontainer/jboss-kernel

BeanMetaData clone = (BeanMetaData)root.clone();
List<Pair> pairs = new ArrayList<Pair>();
addPairs(clone, pairs);
 if (bean.getName() == null)
   bean.setName(generateName(previous));
 replaceWithInjection(previous, bean);
 result.add(bean);
origin: org.jboss.microcontainer/jboss-kernel

protected List<? extends MetaDataVisitorNode> internalApplyAnnotation(ClassInfo info, MetaData retrieval, Aliases annotation, KernelControllerContext context) throws Throwable
{
 BeanMetaData beanMetaData = context.getBeanMetaData();
 Set<Object> aliases = beanMetaData.getAliases();
 Controller controller = context.getController();
 for(String alias : annotation.value())
 {
   // check for ${property}
   if (annotation.replace())
    alias = StringPropertyReplacer.replaceProperties(alias);
   if (aliases == null || aliases.contains(alias) == false)
   {
    controller.addAlias(alias, beanMetaData.getName());
   }
 }
 // no metadata added
 return null;
}
origin: org.jboss.switchboard/jboss-switchboard-mc-impl

Set<DependencyMetaData> dependencies = builder.getBeanMetaData().getDepends();
if (dependencies != null)
Set<DemandMetaData> demands = builder.getBeanMetaData().getDemands();
if (demands != null)
Set<SupplyMetaData> supplies = builder.getBeanMetaData().getSupplies();
if (supplies != null)
origin: org.jboss.microcontainer/jboss-kernel

public void removeSupplies(KernelControllerContext context)
 Set<SupplyMetaData> supplies = metaData.getSupplies();
 if (supplies != null)
origin: org.jboss.deployers/jboss-deployers-vfs

protected DeploymentUnit addComponent(DeploymentUnit unit, BeanMetaData attachment)
{
 DeploymentUnit component = super.addComponent(unit, attachment);
 String className = attachment.getBean();
 if (className != null)
 {
   Object qualifier;
   if (attachment.getClassLoader() == null)
   {
    ClassLoader cl = unit.getClassLoader();
    try
    {
      qualifier = cl.loadClass(className);
    }
    catch (Exception e)
    {
      throw new IllegalArgumentException("Exception loading class for ScopeKey addition.", e);              
    }
   }
   else
   {
    qualifier = className;
   }
   component.getScope().addScope(CommonLevels.CLASS, qualifier);
 }
 return component;
}
origin: org.jboss.microcontainer/jboss-kernel

protected void initKernelScopeInfo()
{
 String className = null;
 Object target = getTarget();
 if (target != null)
   className = target.getClass().getName();
 BeanMetaData bmd = getBeanMetaData();
 if (bmd != null)
 {
   String bean = bmd.getBean();
   if (bean != null)
    className = bean;
 }
 setScopeInfo(new KernelScopeInfo(getName(), className, bmd));
}
origin: org.jboss.microcontainer/jboss-kernel

/**
* Get the classloader for some BeanMetaData
*
* @param metaData the metaData
* @return the classloader
* @throws Throwable for any error
*/
public static ClassLoader getClassLoader(BeanMetaData metaData) throws Throwable
{
 ClassLoaderMetaData clmd = null;
 if (metaData != null)
   clmd = metaData.getClassLoader();
 return getClassLoader(clmd);
}
origin: org.jboss.snowdrop/snowdrop-facade

  public boolean accepts(ControllerContext context) {
    Set<AnnotationMetaData> annotationMetaDataSet = ((KernelControllerContext) context).getBeanMetaData().getAnnotations();
    for (AnnotationMetaData annotationMetaData : annotationMetaDataSet) {
      if (annotationType.isAssignableFrom(annotationMetaData.getAnnotationInstance().annotationType())) {
        return true;
      }
    }
    return false;
  }
});
origin: org.jboss.deployers/jboss-deployers-vfs

if (deployment.getClassLoader() == null)
   deployment.setClassLoader(new DeploymentClassLoaderMetaData(unit));
  throw DeploymentException.rethrowAsDeploymentException("Error deploying: " + deployment.getName(), t);
origin: org.jboss.microcontainer/jboss-kernel

public void addSupplies(KernelControllerContext context)
 Set<SupplyMetaData> supplies = metaData.getSupplies();
 if (supplies != null)
origin: org.jboss.microcontainer/jboss-kernel

protected AbstractConstructorMetaData createParametrizedMetaData(MethodInfo info, FactoryMethod annotation, BeanMetaData beanMetaData)
{
 AbstractConstructorMetaData constructor = new AbstractConstructorMetaData();
 constructor.setFactoryClass(beanMetaData.getBean());
 constructor.setFactoryMethod(info.getName());
 return constructor;
}
origin: org.jboss.microcontainer/jboss-kernel

  protected Object getName(BeanMetaData handle)
  {
   return handle.getName();
  }
}
org.jboss.beans.metadata.spiBeanMetaData

Javadoc

Metadata about a bean.

Most used methods

  • getName
    Get the name
  • getDepends
    Get what this bean depends.
  • getProperties
    Get the properties.
  • getSupplies
    Get what this bean supplies.
  • getAnnotations
    Get the annotations
  • getBean
    Get the bean.
  • getClassLoader
    Get the bean ClassLoader
  • getConstructor
    Get the constructor
  • getDemands
    Get what this bean demands.
  • setClassLoader
    Set the bean ClassLoader
  • clone
  • describeVisit
  • clone,
  • describeVisit,
  • getAccessMode,
  • getAliases,
  • getCreate,
  • getDestroy,
  • getErrorHandlingMode,
  • getInstalls,
  • getMode,
  • getRelated

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getContentResolver (Context)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • requestLocationUpdates (LocationManager)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Comparator (java.util)
    A Comparator is used to compare two objects to determine their ordering with respect to each other.
  • Vector (java.util)
    Vector is an implementation of List, backed by an array and synchronized. All optional operations in
  • Cipher (javax.crypto)
    This class provides access to implementations of cryptographic ciphers for encryption and decryption
  • Scheduler (org.quartz)
    This is the main interface of a Quartz Scheduler. A Scheduler maintains a registry of org.quartz.Job
  • Top plugins for Android Studio
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