|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.whicken.werecat.RuleFactory
public class RuleFactory
Helper class for instantiating a RuleEngine. Subclass to provide appropriate hooks for expression parser.
Field Summary | |
---|---|
protected java.lang.Class |
context
|
protected java.util.Map<java.lang.String,java.lang.Class> |
importedClasses
|
protected java.util.List<java.lang.String> |
importedPackages
|
Constructor Summary | |
---|---|
RuleFactory(java.lang.Class context)
|
Method Summary | |
---|---|
void |
addImport(java.lang.Class c)
Make the given class accessible by simple name. |
void |
addImport(java.lang.String path)
Make the given classes accessible by simple name. |
com.whicken.werecat.expr.Expression |
createCompoundExpression(com.whicken.werecat.expr.Expression lhs,
java.lang.Object rhs)
|
com.whicken.werecat.expr.Expression |
createField(java.lang.String key)
Override this is you want something different than reflection. |
com.whicken.werecat.expr.Expression |
createMethod(java.lang.String method,
java.util.List<com.whicken.werecat.expr.Expression> args)
Override this is you want something different than reflection. |
protected java.lang.Class |
getClass(java.lang.String name)
|
static java.lang.reflect.Method |
getMethod(java.lang.Class context,
java.lang.String method,
java.util.List<com.whicken.werecat.expr.Expression> args)
Requires the method to be public |
protected java.lang.reflect.Method |
getMethod(java.lang.String method,
java.util.List<com.whicken.werecat.expr.Expression> args)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.lang.Class context
protected java.util.Map<java.lang.String,java.lang.Class> importedClasses
protected java.util.List<java.lang.String> importedPackages
Constructor Detail |
---|
public RuleFactory(java.lang.Class context)
Method Detail |
---|
public void addImport(java.lang.String path)
public void addImport(java.lang.Class c)
protected java.lang.Class getClass(java.lang.String name)
public static java.lang.reflect.Method getMethod(java.lang.Class context, java.lang.String method, java.util.List<com.whicken.werecat.expr.Expression> args)
protected java.lang.reflect.Method getMethod(java.lang.String method, java.util.List<com.whicken.werecat.expr.Expression> args)
public com.whicken.werecat.expr.Expression createField(java.lang.String key)
public com.whicken.werecat.expr.Expression createMethod(java.lang.String method, java.util.List<com.whicken.werecat.expr.Expression> args)
public com.whicken.werecat.expr.Expression createCompoundExpression(com.whicken.werecat.expr.Expression lhs, java.lang.Object rhs)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |