Package org.jboss.beans.info.spi

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


/*     */
/*     */   static Object newInstance(String className, String[] params, Object[] args)
/*     */     throws Throwable
/*     */   {
/*  85 */     BeanInfo info = getBeanInfo(className);
/*  86 */     return info.newInstance(params, args);
/*     */   }
/*     */
/*     */   static Object convertValue(Object parent, String name, String override, Object value)
/*     */     throws Throwable
/*     */   {
View Full Code Here


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

/*      */     try
/*      */     {
/*  560 */       TypeInfo typeInfo = JBossXBBuilder.configuration.getTypeInfo(type);
/*  561 */       BeanInfo adapterInfo = JBossXBBuilder.configuration.getBeanInfo(adapter);
/*      */
/*  563 */       ValueAdapter valueAdapter = (ValueAdapter)adapterInfo.newInstance();
/*      */
/*  565 */       QName qName = generateXmlName(typeInfo, XmlNsForm.QUALIFIED, overrideNamespace, overrideName);
/*      */
/*  567 */       TypeInfo parentType = typeInfo.getTypeInfoFactory().getTypeInfo(String.class);
/*  568 */       TypeBinding parent = getSimpleType(parentType);
View Full Code Here

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

/* 1289 */           BeanAdapterFactory propBeanAdapterFactory = null;
/*      */           try
/*      */           {
/* 1293 */             BeanInfo propBeanAdapterBuilderInfo = JBossXBBuilder.configuration.getBeanInfo(DefaultBeanAdapterBuilder.class);
/*      */
/* 1295 */             BeanAdapterBuilder propBeanAdapterBuilder = (BeanAdapterBuilder)propBeanAdapterBuilderInfo.newInstance();
/*      */
/* 1297 */             propBeanAdapterFactory = propBeanAdapterBuilder.newFactory(propBeanInfo, null);
/*      */           }
/*      */           catch (Throwable t)
/*      */           {
View Full Code Here

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

/*     */       }
/* 907 */       TypeInfo rcntType = configuration.getTypeInfo(RuntimeComponentNameTransformer.class);
/* 908 */       if (rcntType.isAssignableFrom(type))
/*     */       {
/* 910 */         BeanInfo beanInfo = configuration.getBeanInfo(type);
/* 911 */         RuntimeComponentNameTransformer newTransformer = (RuntimeComponentNameTransformer)beanInfo.newInstance();
/* 912 */         this.transformers.put(type, newTransformer);
/* 913 */         return newTransformer;
/*     */       }
/*     */
/* 916 */       return null;
View Full Code Here

      Class<? extends ValueAdapter> adapter = annotation.valueAdapter();
      try
      {
         BeanInfo adapterInfo = JBossXBBuilder.configuration.getBeanInfo(adapter);

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

         adaptedType.setValueAdapter(valueAdapter);
         if (trace)
            log.trace("adapted typeBinding=" + adaptedType + " adapter=" + adapter.getName());
      }
View Full Code Here

   private BeanAdapterFactory createAdapterFactory(Class<? extends BeanAdapterBuilder> beanAdapterBuilderClass, BeanInfo beanInfo, MethodInfo factory)
   {
      try
      {
         BeanInfo adapterBuilderInfo = JBossXBBuilder.configuration.getBeanInfo(beanAdapterBuilderClass);
         BeanAdapterBuilder adapterBuilder = (BeanAdapterBuilder) adapterBuilderInfo.newInstance();
         return adapterBuilder.newFactory(beanInfo, factory);
      }
      catch (Throwable t)
      {
         throw new RuntimeException("Error creating BeanAdapterFactory for "
View Full Code Here

   static Object newInstance(String className, String[] params, Object[] args)
      throws Throwable
   {
      BeanInfo info = getBeanInfo(className);
      return info.newInstance(params, args);
   }

   /**
    * Convert a value
    *
 
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.