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);
      }
      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

      {
         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

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

   }
  
   public void testCustomValueOf() throws Throwable
   {
      TypeInfo info = getTypeInfoFactory().getTypeInfo(CustomValueOf.class);
      Object value = info.convertValue("1234");
      assertNotNull(value);
      assertInstanceOf(value, CustomValueOf.class);
      assertEquals("1234", ((CustomValueOf)value).getString());
   }
View Full Code Here

      assertTrue(PrimitiveInfo.class.isAssignableFrom(type.getClass()));
      assertTrue((type).getName().equals(name));
      Object obj;
      try
      {
         obj = type.convertValue(val.getValue());
      }
      catch (Throwable e)
      {
         throw new RuntimeException(e);
      }
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

      {
         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

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.