標(biāo)本庫管理完整代碼_第1頁
標(biāo)本庫管理完整代碼_第2頁
標(biāo)本庫管理完整代碼_第3頁
標(biāo)本庫管理完整代碼_第4頁
標(biāo)本庫管理完整代碼_第5頁
已閱讀5頁,還剩62頁未讀, 繼續(xù)免費(fèi)閱讀

下載本文檔

版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)

文檔簡(jiǎn)介

1、個(gè)人收集整理 勿做商業(yè)用途1、web 部分,客戶端是 ie6.0 瀏覽器2、 RCP部分,用于集中管理標(biāo)本庫 一下是 Web 部分地相關(guān)代碼及配置文件說明:Web 部分基于 SHH技術(shù)(Struts 、Spring、 Hibernate) ,并且遵循 MVC 設(shè)計(jì)模式 ,所以相應(yīng)地代 碼也清晰地分成 java 簡(jiǎn)單原始類、數(shù)據(jù)庫操作類 (DAO 層 )、業(yè)務(wù)邏輯類 (business),整個(gè) web 系統(tǒng)有很多部分組成,包括 20 個(gè)包以及相關(guān)配置文件、 jsp 頁面、 javascript 腳本等等 .下面 是代碼展示: 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí) 樣本類型枚舉類: package or

2、g.scbit.tissuebank.cfg;/* author wuyifei* version 1.0.0 */public enum TissueStatEnum DISDOCIATION ( dissociation STORED( stored RESERVE( reserve LENDED( lended USEUP( useup ); private private this),),/),已入庫/ 未入庫),/name; public已預(yù)定已出借已耗盡StringTissueStatEnum(String name) . name = name;String getName()

3、return name; 持久化類:package org.scbit.tissuebank.utils;import java.io.BufferedReader;import java.io.File;import java.io.FileNotFoundException;import java.io.FileReader;import java.io.IOException;import java.io.PrintWriter;import java.util.regex.Matcher;import java.util.regex.Patternimport mons.cli.Bas

4、icParser;import mons.cli.CommandLine;import mons.cli.CommandLineParser;import mons.cli.HelpFormatter;import mons.cli.Option;import mons.cli.Options;個(gè)人收集整理 勿做商業(yè)用途import mons.cli.ParseException; public class DomainPostProcessor private final static String IMPORT_ORDERBY = importjavax.persistence.Order

5、By;n; 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí) public static void main(String args) DomainPostProcessor dpp = new DomainPostProcessor(); 僅用于個(gè)人學(xué)習(xí)文檔收集自網(wǎng)絡(luò),dpp.run(args);private void run(String args) Options opts = new Options();opts.addOption(h, false, Print help for this command line tool); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)opts.addOption(s, tr

6、ue, Java-Source-File-Path); 僅用于個(gè)人學(xué)習(xí)文檔收集自網(wǎng)絡(luò),opts.addOption(c,true,class to remove mappedby,the format like classA,mappedbyB,mappedbyC;classD,mappedbyE); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí) Option opt = new Option(o, true,collection to add orderby,the format lib文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)classA,relationClassB,OrderBy value);opt.setA

