jtadapter.java
来自「Java Pattern Oriented Framework (Jt) 是为了」· Java 代码 · 共 58 行
JAVA
58 行
package Jt;
/**
* Jt Implementation of the Adapter pattern.
*/
abstract public class JtAdapter extends JtObject {
public static final String JtCLASS_NAME = JtAdapter.class.getName();
private Object adaptee;
public JtAdapter() {
}
/**
* Specifies the adaptee.
*
* @param adaptee adaptee
*/
public void setAdaptee (Object adaptee) {
this.adaptee = adaptee;
}
/**
* Returns the adaptee.
*/
public Object getAdaptee () {
return (adaptee);
}
/**
* Demonstrates the messages processed by JtAdapter.
*/
public static void main(String[] args) {
JtFactory factory = new JtFactory ();
JtAdapter adapter;
// Create an instance of JtAdapter
adapter = (JtAdapter)
factory.createObject (JtAdapter.JtCLASS_NAME, "adapter");
factory.removeObject(adapter);
}
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?