13
13
* @create March 10, 2006
14
14
*******/
15
15
16
- if ( window [ "Clazz" ] == null || window [ "Clazz" ] . unloadClass == null ) {
16
+ if ( window [ "Clazz" ] != null && window [ "Clazz" ] . unloadClass == null ) {
17
17
/**
18
18
* Once ClassExt.js is part of Class.js.
19
19
* In order to make the Class.js as small as possible, part of its content
@@ -286,7 +286,7 @@ Clazz.defineEnumConstant = function (clazzEnum, enumName, enumOrdinal, initialPa
286
286
* @return the created Array object
287
287
*/
288
288
/* public */
289
- Clazz . newArray = function ( ) {
289
+ Clazz . newArray = function ( ) {
290
290
var args = arguments ;
291
291
if ( arguments . length == 1 ) {
292
292
if ( arguments [ 0 ] instanceof Array ) {
@@ -325,6 +325,8 @@ Clazz.newArray = function () {
325
325
}
326
326
} ;
327
327
328
+ Clazz . newIntArray = Clazz . newFloatArray = Clazz . newDoubleArray = Clazz . newLongArray = Clazz . newShortArray = Clazz . newByteArray = Clazz . newCharArray = Clazz . newBooleanArray = Clazz . newArray ;
329
+
328
330
/**
329
331
* Make the RunnableCompatiability instance as a JavaScript function.
330
332
*
@@ -512,9 +514,11 @@ Clazz.checkPrivateMethod = function (args) {
512
514
}
513
515
return null ;
514
516
} ;
515
- var $fz = null ; // for private method declaration
517
+
518
+ $fz = null ; // for private method declaration
516
519
//var cla$$ = null;
517
- var c$ = null ;
520
+ c$ = null ;
521
+
518
522
/*-# cla$$$tack -> cst #-*/
519
523
Clazz . cla$$$tack = new Array ( ) ;
520
524
Clazz . pu$h = function ( ) {
@@ -825,7 +829,42 @@ Clazz.int0RightShift = function (n, o) { // 64bit
825
829
} ;
826
830
827
831
// Compress the common public API method in shorter name
828
- $_L = Clazz . load ; $_W = Clazz . declareAnonymous ; $_T = Clazz . declareType ; $_J = Clazz . declarePackage ; $_C = Clazz . decorateAsClass ; $_Z = Clazz . instantialize ; $_I = Clazz . declareInterface ; $_D = Clazz . isClassDefined ; $_H = Clazz . pu$h ; $_P = Clazz . p0p ; $_B = Clazz . prepareCallback ; $_N = Clazz . innerTypeInstance ; $_K = Clazz . makeConstructor ; $_U = Clazz . superCall ; $_R = Clazz . superConstructor ; $_M = Clazz . defineMethod ; $_V = Clazz . overrideMethod ; $_S = Clazz . defineStatics ; $_E = Clazz . defineEnumConstant ; $_F = Clazz . cloneFinals ; $_Y = Clazz . prepareFields ; $_A = Clazz . newArray ; $_O = Clazz . instanceOf ; $_G = Clazz . inheritArgs ; $_X = Clazz . checkPrivateMethod ; $_Q = Clazz . makeFunction ; $_s = Clazz . registerSerializableFields ;
832
+ $_L = Clazz . load ;
833
+ $_W = Clazz . declareAnonymous ;
834
+ $_T = Clazz . declareType ;
835
+ $_J = Clazz . declarePackage ;
836
+ $_C = Clazz . decorateAsClass ;
837
+ $_Z = Clazz . instantialize ;
838
+ $_I = Clazz . declareInterface ;
839
+ $_D = Clazz . isClassDefined ;
840
+ $_H = Clazz . pu$h ;
841
+ $_P = Clazz . p0p ;
842
+ $_B = Clazz . prepareCallback ;
843
+ $_N = Clazz . innerTypeInstance ;
844
+ $_K = Clazz . makeConstructor ;
845
+ $_U = Clazz . superCall ;
846
+ $_R = Clazz . superConstructor ;
847
+ $_M = Clazz . defineMethod ;
848
+ $_V = Clazz . overrideMethod ;
849
+ $_S = Clazz . defineStatics ;
850
+ $_E = Clazz . defineEnumConstant ;
851
+ $_F = Clazz . cloneFinals ;
852
+ $_Y = Clazz . prepareFields ;
853
+ $_A = Clazz . newArray ;
854
+ $_AI = Clazz . newIntArray ;
855
+ $_AF = Clazz . newFloatArray ;
856
+ $_AD = Clazz . newDoubleArray ;
857
+ $_AL = Clazz . newLongArray ;
858
+ $_AS = Clazz . newShortArray ;
859
+ $_AB = Clazz . newByteArray ;
860
+ $_AC = Clazz . newCharArray ;
861
+ $_Ab = Clazz . newBooleanArray ;
862
+ //$_AX=Clazz.newStringArray;
863
+ $_O = Clazz . instanceOf ;
864
+ $_G = Clazz . inheritArgs ;
865
+ $_X = Clazz . checkPrivateMethod ;
866
+ $_Q = Clazz . makeFunction ;
867
+ $_s = Clazz . registerSerializableFields ;
829
868
830
869
831
870
var reflect = Clazz . declarePackage ( "java.lang.reflect" ) ;
@@ -901,7 +940,7 @@ Clazz.innerFunctions.newInstance = function () {
901
940
} ;
902
941
903
942
//Object.newInstance = Clazz.innerFunctions.newInstance;
904
- {
943
+ ( function ( ) { // BH added wrapper here
905
944
var inF = Clazz . innerFunctionNames ;
906
945
for ( var i = 0 ; i < inF . length ; i ++ ) {
907
946
JavaObject [ inF [ i ] ] = Clazz . innerFunctions [ inF [ i ] ] ;
@@ -910,7 +949,7 @@ Clazz.innerFunctions.newInstance = function () {
910
949
Array [ "isArray" ] = function ( ) {
911
950
return true ;
912
951
} ;
913
- }
952
+ } ) ( ) ;
914
953
915
954
/* public */
916
955
Clazz . forName = function ( clazzName ) {
0 commit comments