7、rgs(Option.UNLIMITED_VALUES);opts.addOption(opt);CommandLineParser parser = new BasicParser(); CommandLine cl = null;try cl = parser.parse(opts, args); catch (ParseException e) / TODO Auto-generated catch block e.printStackTrace();if (cl.hasOption(h) HelpFormatter f = new HelpFormatter(); f.printHel

8、p(OptionsTip, opts); else if (cl.hasOption(s) if (cl.hasOption(c) removeMappedBy(cl);if (cl.hasOption(o) addOrderBy(cl); else HelpFormatter f = new HelpFormatter();個(gè)人收集整理 勿做商業(yè)用途f.printHelp(OptionsTip, opts);private void addOrderBy(CommandLine cl) String srcPath = cl.getOptionValue(s);String targets

9、= cl.getOptionValues(o);for (String target : targets) String tmp = target.split(;);File srcFile = new File(srcPath + / + tmp0 + .java);文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)String srcStr = readClassFile(srcFile);srcStr = orderByPostProcessor(srcStr, tmp1, tmp2.replaceAll( 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí) _, );File distFile = new File(srcP

10、ath + /_ + tmp0 + .java); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)saveClassFile(srcStr, distFile); srcFile.delete();distFile.renameTo(srcFile);private String readClassFile(File srcFile) BufferedReader in = null; try in = new BufferedReader(new FileReader(srcFile); catch (FileNotFoundException e) / TODO Auto-generated catch

11、block e.printStackTrace();String s;StringBuilder sb = new StringBuilder(); try while (s = in.readLine() != null) sb.append(s).append(n);in.close(); catch (IOException e) / TODO Auto-generated catch block e.printStackTrace(); return sb.toString();文檔收集自網(wǎng)private void saveClassFile(String srcStr, File d

12、istFile) 絡(luò),僅用于個(gè)人學(xué)習(xí)PrintWriter out = null;個(gè)人收集整理 勿做商業(yè)用途try out = new PrintWriter(distFile); catch (FileNotFoundException e) / TODO Auto-generated catch block e.printStackTrace();out.print(srcStr);out.flush();out.close();private void removeMappedBy(CommandLine cl) String srcPath = cl.getOptionValue(s)

13、;文檔收集自網(wǎng)絡(luò),String groups = cl.getOptionValue(c).split(;); 僅用于個(gè)人學(xué)習(xí)for (String g : groups) String classes = g.split(,);File srcFile = new File(srcPath + / + classes0 + .java); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)String srcStr = readClassFile(srcFile);for (int i = 1; i classes.length; i+) srcStr = mappedByPostProcessor(srcSt

14、r, classesi);文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)File distFile = new File(srcPath + /_ + classes0 + .java); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)saveClassFile(srcStr, distFile); srcFile.delete();distFile.renameTo(srcFile);private String mappedByPostProcessor(String srcStr, String className) 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)StringBuilder distStr = new StringBu

15、ilder();int lastpostion = 0; / 表達(dá)式對(duì)象Pattern p = Ppile(ManyToMany(.+)(, mappedBy=.+)()ns*public .* get + className+ e?s()s)$,Pattern.MULTILINE);/ 創(chuàng)建 Matcher 對(duì)象 Matcher m = p.matcher(srcStr); while (m.find() 個(gè)人收集整理 勿做商業(yè)用途distStr.append(srcStr.substring(lastpostion, m.start(); 檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)S

16、tring beginPart = m.group(1);String endPart = m.group(3); distStr.append(beginPart).append(endPart); lastpostion = m.end(); distStr.append(srcStr.substring(lastpostion, 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)return distStr.toString();private String orderByPostProcessor(String srcStr, 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)String orderByValue) Str

17、ingBuilder tmpSB = new StringBuilder();StringBuilder distStr = new StringBuilder();int lastpostion = 0;/ 表達(dá)式對(duì)象Pattern p = Ppile( (?:One|Many)ToMany(?:.*)n)(s+publicsList), Pattern.MULTILINE);/ 創(chuàng)建 Matcher 對(duì)象Matcher m = p.matcher(srcStr); while (m.find() tmpSB.append(srcStr.substring(lastpostion, 集自網(wǎng)絡(luò)

18、,僅用于個(gè)人學(xué)習(xí)String beginPart = m.group(1); String endPart = m.group(2);tmpSB.append(beginPart).append(OrderBy().append(orderByValue) 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí).append()n).append(endPart); lastpostion = m.end(); tmpSB.append(srcStr.substring(lastpostion, srcStr.length(); 檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)p = Ppile(?:imports.*;n)+), Pa

19、ttern.MULTILINE); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)String tmpStr = tmpSB.toString();m = p.matcher(tmpStr); lastpostion = 0;while (m.find() distStr.append(tmpStr.substring(lastpostion, m.start();srcStr.length();String className,m.start(); 文檔收檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)個(gè)人收集整理 勿做商業(yè)用途String beginPart = m.group(1); distStr.append(begi

20、nPart);if (beginPart.indexOf(IMPORT_ORDERBY) = -1) distStr.append(IMPORT_ORDERBY);lastpostion = m.end(); distStr.append(tmpStr.substring(lastpostion, tmpStr.length(); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)return distStr.toString(); 安全設(shè)置類: package org.scbit.tissuebank.utils;public class RandomUtils final static String strT

21、able = 0123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnpqrstuvwxyz ; 文 檔 收 集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)public static String getRandomString( int intLength) 文檔收集自網(wǎng)絡(luò), 僅用于個(gè)人學(xué)習(xí)String retStr;int len =strTable .length();boolean bDone = true ;do retStr = ;int count = 0;for ( int i = 0; i intLength; i+) double dblR = Math.

22、random () * len; int intR = (int ) Math. floor (dblR);char c = strTable .charAt(intR); if ( 0 = c) & (c = 2) bDone = false ; while (bDone);return retStr;package erceptor;import javax.servlet.http.HttpServletRequest;import erceptor.Fault;個(gè)人收集整理 勿做商業(yè)用途impor

23、t org.apache.cxf.message.Message;import org.apache.cxf.phase.AbstractPhaseInterceptor;于個(gè)人學(xué)習(xí)import org.apache.cxf.phase.Phase;import org.apache.cxf.transport.http.AbstractHTTPDestination; 自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)import erceptor.LoginInterceptor; 自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)import org.springframework.st

24、ereotype.Component; Component(AuthenticationAndAuthorizationInterceptor) 用于個(gè)人學(xué)習(xí)public class AuthenticationAndAuthorizationInterceptor extends 集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)AbstractPhaseInterceptor public AuthenticationAndAuthorizationInterceptor() 僅用于個(gè)人學(xué)習(xí)super(Phase.PRE_PROTOCOL);public AuthenticationAndAuthorization

