diff options
Diffstat (limited to 'project/JavaCommon/src/com/modulus/dataread/expressions/StatementFactory.java')
| -rw-r--r-- | project/JavaCommon/src/com/modulus/dataread/expressions/StatementFactory.java | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/project/JavaCommon/src/com/modulus/dataread/expressions/StatementFactory.java b/project/JavaCommon/src/com/modulus/dataread/expressions/StatementFactory.java new file mode 100644 index 0000000..16da8aa --- /dev/null +++ b/project/JavaCommon/src/com/modulus/dataread/expressions/StatementFactory.java @@ -0,0 +1,28 @@ +package com.modulus.dataread.expressions; + +import java.util.Map; + +/** + * Interface describes how an object is supposed to + * generate statements. This class is to be used int tandem + * with the ExpressionParser interface to generate + * Statements of a specific type; + * + * @author jrahm + * + * @param <T> the type of statement this StatementFactory creates + */ +public interface StatementFactory<T extends Statement> { + + /** + * Creates a new statement with the type <code>T</code> based + * on what the parameters contain. + * + * The parameters contain useful information about where the parser + * currently is and how to create the new statement. + * + * @param params the parameters + * @return a new statement of type <code>T</code> based off of the parameters. + */ + T generateStatement(Map<String, Object> params); +} |