Package org.jboss.beans.info.spi

Examples of org.jboss.beans.info.spi.BeanInfo.newInstance()


               throw new IllegalArgumentException("No class attribute for " + elementName);
           
            try
            {
               BeanInfo beanInfo = ConfigurationUtil.getBeanInfo(className);
               Object object = beanInfo.newInstance();
               holder.setValue(object);
            }
            catch (RuntimeException e)
            {
               throw e;
View Full Code Here


         throw new IllegalArgumentException("Javabean class must be set: " + annotation);

      try
      {
         BeanInfo beanInfo = configuration.getBeanInfo(className.getName(), null);
         return new AbstractValueMetaData(beanInfo.newInstance());
      }
      catch (Throwable t)
      {
         throw new IllegalArgumentException("Exception while creating javabean: " + t);
      }
View Full Code Here

      {

         TypeInfo typeInfo = JBossXBBuilder.configuration.getTypeInfo(type);
         BeanInfo adapterInfo = JBossXBBuilder.configuration.getBeanInfo(adapter);

         ValueAdapter valueAdapter = (ValueAdapter) adapterInfo.newInstance();

         QName qName = generateXmlName(typeInfo, XmlNsForm.QUALIFIED, overrideNamespace, overrideName);

         TypeInfo parentType = typeInfo.getTypeInfoFactory().getTypeInfo(String.class);
         TypeBinding parent = getSimpleType(parentType);
View Full Code Here

      BeanInfo beanInfo = JBossXBBuilder.configuration.getBeanInfo(typeInfo);
      BeanAdapterFactory beanAdapterFactory = null;
      try
      {
         BeanInfo beanAdapterBuilderInfo = JBossXBBuilder.configuration.getBeanInfo(beanAdapterBuilderClass);
         BeanAdapterBuilder beanAdapterBuilder = (BeanAdapterBuilder) beanAdapterBuilderInfo.newInstance();
         beanAdapterFactory = beanAdapterBuilder.newFactory(beanInfo, factory);
      }
      catch (Throwable t)
      {
         throw new RuntimeException("Error creating BeanAdapterFactory for " + beanAdapterBuilderClass.getName(), t);
View Full Code Here

               try
               {
                  // TODO this has to use its own adapter class and the factory method
                  BeanInfo propBeanAdapterBuilderInfo = JBossXBBuilder.configuration
                        .getBeanInfo(DefaultBeanAdapterBuilder.class);
                  BeanAdapterBuilder propBeanAdapterBuilder = (BeanAdapterBuilder) propBeanAdapterBuilderInfo
                        .newInstance();
                  propBeanAdapterFactory = propBeanAdapterBuilder.newFactory(propBeanInfo, null);
               }
               catch (Throwable t)
               {
View Full Code Here

         TypeInfo rcntType = configuration.getTypeInfo(RuntimeComponentNameTransformer.class);
         if (rcntType.isAssignableFrom(type))
         {
            BeanInfo beanInfo = configuration.getBeanInfo(type);
            RuntimeComponentNameTransformer newTransformer = (RuntimeComponentNameTransformer)beanInfo.newInstance();
            transformers.put(type, newTransformer);
            return newTransformer;
         }

         return null;
View Full Code Here

   protected Serializable createUnderlyingObject(ManagedObjectImpl managedObject, Class<? extends Serializable> clazz)
   {
      BeanInfo beanInfo = configuration.getBeanInfo(clazz);
      try
      {
         Object result = beanInfo.newInstance();
         return Serializable.class.cast(result);
      }
      catch (Throwable t)
      {
         throw new RuntimeException("Unable to create new object for " + managedObject + " clazz=" + clazz, t);
View Full Code Here

         TypeInfo rcntType = configuration.getTypeInfo(RuntimeComponentNameTransformer.class);
         if (rcntType.isAssignableFrom(type))
         {
            BeanInfo beanInfo = configuration.getBeanInfo(type);
            RuntimeComponentNameTransformer newTransformer = (RuntimeComponentNameTransformer)beanInfo.newInstance();
            transformers.put(type, newTransformer);
            return newTransformer;
         }

         return null;
View Full Code Here

/* 67 */       throw new IllegalArgumentException("Javabean class must be set: " + annotation);
/*    */     }
/*    */     try
/*    */     {
/* 71 */       BeanInfo beanInfo = configuration.getBeanInfo(className, null);
/* 72 */       return new AbstractValueMetaData(beanInfo.newInstance());
/*    */     }
/*    */     catch (Throwable t) {
/*    */     }
/* 76 */     throw new IllegalArgumentException("Exception while creating javabean: " + t);
/*    */   }
View Full Code Here

/*     */   protected static LazyInitializer createInitializer(KernelConfigurator configurator, String initializerClassName)
/*     */   {
/*     */     try
/*     */     {
/* 105 */       BeanInfo beanInfo = configurator.getBeanInfo(initializerClassName, LazyInitializer.class.getClassLoader());
/* 106 */       Object result = beanInfo.newInstance();
/* 107 */       return (LazyInitializer)LazyInitializer.class.cast(result);
/*     */     }
/*     */     catch (Throwable ignored)
/*     */     {
/*     */     }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.