25、Interceptor(String s) 收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)super(Phase.PRE_PROTOCOL);Overridepublic void handleMessage(Message arg0) throws Fault 僅用于個(gè)人學(xué)習(xí)HttpServletRequest request = (HttpServletRequest) arg0 自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí).getContextualProperty(AbstractHTTPDestination.HTTP_REQUEST); 檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)Object user = request.getSess

26、ion().getAttribute(LoginInterceptor.USER_HANDLE);if (user = null)throw new RuntimeException(Invalid Authentication); 收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)異常處理類:package org.scbit.tissuebank.service.exception;public class UniquePropertyAlreadyExistException RuntimeException 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)public UniquePropertyAlreadyExistExc

27、eption() 文檔收集自網(wǎng)絡(luò),僅用文檔收集文檔收集文檔收集自網(wǎng)絡(luò),僅文檔收文檔收集自網(wǎng)絡(luò),文檔文檔收集自網(wǎng)絡(luò),文檔收集文文檔extends文檔public UniquePropertyAlreadyExistException(String message) 個(gè)人收集整理 勿做商業(yè)用途收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)super (message);public UniquePropertyAlreadyExistException(String property) 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)this (domain + . + property);public UniquePropertyA

28、lreadyExistException(StringThrowable cause) 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)super (message, cause);public UniquePropertyAlreadyExistException(String property, 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)Throwable cause) this (domain + . + property, cause);WebSerive 類:package org.scbit.tissuebank.ws;import java.util.List;import javax.jws.WebServ

29、ice;import org.scbit.tissuebank.domain.Icecontainer; WebServicepublic interface ISpaceManager List listIcecontainerInHouse(Integer houseId); 收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí) 空間 WebService 執(zhí)行類: package org.scbit.tissuebank.ws.impl;import java.util.List;import javax.annotation.Resource;import javax.jws.WebService;import

30、 javax.servlet.http.HttpServletRequest;import javax.xml.ws.WebServiceContext;import javax.xml.ws.handler.MessageContext;import org.apache.cxf.transport.http.AbstractHTTPDestination; 自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)import org.scbit.tissuebank.domain.Icecontainer; import org.scbit.tissuebank.domain.House;import org.scbit.

31、tissuebank.ws.ISpaceManager; WebService(endpointInterfaceorg.scbit.tissuebank.ws.ISpaceManager) 文檔收集自網(wǎng)絡(luò), public class SpaceManagerImpl implements ISpaceManager 僅用于個(gè)人學(xué)習(xí)domain, Stringmessage,domain, String文檔文檔收集僅用于個(gè)人學(xué)習(xí)文檔收集自網(wǎng)絡(luò),個(gè)人收集整理 勿做商業(yè)用途Resourceprivate WebServiceContext context;OverridelistIcecontai

