亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? searchpolicy.java

?? OSGI 的 源碼實現,采用JAVA書寫
?? JAVA
字號:
/* * ModuleLoader - A generic, policy-driven class loader. * Copyright (c) 2004, Richard S. Hall * All rights reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * *   * Redistributions of source code must retain the above copyright *     notice, this list of conditions and the following disclaimer. *   * Redistributions in binary form must reproduce the above copyright *     notice, this list of conditions and the following disclaimer in *     the documentation and/or other materials provided with the *     distribution. *   * Neither the name of the ungoverned.org nor the names of its *     contributors may be used to endorse or promote products derived *     from this software without specific prior written permission. * * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * * Contact: Richard S. Hall (heavy@ungoverned.org) * Contributor(s): ***/package org.ungoverned.moduleloader;import java.net.URL;/** * <p> * This interface represents a policy to define the most basic behavior * of how classes, resources, and native libraries within a specific instance * of <tt>ModuleManager</tt> are found. A <tt>ModuleManager</tt> manages a set of * <tt>Module</tt>s, each of which is a potential source of classes, resources, * and native libraries. The search policy makes it possible to consult these * sources without hard-coding assumptions about application behavior * or structure. Applicaitons inject their own specific class loading policy * by creating a custom search policy or by selecting a pre-existing search * policy that matches their needs. * </p> * <p> * The search policy is used by <tt>ModuleClassLoader</tt>, of which, there * is one per <tt>Module</tt> within a given <tt>ModuleManager</tt> instance. * The search policy is consulted by the <tt>ModuleClassLoader</tt> whenever * there is a request for a class, resource, or native library. The search * policy will generally search other modules in an application-specific * way in order to find the requested item; for example, an application may * use a policy where module's may import from one another. If the search * policy provides an answer, then the <tt>ModuleClassLoader</tt> will use * this to answer the originating request. * </p> * <p> * <b><i>Important:</i></b> The search policy <i>searches</i> modules in * some application-specific manner in order to find a class or resource. * This <i>search</i> is instigated, either directly or indirectly, by calls * to <tt>ModuleClassLoader.loadClass()</tt> and <tt>ModuleClassLoader.getResource()</tt>, * respectively. In order for the search policy to load a class or resource, * it must <b>not</b> use <tt>ModuleClassLoader.loadClass()</tt> or * <tt>ModuleClassLoader.getResource()</tt> again, because this would result * in an infinite loop. Instead, the <tt>ModuleClassLoader</tt> offers the * the methods <tt>ModuleClassLoader.searchForClass()</tt> and * <tt>ModuleClassLoader.searchForResource()</tt> to search a given module * and to avoid an infinite loop. * </p> * <pre> *     ... *     public Class findClass(Module module, String name) *     { *         Module[] modules = m_mgr.getModules(); *         for (int i = 0; i < modules.length; i++) *         { *             try { *                 Class clazz = modules[i].getClassLoader().searchForClass(name); *                 if (clazz != null) *                 { *                     return clazz; *                 } *             } catch (Throwable th) { *             } *         } * *         return null; *     } *     ... * </pre> * <p> * In the above code, the search policy "exhaustively" searches every module in the * <tt>ModuleManager</tt> to find the requested resource. Note that this policy * will also search the module that originated the request, which is not totally * necessary since returning <tt>null</tt> will cause the <tt>ModuleClassLoader</tt> * to search the originating module's <tt>ResourceSource</tt>s. * </p>**/public interface SearchPolicy{    /**     * <p>     * This method is called once by the <tt>ModuleManager</tt> to     * give the search policy instance a reference to its associated     * module manager. This method should be implemented such that     * it cannot be called twice; calling this method a second time     * should produce an illegal state exception.     * </p>     * @param mgr the module manager associated with this search policy.     * @throws java.lang.IllegalStateException if the method is called     *         more than once.    **/    public void setModuleManager(ModuleManager mgr)        throws IllegalStateException;    /**     * <p>     * This method tries to find the specified class for the specified     * module. How the class is found or whether it is actually retrieved     * from the specified module is dependent upon the implementation. The     * default <tt>ModuleClassLoader.loadClass()</tt> method does not do     * any searching of its own, it merely calls <tt>ClassLoader.resolveClass()</tt>     * on the class returned by this method.     * </p>     * <p>     * This method may return <tt>null</tt> or throw an exception if the     * specified class is not found. Whether a specific search policy     * implementation should do one or the other depends on the details     * of the specific search policy. The <tt>ModuleClassLoader</tt>     * first delegates to this method and then to the local resource     * sources of the module. If this method returns null, then the local     * resource sources will be searched. On the other hand, if this method     * throws an exception, then the local resource sources will not be     * searched.     * </p>     * <p>     * <b>Important:</b> If the implementation of this method delegates     * the class loading to a <tt>ModuleClassLoader</tt> of another module,     * then it should <b>not</b> use the method <tt>ModuleClassLoader.loadClass()</tt>     * to load the class; it should use <tt>ModuleClassLoader.searchForClass()</tt>     * instead. This is necessary to eliminate an infinite loop that would     * occur otherwise. Also, with respect to the <tt>ModuleLoader</tt> framework,     * this method will only be called by a single thread at a time and is only     * intended to be called by <tt>ModuleClassLoader.loadClass()</tt>.     * </p>     * @param parent the parent class loader of the delegating class loader.     * @param module the target module that is loading the class.     * @param name the name of the class being loaded.     * @return the class if found, <tt>null</tt> otherwise.     * @throws java.lang.ClassNotFoundException if the class could not be     *         found and the entire search operation should fail.    **/    public Class findClass(Module module, String name)        throws ClassNotFoundException;    /**     * <p>     * This method tries to find the specified resource for the specified     * module. How the resource is found or whether it is actually retrieved     * from the specified module is dependent upon the implementation. The     * default <tt>ModuleClassLoader.getResource()</tt> method does not do     * any searching on its own.     * </p>     * <p>     * This method may return <tt>null</tt> or throw an exception if the     * specified resource is not found. Whether a specific search policy     * implementation should do one or the other depends on the details     * of the specific search policy. The <tt>ModuleClassLoader</tt>     * first delegates to this method and then to the local resource     * sources of the module. If this method returns null, then the local     * resource sources will be searched. On the other hand, if this method     * throws an exception, then the local resource sources will not be     * searched.     * </p>     * <p>     * <b>Important:</b> If the implementation of this method delegates     * the resource loading to a <tt>ModuleClassLoader</tt> of another module,     * then it should not use the method <tt>ModuleClassLoader.getResource()</tt>     * to get the resource; it should use <tt>ModuleClassLoader.searchForResource()</tt>     * instead. This is necessary to eliminate an infinite loop that would     * occur otherwise. Also, with respect to the <tt>ModuleLoader</tt> framework,     * this method will only be called by a single thread at a time and is not     * intended to be called directly.     * </p>     * @param parent the parent class loader of the delegating class loader.     * @param module the target module that is loading the resource.     * @param name the name of the resource being loaded.     * @return a <tt>URL</tt> to the resource if found, <tt>null</tt> otherwise.     * @throws org.ungoverned.moduleloader.ResourceNotFoundException if the     *         resource could not be found and the entire search operation     *         should fail.    **/    public URL findResource(Module module, String name)        throws ResourceNotFoundException;}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91丨porny丨在线| 日韩一级免费观看| 亚洲欧洲国产专区| 99久久99久久精品免费看蜜桃| 国产精品传媒入口麻豆| av网站免费线看精品| 亚洲人成小说网站色在线 | 成人黄色在线视频| 一区二区三区影院| 欧美日韩1234| 激情综合色综合久久| 精品成人佐山爱一区二区| 成人精品视频一区二区三区| 亚洲欧美一区二区三区极速播放 | 欧美一二三区在线| 国产一区二区三区四区在线观看| 中文无字幕一区二区三区 | 国产一区二区三区四| 中文字幕乱码亚洲精品一区| 色婷婷精品久久二区二区蜜臂av| 亚洲国产成人tv| 欧美精品一区二区三区四区 | 亚洲香肠在线观看| 日韩一区二区电影| fc2成人免费人成在线观看播放| 亚洲黄色小视频| 欧美变态口味重另类| 成人深夜在线观看| 日韩国产精品久久久| 欧美极品aⅴ影院| 欧美精品在线视频| www.色综合.com| 免费成人在线播放| 亚洲免费电影在线| 久久―日本道色综合久久| 色呦呦一区二区三区| 裸体在线国模精品偷拍| 亚洲精品中文字幕在线观看| 欧美α欧美αv大片| 欧洲国产伦久久久久久久| 国产中文一区二区三区| 亚洲国产成人av| 国产精品久久久久久久久久久免费看 | 免费成人小视频| 亚洲欧美另类小说视频| 久久精品水蜜桃av综合天堂| 欧美日韩视频在线观看一区二区三区 | 国产成a人亚洲精品| 天天影视色香欲综合网老头| 国产精品毛片高清在线完整版| 555夜色666亚洲国产免| 91免费看片在线观看| 国产激情一区二区三区桃花岛亚洲| 亚洲大片免费看| 国产精品国产三级国产普通话三级 | 欧美精品久久一区二区三区| www.视频一区| 国产激情视频一区二区三区欧美| 日韩av一级片| 天天操天天综合网| 一区二区三区四区在线播放 | 毛片一区二区三区| 午夜精品久久久久久久久| 一区二区三区在线影院| 国产精品久久看| 亚洲国产精品成人久久综合一区 | 国产成人福利片| 蜜桃精品视频在线| 五月天激情综合网| 亚洲福利视频一区| 一区二区免费视频| 亚洲另类在线视频| 亚洲欧美国产三级| 亚洲免费av高清| 夜夜夜精品看看| 亚洲一线二线三线久久久| 一区二区在线观看av| 亚洲精品乱码久久久久久黑人| 亚洲欧洲99久久| 一区精品在线播放| 亚洲美女在线一区| 亚洲午夜在线观看视频在线| 亚洲超碰97人人做人人爱| 亚洲国产日韩精品| 日本免费新一区视频| 日本午夜一本久久久综合| 免费观看91视频大全| 国产一区在线观看视频| 国产精品白丝jk白祙喷水网站 | 亚洲精品免费视频| 亚洲综合成人在线视频| 亚洲成a人在线观看| 日本欧美加勒比视频| 久久国内精品自在自线400部| 久久精品免费看| 国产一区视频在线看| 国产成人8x视频一区二区| 91丝袜呻吟高潮美腿白嫩在线观看| av一二三不卡影片| 欧美日韩成人一区二区| 欧美精品一区二区三区蜜臀| 国产精品你懂的| 亚洲午夜精品17c| 青草av.久久免费一区| 国产一区二区三区av电影| 成年人国产精品| 欧美三级电影在线观看| 精品成人a区在线观看| 亚洲国产精品传媒在线观看| 一区二区三区不卡在线观看 | 国产一区二区三区日韩| 91在线观看地址| 欧美一区二区视频在线观看2020| 国产视频在线观看一区二区三区| 亚洲男同1069视频| 看电影不卡的网站| 91丝袜美腿高跟国产极品老师| 欧美一区二区福利在线| 国产精品天干天干在观线| 午夜精品福利久久久| 国产超碰在线一区| 欧美日韩不卡一区| 亚洲欧洲成人精品av97| 极品美女销魂一区二区三区免费| 色国产精品一区在线观看| 精品国产免费人成在线观看| 亚洲激情图片小说视频| 国产高清精品在线| 欧美精品xxxxbbbb| 亚洲精品乱码久久久久久久久 | 色琪琪一区二区三区亚洲区| 精品少妇一区二区三区免费观看| 亚洲婷婷国产精品电影人久久| 裸体在线国模精品偷拍| 欧美撒尿777hd撒尿| 国产精品高潮呻吟久久| 精久久久久久久久久久| 欧美亚洲国产一卡| 欧美激情在线观看视频免费| 日韩电影一区二区三区四区| 91色综合久久久久婷婷| 国产色婷婷亚洲99精品小说| 日本欧美一区二区三区乱码| 色狠狠一区二区三区香蕉| 国产精品欧美精品| 国产一二三精品| 欧美一级欧美三级| 亚洲二区在线视频| 欧美综合亚洲图片综合区| 亚洲素人一区二区| www.在线成人| 国产精品免费av| 国产99久久精品| 久久久久久久久久美女| 激情都市一区二区| 欧美一区二区三区的| 图片区小说区区亚洲影院| 色综合激情久久| 一区二区欧美在线观看| 波多野洁衣一区| 国产精品不卡在线| jizzjizzjizz欧美| 亚洲欧美日韩久久精品| 制服丝袜日韩国产| 亚洲成人综合网站| 精品视频在线免费看| 亚洲国产一区二区三区| 欧美日韩色一区| 日日欢夜夜爽一区| 欧美精品一二三区| 丝袜亚洲精品中文字幕一区| 欧美日韩在线播| 日韩激情一区二区| 欧美一级高清片| 国产在线精品一区二区不卡了| 精品黑人一区二区三区久久| 极品少妇xxxx精品少妇| 国产日韩欧美不卡| 不卡视频在线观看| 亚洲美女区一区| 欧美日韩在线观看一区二区 | 亚洲男同性恋视频| 欧美视频完全免费看| 婷婷综合五月天| 欧美电影免费观看高清完整版在线 | 欧美视频在线一区二区三区| 亚洲国产乱码最新视频| 欧美区视频在线观看| 精品一二三四区| 国产精品乱人伦| 欧美体内she精视频| 日本成人中文字幕在线视频| 日韩视频一区二区| 国产a级毛片一区| 亚洲综合免费观看高清完整版| 欧美精品在线一区二区三区| 国产制服丝袜一区| 一区二区三区色| 日韩欧美国产1| eeuss影院一区二区三区|