Package org.jboss.reflect.spi

Examples of org.jboss.reflect.spi.TypeInfo.convertValue()


         for (PropertyInfo pi : propertys)
         {
            TypeInfo info = pi.getType();
            if (info != null && info.isInstance(value))
            {
               pi.set(bean, info.convertValue(value));
               return;
            }
         }
      }
      throw new IllegalArgumentException("Unable to determine setter on " + bean + " for property " + name + " with value " + value);
View Full Code Here


      if (trace)
         log.trace("QName " + qName + " handle " + BuilderUtil.toDebugString(value) + " to " + BuilderUtil.toDebugString(owner));
      try
      {
         TypeInfo typeInfo = propertyInfo.getType();
         value = typeInfo.convertValue(value, false);
         if (beanInfo != null)
         {
            ClassInfo classInfo = beanInfo.getClassInfo();
            TypeInfo valueType = classInfo.getTypeInfoFactory().getTypeInfo(value.getClass());
            if (classInfo.isAssignableFrom(valueType) == false)
View Full Code Here

/*  98 */       throw new IllegalArgumentException("Unable to determine type for value: " + getUnderlyingValue());
/*     */     }
/*     */
/* 102 */     if ((typeInfo != info) && (info != null))
/*     */     {
/* 104 */       Object typeValue = typeInfo.convertValue(getUnderlyingValue());
/* 105 */       return info.convertValue(typeValue, this.replace, this.trim);
/*     */     }
/* 107 */     return typeInfo.convertValue(getUnderlyingValue(), this.replace, this.trim);
/*     */   }
/*     */
View Full Code Here

/* 102 */     if ((typeInfo != info) && (info != null))
/*     */     {
/* 104 */       Object typeValue = typeInfo.convertValue(getUnderlyingValue());
/* 105 */       return info.convertValue(typeValue, this.replace, this.trim);
/*     */     }
/* 107 */     return typeInfo.convertValue(getUnderlyingValue(), this.replace, this.trim);
/*     */   }
/*     */
/*     */   protected Object getDefaultInstance()
/*     */   {
/* 112 */     return null;
View Full Code Here

/*     */     }
/* 114 */     TypeInfo type = property.getType();
/* 115 */     if (override != null) {
/* 116 */       type = config.getTypeInfoFactory().getTypeInfo(override, null);
/*     */     }
/* 118 */     return type != null ? type.convertValue(value) : value;
/*     */   }
/*     */ }

/* Location:           /home/mnovotny/projects/EMBEDDED_JBOSS_BETA3_COMMUNITY/embedded/output/lib/embedded-jboss/lib/jboss-embedded-all.jar
* Qualified Name:     org.jboss.javabean.plugins.xml.ConfigurationUtil
View Full Code Here

/* 105 */     if (this.trace)
/* 106 */       this.log.trace("QName " + qName + " handle " + BuilderUtil.toDebugString(value) + " to " + BuilderUtil.toDebugString(owner));
/*     */     try
/*     */     {
/* 109 */       TypeInfo typeInfo = this.propertyInfo.getType();
/* 110 */       value = typeInfo.convertValue(value, false);
/* 111 */       if (this.beanInfo != null)
/*     */       {
/* 113 */         ClassInfo classInfo = this.beanInfo.getClassInfo();
/* 114 */         TypeInfo valueType = classInfo.getTypeInfoFactory().getTypeInfo(value.getClass());
/* 115 */         if (!classInfo.isAssignableFrom(valueType))
View Full Code Here

/*     */     {
/*  95 */       if (this.clazz != null)
/*     */       {
/*  97 */         ClassLoader cl = Thread.currentThread().getContextClassLoader();
/*  98 */         TypeInfo info = typeInfoFactory.getTypeInfo(this.clazz, cl);
/*  99 */         return info.convertValue(this.alias, this.replace);
/*     */       }
/* 101 */       String aliasString = this.alias;
/* 102 */       if (this.replace)
/*     */       {
/* 104 */         aliasString = StringPropertyReplacer.replaceProperties(aliasString);
View Full Code Here

                  PropertyInfo propertyInfo = beanInfo.getProperty(property.getName());
                  TypeInfo typeInfo = propertyInfo.getType();
                  String type = property.getType();
                  if (type != null)
                     typeInfo = configuration.getTypeInfo(type, cl);
                  value = typeInfo.convertValue(value, false);
                  propertyInfo.set(result, value);
               }
            }
         }
View Full Code Here

         {
            TypeInfo parameterType = paramTypes[i];
            String type = parameter.getType();
            if (type != null)
               parameterType = parameterType.getTypeInfoFactory().getTypeInfo(type, null);
            params[i] = parameterType.convertValue(value, false);
         }
         catch (Throwable t)
         {
            throw new RuntimeException("Error converting parameter #" + i + " value=" + value + " to type " + paramTypes[i]);
         }
View Full Code Here

      {
         // we convert it with more precise type
         // and then check for progression, ...
         if (typeInfo != info && info != null)
         {
            Object typeValue = typeInfo.convertValue(getUnderlyingValue());
            return info.convertValue(typeValue, replace, trim);
         }
         return typeInfo.convertValue(getUnderlyingValue(), replace, trim);
      }
      finally
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.