Package com.ancientprogramming.fixedformat4j.format

Examples of com.ancientprogramming.fixedformat4j.format.FixedFormatter.format()


    return formatter.parse(value, instructions);
  }

  public String format(Object value, FormatInstructions instructions) {
    FixedFormatter formatter = actualFormatter(context.getDataType());
    return formatter.format(value, instructions);
  }

  public FixedFormatter actualFormatter(final Class<? extends Object> dataType) {
    Class<? extends FixedFormatter> formatterClass = KNOWN_FORMATTERS.get(dataType);
View Full Code Here


    try {
      valueObject = method.invoke(fixedFormatRecord);
    } catch (Exception e) {
      throw new FixedFormatException(format("could not invoke method %s.%s(%s)", fixedFormatRecord.getClass().getName(), method.getName(), datatype), e);
    }
    result = formatter.format(valueObject, formatdata);
    if (LOG.isDebugEnabled()) {
      LOG.debug(format("exported %s ", result));
    }
    return result;
  }
View Full Code Here

    return formatter.parse(value, instructions);
  }

  public String format(Object value, FormatInstructions instructions) {
    FixedFormatter formatter = actualFormatter(context.getDataType());
    return formatter.format(value, instructions);
  }

  public FixedFormatter actualFormatter(final Class<? extends Object> dataType) {
    Class<? extends FixedFormatter> formatterClass = KNOWN_FORMATTERS.get(dataType);
View Full Code Here

    try {
      valueObject = method.invoke(fixedFormatRecord);
    } catch (Exception e) {
      throw new FixedFormatException(format("could not invoke method %s.%s(%s)", fixedFormatRecord.getClass().getName(), method.getName(), datatype), e);
    }
    result = formatter.format(valueObject, formatdata);
    if (LOG.isDebugEnabled()) {
      LOG.debug(format("exported %s ", result));
    }
    return result;
  }
View Full Code Here

    return formatter.parse(value, instructions);
  }

  public String format(Object value, FormatInstructions instructions) {
    FixedFormatter formatter = actualFormatter(context.getDataType());
    return formatter.format(value, instructions);
  }

  public FixedFormatter actualFormatter(final Class<? extends Object> dataType) {
    Class<? extends FixedFormatter> formatterClass = KNOWN_FORMATTERS.get(dataType);
View Full Code Here

    try {
      valueObject = method.invoke(fixedFormatRecord);
    } catch (Exception e) {
      throw new FixedFormatException(format("could not invoke method %s.%s(%s)", fixedFormatRecord.getClass().getName(), method.getName(), datatype), e);
    }
    result = formatter.format(valueObject, formatdata);
    if (LOG.isDebugEnabled()) {
      LOG.debug(format("exported %s ", result));
    }
    return result;
  }
View Full Code Here

  public String format(Object value, FormatInstructions instructions) {
    FixedFormatter formatter = actualFormatter(context.getDataType());
    FixedFormatUtil.assertIsPatternRequired(instructions, context, formatter);
    FixedFormatUtil.assertIsBooleanRequired(instructions, context, formatter);
    FixedFormatUtil.assertIsDecimalRequired(instructions, context, formatter);
    return formatter.format(value, instructions);
  }

  /**
   * In general the by type formatter doesn't require a pattern annotation, but will ask the actual formatter
   * if it requires a pattern or not.
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.