Package org.jboss.reflect.spi

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


      // 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);
   }
View Full Code Here


      if (typeInfo != info && info != null)
      {
         Object typeValue = typeInfo.convertValue(getUnderlyingValue());
         return info.convertValue(typeValue, replace, trim);
      }
      return typeInfo.convertValue(getUnderlyingValue(), replace, trim);
   }

   protected Object getDefaultInstance()
   {
      return null;
View Full Code Here

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

      {
         if (clazz != null)
         {
            ClassLoader cl = Thread.currentThread().getContextClassLoader();
            TypeInfo info = typeInfoFactory.getTypeInfo(clazz, cl);
            return info.convertValue(alias, replace);
         }
         String aliasString = alias;
         if (replace)
         {
            aliasString = StringPropertyReplacer.replaceProperties(aliasString);
View Full Code Here

      if (typeInfo == null)
         typeInfo = info;
      if (typeInfo == null)
         throw new IllegalArgumentException("Unable to determine type for value: " + value);

      return typeInfo.convertValue(value);
   }

   public Class getType(MetaDataVisitor visitor, MetaDataVisitorNode previous) throws Throwable
   {
      if (getType() != null)
View Full Code Here

   private Object convertValue(PropertyInfo info, String override, Object value) throws Throwable
   {
      TypeInfo type = info.getType();
      if (override != null)
         type = typeInfoFactory.getTypeInfo(override, null);
      return type.convertValue(value);
   }
  
   public static class Holder
   {
      private Object object;
View Full Code Here

      TypeInfo type = property.getType();
      if (override != null)
         type = config.getTypeInfoFactory().getTypeInfo(override, null);

      return type != null ? type.convertValue(value) : value;
   }

}
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

      {
         // 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

         if (typeInfo != info && info != null)
         {
            Object typeValue = typeInfo.convertValue(getUnderlyingValue());
            return info.convertValue(typeValue, replace, trim);
         }
         return typeInfo.convertValue(getUnderlyingValue(), replace, trim);
      }
      finally
      {
         SecurityActions.resetContextClassLoader(oldCl);
      }
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.