1313 * @create March 10, 2006
1414 *******/
1515
16- if ( window [ "Clazz" ] == null || window [ "Clazz" ] . unloadClass == null ) {
16+ if ( window [ "Clazz" ] != null && window [ "Clazz" ] . unloadClass == null ) {
1717/**
1818 * Once ClassExt.js is part of Class.js.
1919 * 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
286286 * @return the created Array object
287287 */
288288/* public */
289- Clazz . newArray = function ( ) {
289+ Clazz . newArray = function ( ) {
290290 var args = arguments ;
291291 if ( arguments . length == 1 ) {
292292 if ( arguments [ 0 ] instanceof Array ) {
@@ -325,6 +325,8 @@ Clazz.newArray = function () {
325325 }
326326} ;
327327
328+ Clazz . newIntArray = Clazz . newFloatArray = Clazz . newDoubleArray = Clazz . newLongArray = Clazz . newShortArray = Clazz . newByteArray = Clazz . newCharArray = Clazz . newBooleanArray = Clazz . newArray ;
329+
328330/**
329331 * Make the RunnableCompatiability instance as a JavaScript function.
330332 *
@@ -512,9 +514,11 @@ Clazz.checkPrivateMethod = function (args) {
512514 }
513515 return null ;
514516} ;
515- var $fz = null ; // for private method declaration
517+
518+ $fz = null ; // for private method declaration
516519//var cla$$ = null;
517- var c$ = null ;
520+ c$ = null ;
521+
518522/*-# cla$$$tack -> cst #-*/
519523Clazz . cla$$$tack = new Array ( ) ;
520524Clazz . pu$h = function ( ) {
@@ -825,7 +829,42 @@ Clazz.int0RightShift = function (n, o) { // 64bit
825829} ;
826830
827831// 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 ;
829868
830869
831870var reflect = Clazz . declarePackage ( "java.lang.reflect" ) ;
@@ -901,7 +940,7 @@ Clazz.innerFunctions.newInstance = function () {
901940} ;
902941
903942//Object.newInstance = Clazz.innerFunctions.newInstance;
904- {
943+ ( function ( ) { // BH added wrapper here
905944 var inF = Clazz . innerFunctionNames ;
906945 for ( var i = 0 ; i < inF . length ; i ++ ) {
907946 JavaObject [ inF [ i ] ] = Clazz . innerFunctions [ inF [ i ] ] ;
@@ -910,7 +949,7 @@ Clazz.innerFunctions.newInstance = function () {
910949 Array [ "isArray" ] = function ( ) {
911950 return true ;
912951 } ;
913- }
952+ } ) ( ) ;
914953
915954/* public */
916955Clazz . forName = function ( clazzName ) {
0 commit comments