Class ExpressionFactories
java.lang.Object
org.projog.core.predicate.builtin.clp.ExpressionFactories
Maintains a collection of
ExpressionFactory instances.
This class provides a mechanism for "plugging in" or "injecting" implementations of org.projog.clp.Expression
at runtime. This mechanism provides an easy way to configure and extend the CLP expressions supported by Projog.
Each KnowledgeBase has at most one unique ClpExpressions instance.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddExpressionFactory(PredicateKey key, String operatorClassName) Associates aExpressionFactorywith thisKnowledgeBase.org.projog.clp.ExpressiontoExpression(Term t, Set<org.projog.core.predicate.builtin.clp.ClpVariable> vars)
-
Constructor Details
-
ExpressionFactories
-
-
Method Details
-
addExpressionFactory
Associates aExpressionFactorywith thisKnowledgeBase.- Parameters:
key- The name and arity to associate theExpressionFactorywith.operatorClassName- The class name of theExpressionFactoryto be associated withkey.- Throws:
ProjogException- if there is already aExpressionFactoryassociated with thePredicateKey
-
toExpression
-