Skip to Main Content
Design Patterns and Best Practices in Java
book

Design Patterns and Best Practices in Java

by Kamalmeet Singh, Adrian Ianculescu, Lucian-Paul Torje
June 2018
Intermediate to advanced content levelIntermediate to advanced
280 pages
7h 46m
English
Packt Publishing
Content preview from Design Patterns and Best Practices in Java

Implementation

The interpreter pattern uses the composite pattern to define the internal representation of the object structure. In addition to that, it adds the implementation to interpret an expression and to convert it to the internal structure. For this reason, the interpreter pattern falls within the behavioral patterns category. The class diagram is as follows:

The interpreter pattern is composed of the following classes:

  • Context: This is used to encapsulate the information that is global to the interpreter and needs to be accessed by all concrete interpreters.
  • AbstractExpression: An abstract class or interface that declares the interpret ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Practical Design Patterns for Java Developers

Practical Design Patterns for Java Developers

Miroslav Wengner
Java Design Patterns

Java Design Patterns

Vaskaran Sarcar

Publisher Resources

ISBN: 9781786463593Supplemental Content