Package org.salamandra.o2

Examples of org.salamandra.o2.Marshaller


    super(object, trxo);
  }

  @Override
  public void marshal(Node node) throws Exception {
    new Marshaller().marshal( getBean() , node);
  }
View Full Code Here


            BigDecimal number = (BigDecimal) value;
            number = number.setScale(SCALE, BigDecimal.ROUND_HALF_UP);
            string = formatter.format(number.doubleValue());
        }
        catch (IllegalArgumentException e) {
            throw new FormatException(FORMAT_MSG + value, e);
        }
        catch (ClassCastException e) {
            throw new FormatException(FORMAT_MSG + value, e);
        }
       
        return removeSymbol(string);
    }
View Full Code Here

  protected FormatterProperty<Annotation, Object> createFormatter(Annotation[] annotations) {
    try {
      for (Annotation annotation : annotations) {
        AFormatter formatterClass = annotation.annotationType().getAnnotation( AFormatter.class );
        if ( formatterClass != null ) {
          FormatterProperty beanFormatter = formatterClass.value().newInstance();
          beanFormatter.initialize( annotation );
         
          return beanFormatter;
        }
      }
    }
View Full Code Here

  @SuppressWarnings("unchecked")
  protected FormatterProperty<Annotation, Object> createFormatter(Annotation[] annotations) {
    try {
      for (Annotation annotation : annotations) {
        AFormatter formatterClass = annotation.annotationType().getAnnotation( AFormatter.class );
        if ( formatterClass != null ) {
          FormatterProperty beanFormatter = formatterClass.value().newInstance();
          beanFormatter.initialize( annotation );
         
          return beanFormatter;
        }
      }
View Full Code Here

    Node aNode = document.createElement(arrTypeInfo.getFieldName());
   
    Iterator<ITypeInfo<?,?>> iter = arrTypeInfo.getTypeInfoIterator();
    while (iter.hasNext()) {
      ITypeInfo typeInfo = (ITypeInfo) iter.next();
      if(typeInfo!=null) {
        if (typeInfo instanceof IArrayTypeInfo) {
          perform((IArrayTypeInfo) typeInfo, aNode);
        } else {
          perform((ITypeInfo) typeInfo, aNode);
View Full Code Here

          } catch (Exception e) {
            e.printStackTrace();
          }
        }
       
        ITypeInfo typeInfo = (ITypeInfo) getTypeInfo(value, descriptor.getName());
       
        return typeInfo;
       }

      public void remove() {
View Full Code Here

TOP

Related Classes of org.salamandra.o2.Marshaller

Copyright © 2018 www.massapicom. 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.