コード例 #1
0
    def do_unload(self, pkg):
        for n in pkg.__dict__.keys():
            e = pkg.__dict__[n]
            if isinstance(e, PyJavaClass):
                if _is_lazy(e): continue
                if e.classLoader is self.loader:
                    del pkg.__dict__[n]
                    if pkg.__name__:
                        n = self.ls_name + '.' + pkg.__name__ + '.' + n
                    else:
                        n = self.ls_name + '.' + n
                    if sys.modules.has_key(n): del sys.modules[n]

            elif isinstance(e, PyJavaPackage):
                self.do_unload(e)
コード例 #2
0
ファイル: jreload.py プロジェクト: AngusGeek/org.aspectj
    def do_unload(self, pkg):
        for n in pkg.__dict__.keys():
            e = pkg.__dict__[n]
            if isinstance(e, PyJavaClass):
                if _is_lazy(e):
                    continue
                if e.classLoader is self.loader:
                    del pkg.__dict__[n]
                    if pkg.__name__:
                        n = self.ls_name + "." + pkg.__name__ + "." + n
                    else:
                        n = self.ls_name + "." + n
                    if sys.modules.has_key(n):
                        del sys.modules[n]

            elif isinstance(e, PyJavaPackage):
                self.do_unload(e)
コード例 #3
0
def _do_reload(ls_name, mgr, pkg):
    pkg_name = pkg.__name__
    for n in pkg.__dict__.keys():
        e = pkg.__dict__[n]
        if isinstance(e, PyJavaClass):
            if _is_lazy(e): continue
            del pkg.__dict__[n]
            try:
                c = mgr.findClass(pkg_name, n)
                if c:
                    pkg.__dict__[n] = c
                    if pkg_name:
                        n = ls_name + '.' + pkg_name + '.' + n
                    else:
                        n = ls_name + '.' + n
                    if sys.modules.has_key(n): sys.modules[n] = c
            except:
                pass
        elif isinstance(e, PyJavaPackage):
            _do_reload(ls_name, mgr, e)
コード例 #4
0
ファイル: jreload.py プロジェクト: AngusGeek/org.aspectj
def _do_reload(ls_name, mgr, pkg):
    pkg_name = pkg.__name__
    for n in pkg.__dict__.keys():
        e = pkg.__dict__[n]
        if isinstance(e, PyJavaClass):
            if _is_lazy(e):
                continue
            del pkg.__dict__[n]
            try:
                c = mgr.findClass(pkg_name, n)
                if c:
                    pkg.__dict__[n] = c
                    if pkg_name:
                        n = ls_name + "." + pkg_name + "." + n
                    else:
                        n = ls_name + "." + n
                    if sys.modules.has_key(n):
                        sys.modules[n] = c
            except:
                pass
        elif isinstance(e, PyJavaPackage):
            _do_reload(ls_name, mgr, e)