Produced by Araxis Merge on 9/25/2018 2:13:04 PM Central Daylight Time. See www.araxis.com for information about Merge. This report uses XHTML and CSS2, and is best viewed with a modern standards-compliant browser. For optimum results when printing this report, use landscape orientation and enable printing of background images and colours in your browser.
# | Location | File | Last Modified |
---|---|---|---|
1 | build 3.zip\build 3\MHLTH_YS_137_Source\JavaScript\resources\javaJDF-1.8.0\src\com\sun\org\apache\bcel\internal\util | ClassLoaderRepository.java | Mon Jan 22 14:46:44 2018 UTC |
2 | build 3.zip\build 3\MHLTH_YS_137_Source\JavaScript\resources\javaJDF-1.8.0\src\com\sun\org\apache\bcel\internal\util | ClassLoaderRepository.java | Wed Sep 12 16:31:01 2018 UTC |
Description | Between Files 1 and 2 |
|
---|---|---|
Text Blocks | Lines | |
Unchanged | 2 | 312 |
Changed | 1 | 2 |
Inserted | 0 | 0 |
Removed | 0 | 0 |
Whitespace | |
---|---|
Character case | Differences in character case are significant |
Line endings | Differences in line endings (CR and LF characters) are ignored |
CR/LF characters | Not shown in the comparison detail |
No regular expressions were active.
1 | /* | |
2 | * reserve d comment block | |
3 | * DO NOT REMOVE OR ALTER! | |
4 | */ | |
5 | package co m.sun.org. apache.bce l.internal .util; | |
6 | ||
7 | /* ======= ========== ========== ========== ========== ========== ========== = | |
8 | * The Apa che Softwa re License , Version 1.1 | |
9 | * | |
10 | * Copyrig ht (c) 200 1 The Apac he Softwar e Foundati on. All r ights | |
11 | * reserve d. | |
12 | * | |
13 | * Redistr ibution an d use in s ource and binary for ms, with o r without | |
14 | * modific ation, are permitted provided that the f ollowing c onditions | |
15 | * are met : | |
16 | * | |
17 | * 1. Redi stribution s of sourc e code mus t retain t he above c opyright | |
18 | * noti ce, this l ist of con ditions an d the foll owing disc laimer. | |
19 | * | |
20 | * 2. Redi stribution s in binar y form mus t reproduc e the abov e copyrigh t | |
21 | * noti ce, this l ist of con ditions an d the foll owing disc laimer in | |
22 | * the documentat ion and/or other mat erials pro vided with the | |
23 | * dist ribution. | |
24 | * | |
25 | * 3. The end-user d ocumentati on include d with the redistrib ution, | |
26 | * if a ny, must i nclude the following acknowled gment: | |
27 | * " This produ ct include s software developed by the | |
28 | * Apache Sof tware Foun dation (ht tp://www.a pache.org/ )." | |
29 | * Alte rnately, t his acknow ledgment m ay appear in the sof tware itse lf, | |
30 | * if a nd whereve r such thi rd-party a cknowledgm ents norma lly appear . | |
31 | * | |
32 | * 4. The names "Apa che" and " Apache Sof tware Foun dation" an d | |
33 | * "Apa che BCEL" must not b e used to endorse or promote p roducts | |
34 | * deri ved from t his softwa re without prior wri tten permi ssion. For | |
35 | * writ ten permis sion, plea se contact apache@ap ache.org. | |
36 | * | |
37 | * 5. Prod ucts deriv ed from th is softwar e may not be called "Apache", | |
38 | * "Apa che BCEL", nor may " Apache" ap pear in th eir name, without | |
39 | * prio r written permission of the Ap ache Softw are Founda tion. | |
40 | * | |
41 | * THIS SO FTWARE IS PROVIDED ` `AS IS'' A ND ANY EXP RESSED OR IMPLIED | |
42 | * WARRANT IES, INCLU DING, BUT NOT LIMITE D TO, THE IMPLIED WA RRANTIES | |
43 | * OF MERC HANTABILIT Y AND FITN ESS FOR A PARTICULAR PURPOSE A RE | |
44 | * DISCLAI MED. IN N O EVENT SH ALL THE AP ACHE SOFTW ARE FOUNDA TION OR | |
45 | * ITS CON TRIBUTORS BE LIABLE FOR ANY DI RECT, INDI RECT, INCI DENTAL, | |
46 | * SPECIAL , EXEMPLAR Y, OR CONS EQUENTIAL DAMAGES (I NCLUDING, BUT NOT | |
47 | * LIMITED TO, PROCU REMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | |
48 | * USE, DA TA, OR PRO FITS; OR B USINESS IN TERRUPTION ) HOWEVER CAUSED AND | |
49 | * ON ANY THEORY OF LIABILITY, WHETHER I N CONTRACT , STRICT L IABILITY, | |
50 | * OR TORT (INCLUDIN G NEGLIGEN CE OR OTHE RWISE) ARI SING IN AN Y WAY OUT | |
51 | * OF THE USE OF THI S SOFTWARE , EVEN IF ADVISED OF THE POSSI BILITY OF | |
52 | * SUCH DA MAGE. | |
53 | * ======= ========== ========== ========== ========== ========== ========== = | |
54 | * | |
55 | * This so ftware con sists of v oluntary c ontributio ns made by many | |
56 | * individ uals on be half of th e Apache S oftware Fo undation. For more | |
57 | * informa tion on th e Apache S oftware Fo undation, please see | |
58 | * <http:/ /www.apach e.org/>. | |
59 | */ | |
60 | ||
61 | import jav a.io.*; | |
62 | ||
63 | import jav a.util.Map ; | |
64 | import jav a.util.Has hMap; | |
65 | ||
66 | import com .sun.org.a pache.bcel .internal. classfile. *; | |
67 | ||
68 | /** | |
69 | * The rep ository ma intains in formation about whic h classes have | |
70 | * been lo aded. | |
71 | * | |
72 | * It load s its data from the ClassLoade r implemen tation | |
73 | * passed into its c onstructor . | |
74 | * | |
75 | * @see co m.sun.org. apache.bce l.internal .Repositor y | |
76 | * | |
77 | * @author <A HREF=" mailto:mar kus.dahm@b erlin.de"> M. Dahm</A > | |
78 | * @author David Dix on-Peugh | |
79 | */ | |
80 | public cla ss ClassLo aderReposi tory | |
81 | implemen ts Reposit ory | |
82 | { | |
83 | private java.lang. ClassLoade r loader; | |
84 | private HashMap lo adedClasse s = | |
85 | new HashMa p(); // CL ASSNAME X JA DNS SS | |
86 | ||
87 | public C lassLoader Repository ( java.lan g.ClassLoa der loader ) { | |
88 | this.l oader = lo ader; | |
89 | } | |
90 | ||
91 | /** | |
92 | * Store a new Jav aClass int o this Rep ository. | |
93 | */ | |
94 | public v oid storeC lass( Java Class claz z ) { | |
95 | loaded Classes.pu t( clazz.g etClassNam e(), | |
96 | clazz ) ; | |
97 | clazz. setReposit ory( this ); | |
98 | } | |
99 | ||
100 | /** | |
101 | * Remov e class fr om reposit ory | |
102 | */ | |
103 | public v oid remove Class(Java Class claz z) { | |
104 | loaded Classes.re move(clazz .getClassN ame()); | |
105 | } | |
106 | ||
107 | /** | |
108 | * Find an already defined J avaClass. | |
109 | */ | |
110 | public J avaClass f indClass( String cla ssName ) { | |
111 | if ( l oadedClass es.contain sKey( clas sName )) { | |
112 | retu rn (JavaCl ass) loade dClasses.g et( classN ame ); | |
113 | } else { | |
114 | retu rn null; | |
115 | } | |
116 | } | |
117 | ||
118 | /** | |
119 | * Looku p a JavaCl ass object from the Class Name provided. | |
120 | */ | |
121 | public J avaClass l oadClass( String cla ssName ) | |
122 | throws ClassNotF oundExcept ion | |
123 | { | |
124 | String classFile = classNa me.replace ('.', '/') ; | |
125 | ||
126 | JavaCl ass RC = f indClass( className ); | |
127 | if (RC != null) { return R C; } | |
128 | ||
129 | try { | |
130 | Inpu tStream is = | |
131 | lo ader.getRe sourceAsSt ream( clas sFile + ". class" ); | |
132 | ||
133 | if(i s == null) { | |
134 | th row new Cl assNotFoun dException (className + " not f ound."); | |
135 | } | |
136 | ||
137 | Clas sParser pa rser = new ClassPars er( is, cl assName ); | |
138 | RC = parser.pa rse(); | |
139 | ||
140 | stor eClass( RC ); | |
141 | ||
142 | retu rn RC; | |
143 | } catc h (IOExcep tion e) { | |
144 | thro w new Clas sNotFoundE xception( e.toString () ); | |
145 | } | |
146 | } | |
147 | ||
148 | public J avaClass l oadClass(C lass clazz ) throws C lassNotFou ndExceptio n { | |
149 | return loadClass (clazz.get Name()); | |
150 | } | |
151 | ||
152 | /** Clea r all entr ies from c ache. | |
153 | */ | |
154 | public v oid clear( ) { | |
155 | loaded Classes.cl ear(); | |
156 | } | |
157 | } |
Araxis Merge (but not the data content of this report) is Copyright © 1993-2016 Araxis Ltd (www.araxis.com). All rights reserved.