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

? 歡迎來(lái)到蟲(chóng)蟲(chóng)下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲(chóng)蟲(chóng)下載站

?? makeapidb.java

?? 這是當(dāng)前我所遇到的最大最全的java源碼庫(kù)
?? JAVA
字號(hào):
/* * Copyright (c) 2000 David Flanagan.  All rights reserved. * This code is from the book Java Examples in a Nutshell, 2nd Edition. * It is provided AS-IS, WITHOUT ANY WARRANTY either expressed or implied. * You may study, use, and modify it for any non-commercial purpose. * You may distribute it non-commercially as long as you retain this notice. * For a commercial use license, or to purchase the book (recommended), * visit http://www.davidflanagan.com/javaexamples2. */package com.davidflanagan.examples.sql;import java.sql.*;import java.lang.reflect.*;import java.io.*;import java.util.*;/** * This class is a standalone program that reads a list of classes and  * builds a database of packages, classes, and class fields and methods. **/public class MakeAPIDB {    public static void main(String args[]) {        Connection c = null;       // The connection to the database        try {             // Read the classes to index from a file specified by args[0]            ArrayList classnames = new ArrayList();            BufferedReader in = new BufferedReader(new FileReader(args[0]));            String name;            while((name = in.readLine()) != null) classnames.add(name);                        // Now determine the values needed to set up the database            // connection The program attempts to read a property file named            // "APIDB.props", or optionally specified by args[1].  This            // property file (if any) may contain "driver", "database", "user",            // and "password" properties that specify the necessary values for            // connecting to the db.  If the properties file does not exist, or            // does not contain the named properties, defaults will be used.            Properties p = new Properties();          // Empty properties            try {                                     		p.load(new FileInputStream(args[1])); // Try to load properties	    }             catch (Exception e1) {                 try { p.load(new FileInputStream("APIDB.props")); }                catch (Exception e2) {}            }             // Read values from Properties file            String driver = p.getProperty("driver");            String database = p.getProperty("database");            String user = p.getProperty("user", "");            String password = p.getProperty("password", "");	    // The driver and database properties are mandatory	    if (driver == null) 		throw new IllegalArgumentException("No driver specified!");	    if (database == null) 		throw new IllegalArgumentException("No database specified!");            // Load the driver.  It registers itself with DriverManager.            Class.forName(driver);            // And set up a connection to the specified database            c = DriverManager.getConnection(database, user, password);                        // Create three new tables for our data            // The package table contains a package id and a package name.            // The class table contains a class id, a package id, and a name.            // The member table contains a class id, a member name, and an bit            // that indicates whether the class member is a field or a method.            Statement s = c.createStatement();            s.executeUpdate("CREATE TABLE package " + 			    "(id INT, name VARCHAR(80))");            s.executeUpdate("CREATE TABLE class " + 			    "(id INT, packageId INT, name VARCHAR(48))");            s.executeUpdate("CREATE TABLE member " + 			    "(classId INT, name VARCHAR(48), isField BIT)");                        // Prepare some statements that will be used to insert records into            // these three tables.            insertpackage =		c.prepareStatement("INSERT INTO package VALUES(?,?)");            insertclass =		c.prepareStatement("INSERT INTO class VALUES(?,?,?)");            insertmember =		c.prepareStatement("INSERT INTO member VALUES(?,?,?)");            // Now loop through the list of classes and use reflection	    // to store them all in the tables	    int numclasses = classnames.size();            for(int i = 0; i < numclasses; i++) {		try {		    storeClass((String)classnames.get(i));		}		catch(ClassNotFoundException e) {		    System.out.println("WARNING: class not found: " +				       classnames.get(i) + "; SKIPPING");		}	    }        }        catch (Exception e) {            System.err.println(e);            if (e instanceof SQLException)                System.err.println("SQLState: " +				   ((SQLException)e).getSQLState());            System.err.println("Usage: java MakeAPIDB " + 			       "<classlistfile> <propfile>");        }        // When we're done, close the connection to the database        finally { try { c.close(); } catch (Exception e) {} }    }    /**      * This hash table records the mapping between package names and package     * id.  This is the only one we need to store temporarily.  The others are     * stored in the db and don't have to be looked up by this program     **/    static Map package_to_id = new HashMap();    // Counters for the package and class identifier columns    static int packageId = 0, classId = 0;        // Some prepared SQL statements for use in inserting    // new values into the tables.  Initialized in main() above.    static PreparedStatement insertpackage, insertclass, insertmember;    /**     * Given a fully-qualified classname, this method stores the package name     * in the package table (if it is not already there), stores the class name     * in the class table, and then uses the Java Reflection API to look up all     * methods and fields of the class, and stores those in the member table.     **/    public static void storeClass(String name) 	throws SQLException, ClassNotFoundException    {        String packagename, classname;	        // Dynamically load the class.        Class c = Class.forName(name);	        // Display output so the user knows that the program is progressing        System.out.println("Storing data for: " + name);	        // Figure out the packagename and the classname        int pos = name.lastIndexOf('.');        if (pos == -1) {            packagename = "";            classname = name;        }        else {            packagename = name.substring(0,pos);            classname = name.substring(pos+1);        }	        // Figure out what the package id is.  If there is one, then this        // package has already been stored in the database.  Otherwise, assign        // an id, and store it and the packagename in the db.        Integer pid;        pid = (Integer)package_to_id.get(packagename);  // Check hashtable        if (pid == null) {            pid = new Integer(++packageId);          // Assign an id            package_to_id.put(packagename, pid);     // Remember it            insertpackage.setInt(1, packageId);      // Set statement args            insertpackage.setString(2, packagename);              insertpackage.executeUpdate();           // Insert into package db        }        // Now, store the classname in the class table of the database.        // This record includes the package id, so that the class is linked to         // the package that contains it.  To store the class, we set arguments        // to the PreparedStatement, then execute that statement        insertclass.setInt(1, ++classId);       // Set class identifier        insertclass.setInt(2, pid.intValue());  // Set package identifier        insertclass.setString(3, classname);    // Set class name        insertclass.executeUpdate();            // Insert the class record        // Now, get a list of all non-private methods of the class, and        // insert those into the "members" table of the database.  Each        // record includes the class id of the containing class, and also        // a value that indicates that these are methods, not fields.        Method[] methods = c.getDeclaredMethods();   // Get a list of methods        for(int i = 0; i < methods.length; i++) {    // For all non-private            if (Modifier.isPrivate(methods[i].getModifiers())) continue;            insertmember.setInt(1, classId);         // Set the class id            insertmember.setString(2, methods[i].getName()); // Set method name            insertmember.setBoolean(3, false);       // It is not a field            insertmember.executeUpdate();            // Insert into db        }        // Do the same thing for the non-private fields of the class        Field[] fields = c.getDeclaredFields();    // Get a list of fields        for(int i = 0; i < fields.length; i++) {   // For each non-private            if (Modifier.isPrivate(fields[i].getModifiers())) continue;            insertmember.setInt(1, classId);       // Set the class id            insertmember.setString(2, fields[i].getName()); // Set field name            insertmember.setBoolean(3, true);      // It is a field            insertmember.executeUpdate();          // Insert the record        }    }}

?? 快捷鍵說(shuō)明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
www.欧美.com| 56国语精品自产拍在线观看| 婷婷成人综合网| 国产精品亲子乱子伦xxxx裸| 欧美日韩国产123区| 成人在线综合网| 精品一区二区三区在线观看国产| 亚洲精品视频免费看| 精品成人私密视频| 欧美日韩高清影院| 一本大道久久a久久综合| 国产一区在线精品| 婷婷综合久久一区二区三区| 国产精品初高中害羞小美女文| 精品国产免费视频| 91精品国产91久久久久久一区二区 | 日韩精品亚洲一区二区三区免费| 日本一区二区三区四区在线视频 | 综合自拍亚洲综合图不卡区| 精品国产人成亚洲区| 中文字幕欧美日韩一区| 欧美一区二区三区啪啪| 欧美天堂亚洲电影院在线播放| 成人av资源下载| 国产在线精品一区二区| 麻豆精品新av中文字幕| 婷婷开心久久网| 亚洲自拍偷拍麻豆| 一二三四社区欧美黄| 综合久久一区二区三区| 中文字幕一区二区三区在线不卡| 久久亚洲精华国产精华液| 欧美变态tickle挠乳网站| 日韩亚洲欧美一区二区三区| 欧美片在线播放| 欧美色精品天天在线观看视频| 91视频免费播放| 99国产精品久久久久| hitomi一区二区三区精品| 福利一区福利二区| 成人一区二区三区视频在线观看| 国产福利一区二区| 成人黄动漫网站免费app| 国产99精品国产| 成人动漫一区二区在线| 成a人片国产精品| 成人av小说网| 色综合天天做天天爱| aaa欧美日韩| 在线视频亚洲一区| 欧美精品在欧美一区二区少妇| 欧美三级中文字幕在线观看| 欧美巨大另类极品videosbest| 91麻豆精品国产自产在线观看一区| 制服.丝袜.亚洲.另类.中文| 欧美va亚洲va香蕉在线| 久久久不卡网国产精品二区| 欧美激情在线观看视频免费| 国产精品美女久久久久aⅴ | 91精品麻豆日日躁夜夜躁| 欧美久久久久中文字幕| 日韩视频一区二区三区在线播放| 日韩精品中文字幕一区二区三区| 久久亚洲精精品中文字幕早川悠里 | 99久精品国产| 欧美日韩中文一区| 欧美成人性战久久| 中文字幕国产一区二区| 亚洲综合图片区| 美日韩一区二区三区| 国产+成+人+亚洲欧洲自线| 色婷婷香蕉在线一区二区| 欧美精品在线观看播放| 久久精品欧美日韩| 亚洲私人影院在线观看| 亚洲福利一区二区三区| 国产在线一区观看| 色88888久久久久久影院按摩| 欧美精品1区2区3区| 久久久久国产免费免费| 一区二区三区**美女毛片| 久久er99热精品一区二区| 97精品国产97久久久久久久久久久久 | 亚洲一区二区精品久久av| 开心九九激情九九欧美日韩精美视频电影| 国产盗摄视频一区二区三区| 一本色道a无线码一区v| 欧美www视频| 亚洲另类春色国产| 国产在线精品一区二区三区不卡| 91捆绑美女网站| 亚洲精品在线观| 亚洲高清视频在线| 粗大黑人巨茎大战欧美成人| 91精品欧美久久久久久动漫| 国产精品美女久久久久久久久 | 一卡二卡三卡日韩欧美| 九一九一国产精品| 欧美性生活大片视频| 国产日韩欧美麻豆| 日韩高清在线观看| 91一区二区在线观看| 久久婷婷成人综合色| 天天av天天翘天天综合网| 不卡视频在线观看| 久久众筹精品私拍模特| 亚洲成人777| 色悠悠久久综合| 中文无字幕一区二区三区| 人人爽香蕉精品| 精品视频在线免费| 亚洲人吸女人奶水| 成人性色生活片免费看爆迷你毛片| 欧美大片在线观看| 男人的天堂久久精品| 欧美性videosxxxxx| 国产精品女上位| 懂色中文一区二区在线播放| 久久五月婷婷丁香社区| 麻豆精品在线播放| 欧美一区二区视频免费观看| 亚洲aⅴ怡春院| 欧美日韩精品一二三区| 一区二区三区欧美视频| 色哟哟国产精品| 亚洲蜜臀av乱码久久精品| yourporn久久国产精品| 亚洲国产精品激情在线观看| 国产激情91久久精品导航| 精品国产乱码久久久久久夜甘婷婷| 日韩精品电影在线观看| 欧美日韩国产欧美日美国产精品| 亚洲色图都市小说| 91国偷自产一区二区开放时间 | 欧美日韩午夜精品| 亚洲国产日产av| 欧美美女一区二区| 青青草国产成人99久久| 91精品国产91久久久久久最新毛片 | 亚洲欧洲制服丝袜| 色诱视频网站一区| 亚洲午夜影视影院在线观看| 欧美性色综合网| 日韩成人一区二区| 日韩欧美中文字幕精品| 国模一区二区三区白浆| 国产日产亚洲精品系列| 成人黄色在线视频| 亚洲欧美日韩久久| 欧美体内she精高潮| 日韩电影在线免费看| 日韩欧美视频一区| 国产一区二区三区久久悠悠色av| 久久综合久久鬼色| 99这里都是精品| 亚洲国产成人tv| 欧美一级久久久久久久大片| 久久国产生活片100| 国产亚洲欧洲一区高清在线观看| 成人高清视频在线| 亚洲成人自拍网| 欧美成人高清电影在线| 成人a级免费电影| 亚洲成人免费在线| 亚洲精品一区二区三区香蕉| www.色精品| 日韩av中文字幕一区二区| 国产亚洲成年网址在线观看| 成人av在线播放网址| 亚洲成人先锋电影| 国产拍欧美日韩视频二区| 91香蕉视频黄| 久久国产生活片100| 亚洲男人电影天堂| 日韩视频在线你懂得| 成人精品高清在线| 日韩高清中文字幕一区| 中文字幕免费不卡在线| 欧美日韩一区二区三区四区| 国产精品一区专区| 亚洲国产va精品久久久不卡综合| 久久蜜臀精品av| 欧美色老头old∨ideo| 国产a视频精品免费观看| 亚州成人在线电影| 亚洲国产精品t66y| 日韩小视频在线观看专区| 97se亚洲国产综合自在线 | 麻豆精品视频在线观看| 亚洲人成网站在线| 久久女同精品一区二区| 在线观看视频一区二区| 国产成人在线视频播放| 日日摸夜夜添夜夜添国产精品 | 日韩欧美不卡在线观看视频| 91丨porny丨中文| 国产一区二区三区电影在线观看| 亚洲靠逼com| 日本一区二区三区国色天香 | 欧美电视剧免费观看|