Component Architecture

With Jep 3.0, a new component architecture was introduced. It allows pluggable components, giving tremendous flexibility for customizing Jep. A total of 9 components are employed, as shown below.

For each of the components you can either use a built-in implementation, or you can create your own implementation.

The roles of these components are:

A set of components can be bundled together in a ComponentSet and the Jep(ComponentSet cs) constructor used to create a Jep instance with a given set. Individual components can be set using jep.setComponent(JepComponent comp).

Built-in components

Jep comes with many components built-in. When creating a Jep instance using the default constructor, the StandardComponents set is loaded. The standard components include the StandardParser and the FastEvaluator. In addition to those, the ConfigurableParser and the RealEvaluator are also available. The following listing gives an overview of the components available in Jep 3.

StandardComponents (the default component set)
com.singularsys.jep.standard.StandardComponents

BigDecimalComponents (see Big Decimals)

Other components

Custom components

The architecture also allows for new custom components can be loaded. These should implement the appropriate interface or extend the appropriate class. Two methods are common to all components (see JepComponent):