01: package org.python.core.adapter;
02:
03: public abstract class ClassAdapter implements PyObjectAdapter {
04:
05: public ClassAdapter(Class adaptedClass) {
06: this .adaptedClass = adaptedClass;
07: }
08:
09: public Class getAdaptedClass() {
10: return adaptedClass;
11: }
12:
13: public boolean canAdapt(Object o) {
14: return adaptedClass.getClass().equals(adaptedClass);
15: }
16:
17: private Class adaptedClass;
18:
19: }
|