Class ArcheTextFactory


  • public final class ArcheTextFactory
    extends Object
    Factory class for generating ArcheTextObjects.
    Author:
    Matthew Tropiano
    • Constructor Detail

      • ArcheTextFactory

        public ArcheTextFactory()
    • Method Detail

      • create

        public static <T> ArcheTextObject create​(T value)
        Creates a new anonymous ArcheTextObject using a POJO (Plain Ol' Java Object) or Map type. Primitives, boxed primitives, Sets, and Arrays are not acceptable.
        Type Parameters:
        T - the input object type.
        Parameters:
        value - the object value to convert.
        Returns:
        a new ArcheText object that represents the input object.
        Throws:
        IllegalArgumentException - if value is not a POJO nor map.
      • create

        public static <T> ArcheTextObject create​(String type,
                                                 T value)
        Creates a new default ArcheTextObject using a POJO (Plain Ol' Java Object) or Map type. Primitives, boxed primitives, Sets, and Arrays are not acceptable.
        Type Parameters:
        T - the input object type.
        Parameters:
        type - the object type.
        value - the object value to convert.
        Returns:
        a new ArcheText object that represents the input object.
        Throws:
        IllegalArgumentException - if value is not a POJO nor map.
      • create

        public static <T> ArcheTextObject create​(String type,
                                                 String name,
                                                 T value)
        Creates a new ArcheTextObject using a POJO (Plain Ol' Java Object) or Map type. Primitives, boxed primitives, Sets, and Arrays are not acceptable.
        Type Parameters:
        T - the input object type.
        Parameters:
        type - the object type.
        name - the object name.
        value - the object value to convert.
        Returns:
        a new ArcheText object that represents the input object.
        Throws:
        IllegalArgumentException - if value is not a POJO nor map.