`

23-Interpreter

阅读更多

     If the application user needs greater run time flexibility, for example to create scripts describing the desired behavior of the system, you can use the Interpreter design pattern. Here, you create and embed a language interpreter into your program.

     ......

     的确,Intepreter设计模式的应用比较高级,这在实际应用是重要的,但是不是普遍的,主要还是应用其功能。正如教材中叙述:For solving Java problems, we will look at a special version of Python called Jython. This is generated entirely in Java byte codes, so incorporating it into your application is quite simple,  and it’s as portable as Java is. It has an extremely clean interface with Java: Java can call Python classes, and Python can call Java classes.(cross language boundaries )

     作为设计模式了解一下还是挺好的,这个一个解释例子 ,很不错,教材中详细解释也挺好的!

分享到:
评论

相关推荐

    untitled-relational-interpreter-book:miniKanren中的关系编程

    更新(02015年6月14日): 我已经多次更改了书/存储库的名称,所以现在我仅将存储库称为“ untitled-relational-interpreter-book”。 这本书的工作名称是: 与关系翻译一起玩我希望我能捕捉到与关系翻译一起玩的...

    Interpreter模式

    23种设计模式的java实现之Interpreter,代码实现

    C++ Interpreter模式

    23种设计模式之二十三(行为模式)Interpreter模式

    java版本二十三种设计模式.zip

    - 23种设计模式 - 工厂方法模式(Factory Method) - 抽象工厂模式(Abstract Factory) - 单例模式(Singleton) - 建造者模式(Builder) - 原型模式(Prototype) - 代理模式(Proxy) - 适配器模式(Adapter) - 装饰...

    设计模式精解-GoF 23种设计模式解析附C++实现源码

    写完了Interpreter模式之后,我习惯性的看看下一天的安排,却陡然发现GoF的23个设计模式的解析已经在我不经意间写完了。就像在一年前看GoF的《设计模式》一书,和半年前用C++模拟、实现23种经典的设计模式一般,透过...

    23种设计模式 - 各种模式的学习

    13. Interpreter(解释器) 14. Template Method(模板方法) 15. Chain of Responsibility(责任链) 16. Command(命令) 17. Iterator(迭代器) 18. Mediator(中介者) 19. Memento(备忘录) 20. ...

    设计模式精解-GoF 23种设计模式解析

    设计模式精解-GoF 23 种设计模式解析附 C++实现源码 目 录 引 言 0.1 设计模式解析(总序) 0.2 设计模式解析后记 0.3 与作者联系 1 创建型模式 1.1 Factory模式 1.2 AbstactFactory模式 1.3 Singleton...

    acpi控制笔记本风扇转速

    executing AcpiWalkNamespace and the AML interpreter. This condition was removed by modifying AcpiWalkNamespace to (by default) ignore all temporary namespace entries created during any concurrent ...

    23种Python设计模式示例演示源码包.rar

    23种Python设计模式示例...Interpreter解释器模式,Iterator迭代器模式,Mediator中介者模式、Singleton光身汉模式,Observer观察者模式等,一共23种,这里不一一列举了,每一种模式代码,都包括了中文注解,利于学习。

    SimIt-ARM-3.0 ARM指令模拟器

    ema An ARM interpreter. To test the installation was successful type ./build/bin/ema test/wc configure modifiy PATH environment variable: PATH=$PATH:$HOME/SimIt-ARM-3.0-gk/build/bin ; export PATH 2...

    python-2.5.4

    We are pleased to announce the release of Python 2.5.4 (final), a bugfix release of Python 2.5, on December 23rd, 2008. This is the last bugfix release of Python 2.5. Python 2.5 is now in bugfix-only...

    设计模式(23种)与设计原则(6种)

    15)解析器模式(Interpreter) 16)迭代器模式(Iterator) 17)中介模式(Mediator) 18)备忘录模式(Memento) 19)观察者模式(Observer) 20)状态模式(State) 21)策略模式(Strategy) 22)模版模式...

    设计模式精解-GoF 23种设计模式解析附C++实现源码.pdf

    3.11 Interpreter模式..............................................................................................................100 4 说明..............................................................

    java之23种设计模式

    13. Interpreter(解释器) 14. Template Method(模板方法) 15. Chain of Responsibility(责任链) 16. Command(命令) 17. Iterator(迭代器) 18. Mediator(中介者) 19. Memento(备忘录) 20. Observer...

    用Java实现23种设计模式

    用Java实现23种设计模式 1. 创建型模式 工厂模式(Factory Pattern) 抽象工厂模式(Abstract Factory Pattern) 单例模式(Singleton Pattern) 建造者模式(Builder Pattern) 原型模式(Prototype Pattern)...

    设计模式精解(GoF 23种设计解析附C++实现源码)

    1.5 Prototype模式...................................................................................................................23 2 结构型模式........................................................

    23种java版设计模式源码案例.zip

    23种java版设计模式源码案例.zip 0.目录 创建型模式(creational) 简单工厂(simplefactory) 动态工厂(dynamic) 抽象工厂(abstract) 单例模式(singleton) 建造者模式(builder) 原型模式(prototype) 结构型模式...

    head first 设计模式

    《Head First设计模式》(中文版)共有14章,每章都介绍了几个设计模式,完整地涵盖了四人组版本全部23个设计模式。前言先介绍这本书的用法;第1章到第11章陆续介绍的设计模式为Strategy、Observer、Decorator、...

    设计模式精解-GoF 23 种设计模式解析附 C++实现源码.rar

    设计模式精解-GoF 23 种设计模式解析附 C++实现源码 目 录 0 引言 ............................................................................................................................................

    C#设计模式(23种设计模式)

    创建型: 1. 单件模式(Singleton Pattern) 2. 抽象工厂(Abstract Factory) 3.... 4.... 5.... 6.... 7.... 8.... 9.... 10.... 11.... 12.... 13.... 14.... 15.... 16.... 17. 解释器模式(Interpreter ... 23. 状态模式(State Pattern) @Author kwming

Global site tag (gtag.js) - Google Analytics