32、nerInHouse(Integerpublic List houseId) 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí) /Icecontainer ice = new Icecontainer();System.out.println(&);MessageContext ctx = context.getMessageContext();文檔收集自HttpServletRequest request = (HttpServletRequest) ctx 網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí).get(AbstractHTTPDestination.HTTP_REQUEST);System.out.println(requ

33、est.getSession();/return Hello + text;House house = new House();return house.getIcecontainers();/return null;基本 DAO 類:package org.scbit.tissuebank.dao;import java.lang.reflect.ParameterizedType;import java.lang.reflect.Type;import java.util.List;import javax.persistence.EntityManager;import javax.pe

34、rsistence.PersistenceContext;import org.hibernate.Criteria;import org.hibernate.Session;import org.hibernate.criterion.DetachedCriteria;import org.hibernate.criterion.Projections;import org.hibernate.ejb.EntityManagerImpl;import org.scbit.tissuebank.dao.exception.EntityNotFoundException; 文檔收集自網(wǎng)絡(luò),僅用于

35、個(gè)人學(xué)習(xí)import org.springframework.transaction.annotation.Transactional; 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)Transactionalpublic class BaseDAO / T.classprivate Class entityClass;PersistenceContext(unitName = tissueBank)protected EntityManager em;SuppressWarnings(unchecked)public BaseDAO() Type type = getClass().getGenericSu

36、perclass();if (type instanceof ParameterizedType) ParameterizedType pt = (ParameterizedType) type;type = pt.getActualTypeArguments()0;個(gè)人收集整理 勿做商業(yè)用途entityClass = (Class) type;public void persist(T t) em.persist(t);public T merge(T t) return em.merge(t);public void remove(Object id) throws EntityNotFo

37、undException 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí) T t = find(id);if (t != null)em.remove(t);elsethrow new EntityNotFoundException(id.toString();public T find(Object id) return em.find(entityClass, id);/* 使用 Hql 查詢地地分頁查詢類 .* 支持執(zhí)行 Count 查詢?nèi)〉每傆涗洍l數(shù)* 用戶在 web 層構(gòu)造查詢條件 detachedCriteria ,和可選地 startIndex ,調(diào)用業(yè)務(wù) bean 地相應(yīng) findByCrit

38、eria 方法,返回一個(gè) PaginationSupport 地實(shí)例 ps.文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué) 習(xí)* ps.getItems() 得到已分頁好地結(jié)果集* ps.getIndexes() 得到分頁索引地?cái)?shù)組* ps.getTotalCount() 得到總結(jié)果數(shù)* ps.getStartIndex() 當(dāng)前分頁索引* ps.getNextIndex() 下一頁索引* ps.getPreviousIndex() 上一頁索引*/SuppressWarnings(unchecked)public PaginationSupport findPageByCriteria(final Detach

39、edCriteria detachedCriteria, final int pageSize, 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人 學(xué)習(xí)final int startIndex) Session session;try session = (Session) em.getDelegate(); catch (ClassCastException e) throw new NoHibernateSupportException(The Method findPageByCriteria need hibernate support.); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)個(gè)人收集整理 勿做商業(yè)用途Crit

40、eria criteria = detachedCriteria.getExecutableCriteria(session); 文檔收集自網(wǎng)絡(luò), 僅用于個(gè) 人學(xué)習(xí)/* 以查詢 getCountByCriteria 地形式獲取 totalCount 地值*/int totalCount = (Integer) criteria.setProjection( 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí) Projections.rowCount().uniqueResult().intValue(); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué) 習(xí)criteria.setProjection(null);List item

41、s = criteria.setFirstResult(startIndex).setMaxResults( 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人 學(xué)習(xí)pageSize).list();PaginationSupport ps = new PaginationSupport(items, totalCount, 文檔收集自網(wǎng)絡(luò), 僅用于個(gè)人學(xué)習(xí)pageSize, startIndex);return ps;public PaginationSupport findPageByCriteria(final DetachedCriteria detachedCriteria) return findPage

42、ByCriteria(detachedCriteria, PaginationSupport.PAGESIZE, 文檔收集自網(wǎng)絡(luò), 僅用于個(gè)人學(xué)習(xí)0);public PaginationSupport findPageByCriteria(final DetachedCriteria detachedCriteria, final int startIndex) 文檔收集自網(wǎng)絡(luò), 僅用于個(gè) 人學(xué)習(xí)return findPageByCriteria(detachedCriteria, PaginationSupport.PAGESIZE, 文檔收集自網(wǎng)絡(luò), 僅用于個(gè)人學(xué)習(xí)startIndex);

