Package nexj.core.meta

Examples of nexj.core.meta.Type.convert()


                        convertedList.add(((Primitive)type).getConverter(primitive).invoke(original));
                     }
                  }
                  else
                  {
                     convertedList.add(type.convert(original));
                  }
               }

               return (convertedList != null) ? convertedList : list;
            }
View Full Code Here


               list = new InstanceArrayList(Pair.length(pair));

               do
               {
                  list.add(type.convert(pair.getHead()));
                  pair = pair.getNext();
               }
               while (pair != null);

               return list;
View Full Code Here

               throw new TypeConversionException(type);
            }

            for (int i = 0, n = list.getCount(); i < n; ++i)
            {
               type.convert(list.get(i));
            }

            return list;
         }
      }
View Full Code Here

            return list;
         }
      }

      return type.convert(value);
   }

   /**
    * Converts a calculated value and assigns reverse association attributes.
    * @param attribute The instance attribute.
View Full Code Here

      // Primitive types know how to convert from String
      if (type instanceof Primitive && type != Primitive.ANY)
      {
         if (!arg.isCollection())
         {
            return type.convert(getParameter(arg.getName()));
         }

         String[] sValueArray = getParameters(arg.getName()); // get all values of collection

         if (sValueArray == null)
View Full Code Here

         Object[] valueArray = new Object[sValueArray.length];

         for (int i = 0; i < valueArray.length; ++i)
         {
            valueArray[i] = type.convert(sValueArray[i]);
         }

         return valueArray;
      }
      else if (type instanceof Metaclass) // Metaclass types use OID to pass instance
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.