Class Codes

java.lang.Object
com.fourjs.report.facturx.Codes

public class Codes extends Object
Holds the code lists whose entries are values of the Code data type described in section 7.1.5, "Data types", of the Factur-X specification: a code value accompanied by the identification of the list it is taken from. Each code list is exposed as a nested enum whose constants are the permitted code values; depending on the list, a constant carries its code together with a human-readable name and description, reachable through accessors such as getCode(), getName() and getDescription(), and every list converts to and from its string form with toString() and fromString(String).

fromString(String) rejects a value that is not part of the list with an IllegalArgumentException, unless the facturx.laxenums system property is set to true: it then accepts the unknown value into a spare custom entry and continues, which is useful when a document carries a code the list does not yet contain.

  • Constructor Details

    • Codes

      public Codes()
  • Method Details

    • getClassForBT

      public static Class getClassForBT(String bt)