Class AbstractStandardEvaluator

java.lang.Object
org.scijava.parsington.eval.AbstractEvaluator
org.scijava.parsington.eval.AbstractStandardEvaluator
All Implemented Interfaces:
Evaluator, StandardEvaluator
Direct Known Subclasses:
DefaultStackEvaluator, DefaultTreeEvaluator

public abstract class AbstractStandardEvaluator extends AbstractEvaluator implements StandardEvaluator
Base class for StandardEvaluator implementations on common built-in types: Booleans, Strings and Numbers.

This class is a big bag of case logic for various operators and types. Looking at it, you might think: "It sure would be nice to modularize this, with each operation in its own class, with properly declared types, and called dynamically at runtime as appropriate."

"Great idea!" I would reply. Then I would suggest you have a look at the SciJava Ops and ImageJ Ops projects, which do exactly that in an extensible way.

Or maybe you are thinking: "This can't possibly work as well as awesome JVM-based scripting languages like Jython and Groovy..."

To which I would reply: "You are absolutely right! This class is mostly just a demonstration of an extensible, working evaluator built using the org.scijava.parsington.eval package. If your use case is only concerned with feature-rich evaluation of standard types, then building on top of a scripting language might make more sense."

Author:
Curtis Rueden