Skip to content

Instantly share code, notes, and snippets.

@danveloper
Created December 23, 2012 05:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save danveloper/4362087 to your computer and use it in GitHub Desktop.
Save danveloper/4362087 to your computer and use it in GitHub Desktop.
Rules engine factory example for rules engine post
class RulesEngineFactory<E extends RulesEngine> {
private final E engine
public RulesEngineFactory(final Class<E> c) {
this.engine = (E)c.newInstance()
this.engine.engine = this.engine
}
def getObject(final def obj) {
this.engine.obj = obj
this.engine
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment