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

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

?? mungedclass.java

?? 對xml很好的java處理引擎,編譯中綁定xml
?? JAVA
字號:
/*Copyright (c) 2003-2006, Dennis M. SosnoskiAll 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 JiBX 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" ANDANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIEDWARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FORANY 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 ONANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THISSOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/package org.jibx.binding.classes;import java.io.File;import java.io.FileFilter;import java.io.IOException;import java.util.ArrayList;import java.util.HashMap;import org.apache.bcel.Constants;import org.jibx.binding.def.BindingDefinition;import org.jibx.runtime.JiBXException;/** * Modifiable class handler. Each instance controls changes to a particular * class modified by one or more binding definitions. As methods are generated * they're checked for uniqueness. If an already-generated method is found with * the same characteristics (including byte code) as the one being generated, * the already-generated is used instead. * * @author Dennis M. Sosnoski * @version 1.0 */public class MungedClass{    //    // Constants and such related to code generation.        /** Empty class file array. */    private static final ClassFile[] EMPTY_CLASSFILE_ARRAY = {};    /** Name for list of binding factory names. */    private static final String BINDING_LISTNAME =        BindingDefinition.GENERATE_PREFIX + "bindingList";        /** Name and signature for generated methods without standard prefix. */    private static final String[] EXTRA_METHODS_MATCHES =    {        "marshal", "(Lorg/jibx/runtime/IMarshallingContext;)V",        "unmarshal", "(Lorg/jibx/runtime/IUnmarshallingContext;)V"    };        //    // Static data.        /** Munged class information. */    private static ArrayList s_classes;        /** Map from generated class to binding information. */    private static HashMap s_classMap;        /** Map of directories already checked for JiBX classes. */    private static HashMap s_directories;        /** Map from class name to binding information. */    private static HashMap s_nameMap;        /** Munged classes to be unique-added at end of binding. */    private static ArrayList s_pendingClasses;    //    // Actual instance data.        /** Munged class file information. */    private ClassFile m_classFile;        /** Map from method byte code and signature to method item. */    private HashMap m_methodMap;        /** Existing binding methods in class. */    private ExistingMethod[] m_existingMethods;        /** List of factory names for this class. */    private String m_factoryList;    /**     * Constructor. This sets up for modifying a class with added methods.     *     * @param cf owning class file information     */    private MungedClass(ClassFile cf) {                // initialize basic class information        m_classFile = cf;        m_methodMap = new HashMap();                // get information for existing binding methods in this class        ExistingMethod[] exists = cf.getBindingMethods            (BindingDefinition.GENERATE_PREFIX, EXTRA_METHODS_MATCHES);        if (exists != null) {            for (int i = 0; i < exists.length; i++) {                m_methodMap.put(exists[i], exists[i]);            }        }        m_existingMethods = exists;    }    /**     * Get munged class file information.     *     * @return class file information for bound class     */    /*package*/ ClassFile getClassFile() {        return m_classFile;    }    /**     * Delete pre-existing binding methods that are no longer needed.     *      * @throws JiBXException on configuration error     */    private void purgeUnusedMethods() throws JiBXException {        if (m_existingMethods != null) {            for (int i = 0; i < m_existingMethods.length; i++) {                ExistingMethod method = m_existingMethods[i];                if (!method.isUsed()) {                    method.delete();                }            }        }    }    /**     * Get unique method. If a method matching the byte code of the supplied     * method has already been defined the existing method is returned.     * Otherwise the method is added to the definitions. If necessary, a number     * suffix is appended to the method name to prevent conflicts with existing     * names.     *     * @param builder method to be defined     * @param suffix append name suffix to assure uniqueness flag     * @return defined method item     * @throws JiBXException on configuration error     */    /*package*/ BindingMethod getUniqueMethod(MethodBuilder builder,        boolean suffix) throws JiBXException {                // try to find already added method with same characteristics        if (builder.getClassFile() != m_classFile) {            throw new IllegalStateException                ("Internal error: wrong class for call");        }        builder.codeComplete(suffix);        BindingMethod method = (BindingMethod)m_methodMap.get(builder);        if (method == null) {//          System.out.println("No match found for method " +//              builder.getClassFile().getName()+ '.' + builder.getName() +//              "; adding method");                        // create as new method            builder.addMethod();            m_methodMap.put(builder, builder);            return builder;                    } else if (method instanceof ExistingMethod) {            ((ExistingMethod)method).setUsed();        }//      System.out.println("Found " + method.getClassFile().getName()+//          '.' + method.getName() + " as match for " + builder.getName());        return method;    }    /**     * Get unique generated support class. Allows tracking of all generated     * classes for common handling with the bound classes. Each generated     * support class is associated with a particular bound class.     *     * @param cf generated class file     * @return unique class file information     */    public static ClassFile getUniqueSupportClass(ClassFile cf) {        cf.codeComplete();        Object value = s_classMap.get(cf);        if (value == null) {            s_classes.add(cf);            s_classMap.put(cf, cf);//              System.out.println("Added class " + cf.getName());            return cf;        } else {            ClassFile prior = (ClassFile)value;            prior.incrementUseCount();//              System.out.println("Matched class " + cf.getName() + " with " +//                  prior.getName());            return prior;        }    }    /**     * Check directory for JiBX generated files. Scans through all class files     * in the target directory and loads any that start with the JiBX     * identifier string.     *     * @param root class path root for directory     * @param pack package relative to root directory     * @throws JiBXException on configuration error     */    /*package*/ static void checkDirectory(File root, String pack)        throws JiBXException {        try {            File directory = new File                (root, pack.replace('.', File.separatorChar));            String cpath = directory.getCanonicalPath();            if (s_directories.get(cpath) == null) {                File[] matches = new File(cpath).listFiles(new JiBXFilter());                for (int i = 0; i < matches.length; i++) {                    File file = matches[i];                    String name = file.getName();                    int split = name.indexOf('.');                    if (split >= 0) {                        name = name.substring(0, split);                    }                    if (pack.length() > 0) {                        name = pack + '.' + name;                    }                    ClassFile cf = ClassCache.getClassFile(name);                    s_classes.add(cf);                    s_classMap.put(cf, cf);                }                s_directories.put(cpath, cpath);            }        } catch (IOException ex) {            throw new JiBXException("Error loading class file", ex);        }    }    /**     * Add binding factory to class. The binding factories are accumulated as     * a delimited string during generation, then dumped to a static field in     * the class at the end.     *     * @param fact binding factory name     */    /*package*/ void addFactory(String fact) {        String match = "|" + fact + "|";        if (m_factoryList == null) {            m_factoryList = match;        } else if (m_factoryList.indexOf(match) < 0) {            m_factoryList = m_factoryList + fact + "|";        }    }    /**     * Generate factory list. Adds or replaces the existing static array of     * factories in the class.     *      * @throws JiBXException on configuration error     */    /*package*/ void setFactoryList() throws JiBXException {        if (m_factoryList != null) {            short access = Constants.ACC_PUBLIC | Constants.ACC_FINAL |                 Constants.ACC_STATIC;            m_classFile.updateField("java.lang.String", BINDING_LISTNAME,                access, m_factoryList);        }    }    /**     * Get modification tracking information for class.     *     * @param cf information for class to be modified (must be writable)     * @return binding information for class     * @throws JiBXException on configuration error     */    /*package*/ static MungedClass getInstance(ClassFile cf)        throws JiBXException {        MungedClass inst = (MungedClass)s_nameMap.get(cf.getName());        if (inst == null) {            inst = new MungedClass(cf);            s_nameMap.put(cf.getName(), inst);            if (cf.isComplete()) {                if (s_classMap.get(cf) == null) {                    s_classes.add(inst);                    s_classMap.put(cf, cf);                } else {                    throw new IllegalStateException                        ("Existing class conflicts with load");                }                String pack = cf.getPackage();                checkDirectory(cf.getRoot(), pack);            }        }        inst.m_classFile.incrementUseCount();        return inst;    }    /**     * Add unique support class at end of binding process. This allows a class     * to be constructed in steps during handling of one or more bindings, with     * the class finished and checked for uniqueness only after all bindings     * have been handled. The actual add of the class is done during the     * {@link #fixChanges(boolean)} handling.     *     * @param cf class file to be added as unique support class at end of     * binding     */    public static void delayedAddUnique(ClassFile cf) {        s_pendingClasses.add(cf);    }        /**     * Add class file to set modified.     *     * @param cf     */    public static void addModifiedClass(ClassFile cf) {        s_classes.add(cf);    }    /**     * Finalize changes to modified class files.     *     * @param write replace original class files with modified versions     * @return three-way array of class files, for written, unmodified, and     * deleted     * @throws JiBXException on write error     */    public static ClassFile[][] fixChanges(boolean write) throws JiBXException {        try {            for (int i = 0; i < s_pendingClasses.size(); i++) {                getUniqueSupportClass((ClassFile)s_pendingClasses.get(i));            }            ArrayList writes = new ArrayList();            ArrayList keeps = new ArrayList();            ArrayList deletes = new ArrayList();            for (int i = 0; i < s_classes.size(); i++) {                Object obj = s_classes.get(i);                ClassFile cf;                if (obj instanceof MungedClass) {                    MungedClass inst = (MungedClass)obj;                    inst.purgeUnusedMethods();                    inst.setFactoryList();                    cf = inst.getClassFile();                } else {                    cf = (ClassFile)obj;                }                if (cf.isModified()) {                    if (write) {                        cf.writeFile();                    }                    writes.add(cf);//                      System.out.println("Wrote file " + cf.getName());                } else if (cf.getUseCount() > 0) {                    keeps.add(cf);//                      System.out.println("Kept file " + cf.getName());                } else {                    cf.delete();                    deletes.add(cf);//                      System.out.println("Deleted file " + cf.getName());                }            }            ClassFile[][] results = new ClassFile[3][];            results[0] = (ClassFile[])writes.toArray(EMPTY_CLASSFILE_ARRAY);            results[1] = (ClassFile[])keeps.toArray(EMPTY_CLASSFILE_ARRAY);            results[2] = (ClassFile[])deletes.toArray                (EMPTY_CLASSFILE_ARRAY);            return results;        } catch (IOException ex) {            throw new JiBXException("Error writing to file", ex);        }    }    /**     * Filter for class files generated by JiBX.     */    private static class JiBXFilter implements FileFilter    {        public boolean accept(File file) {            String name = file.getName();            return name.startsWith(BindingDefinition.GENERATE_PREFIX) &&                 name.endsWith(".class");        }    }    /**     * Discard cached information and reset in preparation for a new binding     * run.     */    public static void reset() {        s_classes = new ArrayList();        s_classMap = new HashMap();        s_directories = new HashMap();        s_nameMap = new HashMap();        s_pendingClasses = new ArrayList();    }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
91精品国产综合久久蜜臀| 奇米精品一区二区三区四区| 欧美日韩国产乱码电影| 处破女av一区二区| 激情综合色综合久久综合| 日韩精品成人一区二区三区| 亚洲在线视频一区| 亚洲成年人网站在线观看| 五月天网站亚洲| 精品影视av免费| 99国产精品久| 欧洲一区二区三区在线| 777午夜精品免费视频| 欧美日韩国产首页在线观看| 8x8x8国产精品| 久久中文字幕电影| 一区二区三区中文字幕精品精品| 亚洲激情第一区| 免费精品99久久国产综合精品| 国产在线精品国自产拍免费| 成+人+亚洲+综合天堂| 欧美亚洲国产bt| 国产欧美va欧美不卡在线| 国产精品麻豆一区二区| 蜜桃视频免费观看一区| 91美女在线视频| 久久综合资源网| 国产成人精品影院| 欧美日韩成人激情| 日韩一区欧美一区| 久久99热99| 在线不卡一区二区| 亚洲三级视频在线观看| 国产99久久久国产精品免费看| 欧美视频在线不卡| 亚洲美女电影在线| 97国产一区二区| 亚洲精品一卡二卡| 91久久精品日日躁夜夜躁欧美| 亚洲视频免费观看| 色婷婷激情综合| 亚洲高清一区二区三区| 日本道色综合久久| 亚洲欧美日韩中文播放| 欧美在线色视频| 日一区二区三区| 精品成人一区二区三区四区| 国产一区二区主播在线| 2023国产精华国产精品| 国产综合成人久久大片91| 91精品国产入口在线| 久久狠狠亚洲综合| 国产亚洲一区二区在线观看| 国产成都精品91一区二区三| 中文字幕欧美日韩一区| 波多野结衣中文一区| 欧美国产国产综合| 91麻豆国产福利在线观看| 亚洲成年人网站在线观看| 久久综合狠狠综合久久综合88| k8久久久一区二区三区| 午夜私人影院久久久久| 久久―日本道色综合久久| 精品无人码麻豆乱码1区2区| 中文字幕av一区二区三区高| 色爱区综合激月婷婷| 精品一区二区在线视频| 一区二区在线观看av| 欧美激情一区二区三区全黄| 欧美一级电影网站| 91激情在线视频| 97久久精品人人爽人人爽蜜臀| 国产一区免费电影| 久久国产精品无码网站| 一区二区三区产品免费精品久久75| 日韩一区二区三区精品视频| 色猫猫国产区一区二在线视频| 秋霞午夜av一区二区三区| 亚洲色图在线播放| 中文字幕乱码一区二区免费| 精品久久久久久久久久久久包黑料 | 在线电影院国产精品| 国产一区二区三区在线观看免费| 中文字幕精品一区| 久久久99免费| 久久日韩精品一区二区五区| 欧美精品三级在线观看| 欧美色大人视频| 日本道免费精品一区二区三区| 91网址在线看| 成人黄色大片在线观看| 99视频在线观看一区三区| 99精品黄色片免费大全| 欧美日韩国产中文| 欧美一级日韩免费不卡| 欧美成人一区二区三区| 久久久久久久精| 中文字幕中文字幕一区二区| 亚洲香蕉伊在人在线观| 免费成人美女在线观看.| 国产成人亚洲综合a∨婷婷图片 | 欧美精品日韩一区| 欧美一级爆毛片| 亚洲啪啪综合av一区二区三区| 亚洲一区二区三区三| 国产精品1024| 欧美日本韩国一区| 国产欧美视频在线观看| 亚洲成人高清在线| 国产在线视频精品一区| 一本久道久久综合中文字幕| 777亚洲妇女| 性感美女久久精品| 99在线视频精品| 精品国精品自拍自在线| 午夜影视日本亚洲欧洲精品| 丁香网亚洲国际| 2021中文字幕一区亚洲| 午夜精品影院在线观看| 欧美三级午夜理伦三级中视频| 国产欧美视频一区二区| 国模一区二区三区白浆| 日韩女优制服丝袜电影| 午夜精品久久久久久久99樱桃| 不卡免费追剧大全电视剧网站| 精品免费一区二区三区| 成人激情图片网| 欧美巨大另类极品videosbest| 亚洲成a人片在线观看中文| 色综合激情五月| 亚洲国产精品久久艾草纯爱| 色香蕉成人二区免费| 亚洲女人的天堂| 欧美日韩国产首页| 久久99久久久欧美国产| 国产免费成人在线视频| 成人精品国产福利| 中文字幕一区二区不卡| 欧美伊人久久久久久久久影院| 一区二区三区四区在线播放| 欧美日韩国产经典色站一区二区三区| 国产精品久久久久婷婷| 在线欧美小视频| 亚洲午夜在线观看视频在线| 精品乱码亚洲一区二区不卡| 国产大陆亚洲精品国产| 亚洲人妖av一区二区| 欧美夫妻性生活| 国产一区视频导航| 亚洲福利视频导航| 精品久久久久久久久久久久久久久久久 | 欧美人与性动xxxx| 一区二区三区成人| 国产亚洲人成网站| 欧美色综合久久| 成人国产精品免费观看动漫| 婷婷久久综合九色综合绿巨人| 精品理论电影在线| 在线播放91灌醉迷j高跟美女| 韩国v欧美v日本v亚洲v| 亚洲午夜在线视频| 国产精品久久久久久久久久久免费看| 欧洲精品一区二区三区在线观看| 国产精品123| 日韩激情在线观看| 日本女优在线视频一区二区| 樱花影视一区二区| 夜夜嗨av一区二区三区网页 | 国产精品一区在线观看乱码 | 99re66热这里只有精品3直播| 激情久久五月天| 久久爱www久久做| 国产一区二区久久| 久久国产精品第一页| 久热成人在线视频| 青青青伊人色综合久久| 久久99精品网久久| 国产在线精品不卡| 国产剧情一区二区三区| 粉嫩蜜臀av国产精品网站| 国产精品自在在线| 99久久国产免费看| 欧美视频一区在线观看| 欧美日韩精品欧美日韩精品| 91精品国产日韩91久久久久久| 欧美日韩一区高清| 欧美电影免费观看高清完整版在线 | 首页亚洲欧美制服丝腿| 日本美女一区二区三区视频| 一区二区三区中文字幕在线观看| 一级女性全黄久久生活片免费| 日本免费在线视频不卡一不卡二| 捆绑变态av一区二区三区| 成人黄色电影在线| 色婷婷国产精品综合在线观看| 4438x成人网最大色成网站| 久久午夜色播影院免费高清| 一区二区在线观看免费视频播放| 日韩高清不卡在线| 福利一区在线观看|