43、SuppressWarnings(unchecked)public List findAllByCriteria(final DetachedCriteria detachedCriteria) 文檔收集自網(wǎng)絡(luò), 僅用于 個(gè)人學(xué)習(xí)if (em instanceof EntityManagerImpl) Criteria criteria = detachedCriteria.getExecutableCriteria(EntityManagerImpl) em) .getSession();return criteria.list(); elsethrow new NoHibernateSup

44、portException(The Method findAllByCriteria need hibernate support.); 文檔收集自網(wǎng)絡(luò), 僅用于個(gè)人學(xué)習(xí)個(gè)人收集整理 勿做商業(yè)用途public int getCountByCriteria(final DetachedCriteria detachedCriteria) 文檔收集自網(wǎng)絡(luò), 僅用于個(gè) 人學(xué)習(xí)Session session;try session = (Session) em.getDelegate(); catch (ClassCastException e) throw new NoHibernateSuppor

45、tException(The Method findPageByCriteria need hibernate support.); 文檔收集自網(wǎng) 絡(luò),僅用于個(gè)人學(xué)習(xí)Criteria criteria = detachedCriteria.getExecutableCriteria(session); 文檔收集自網(wǎng)絡(luò), 僅用于個(gè) 人學(xué)習(xí)Integer count = (Integer) criteria .setProjection(Projections.rowCount().uniqueResult(); 文檔收集自網(wǎng)絡(luò),僅用于個(gè) 人學(xué)習(xí)return Value(); p

46、ackage org.scbit.tissuebank.utils; import java.io.BufferedReader;import java.io.File;import java.io.FileNotFoundException;import java.io.FileReader;import java.io.IOException;import java.io.PrintWriter; import java.util.regex.Matcher;import java.util.regex.Pattern;import mons.cli.BasicParser;import

47、mons.cli.CommandLine;import mons.cli.CommandLineParser;import mons.cli.HelpFormatter; import mons.cli.Option;import mons.cli.Options;import mons.cli.ParseException; public class DomainPostProcessor private final static String IMPORT_ORDERBY = import javax.persistence.OrderBy;n; 文檔收集 自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)publi

48、c static void main(String args) DomainPostProcessor dpp = new DomainPostProcessor(); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí) dpp.run(args);private void run(String args) Options opts = new Options();opts.addOption(h, false, Print help for this command line tool); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人收集整理 勿做商業(yè)用途個(gè)人學(xué)習(xí)opts.addOption(s, true, Java-Sour

49、ce-File-Path); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí) opts.addOption(c,true,class to remove mappedby,the format like classA,mappedbyB,mappedbyC;classD,mappedbyE);文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)Option opt = new Option(o, true,collection to add orderby,the format lib classA,relationClassB,OrderBy value); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí)opt.setArgs(Option.U

50、NLIMITED_VALUES);opts.addOption(opt);CommandLineParser parser = new BasicParser();CommandLine cl = null;try cl = parser.parse(opts, args); catch (ParseException e) / TODO Auto-generated catch block e.printStackTrace();if (cl.hasOption(h) HelpFormatter f = new HelpFormatter();f.printHelp(OptionsTip,

51、opts); else if (cl.hasOption(s) if (cl.hasOption(c) removeMappedBy(cl);if (cl.hasOption(o)addOrderBy(cl); else HelpFormatter f = new HelpFormatter();f.printHelp(OptionsTip, opts);private void addOrderBy(CommandLine cl) String srcPath = cl.getOptionValue(s);String targets = cl.getOptionValues(o);for

52、(String target : targets) String tmp = target.split(;);File srcFile = new File(srcPath + / + tmp0 + .java); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué)習(xí) String srcStr = readClassFile(srcFile);srcStr = orderByPostProcessor(srcStr, tmp1, tmp2.replaceAll( 文檔收集自網(wǎng)絡(luò),僅用 于個(gè)人學(xué)習(xí));個(gè)人收集整理 勿做商業(yè)用途File distFile = new File(srcPath + /_ + tmp0 + .java); 文檔收集自網(wǎng)絡(luò),僅用于個(gè)人學(xué) 習(xí)saveClassFile(srcStr, distFile);srcFile.delete(); distFile.renameTo(srcFile);private String readClassFile(File srcFile) BufferedReader in = null;try in = new BufferedReader(new FileRe

溫馨提示

  • 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
  • 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
  • 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
  • 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
  • 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
  • 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
  • 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。

評(píng)論

0/150

提交評(píng)論