Package com.blackrook.archetext
Class ArcheTextFactory
- java.lang.Object
-
- com.blackrook.archetext.ArcheTextFactory
-
public final class ArcheTextFactory extends Object
Factory class for generatingArcheTextObject
s.- Author:
- Matthew Tropiano
-
-
Constructor Summary
Constructors Constructor Description ArcheTextFactory()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T> ArcheTextObject
create(String type, String name, T value)
Creates a new ArcheTextObject using a POJO (Plain Ol' Java Object) or Map type.static <T> ArcheTextObject
create(String type, T value)
Creates a new default ArcheTextObject using a POJO (Plain Ol' Java Object) or Map type.static <T> ArcheTextObject
create(T value)
Creates a new anonymous ArcheTextObject using a POJO (Plain Ol' Java Object) or Map type.
-
-
-
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.
-
-