1 29 30 package com.caucho.quercus.lib.dom; 31 32 import com.caucho.quercus.env.Env; 33 34 public class DOMWrapper<T> { 35 private final DOMImplementation _impl; 36 final T _delegate; 37 38 protected static DOMImplementation getImpl(Env env) 39 { 40 return DOMImplementation.get(env); 41 } 42 43 public DOMWrapper(DOMImplementation impl, T delegate) 44 { 45 _impl = impl; 46 _delegate = delegate; 47 } 48 49 protected DOMImplementation getImpl() 50 { 51 return _impl; 52 } 53 54 protected <T> T wrap(Object obj) 55 { 56 return (T) _impl.getWrapper(obj); 57 } 58 59 protected DOMException wrap(org.w3c.dom.DOMException ex) 60 { 61 return (DOMException) _impl.getWrapper(ex); 62 } 63 64 } 65 | Popular Tags |