Created
December 23, 2012 05:04
-
-
Save danveloper/4362087 to your computer and use it in GitHub Desktop.
Rules engine factory example for rules engine post
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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