1 Clazz.load(null,"java.io.ObjectStreamField",["java.lang.Boolean","$.Byte","$.Character","$.Double","$.Float","$.Long","$.NullPointerException","$.Short","java.util.Arrays"],function(){
2 c$=Clazz.decorateAsClass(function(){
8 this.isDeserialized=false;
9 Clazz.instantialize(this,arguments);
10 },java.io,"ObjectStreamField",null,Comparable);
11 Clazz.makeConstructor(c$,
13 if(name==null||cl==null){
14 throw new NullPointerException();
18 Clazz.makeConstructor(c$,
19 function(name,cl,unshared){
20 if(name==null||cl==null){
21 throw new NullPointerException();
24 this.unshared=unshared;
26 Clazz.makeConstructor(c$,
27 function(signature,name){
29 throw new NullPointerException();
31 this.typeString=signature.$replace('.', '/');
32 this.isDeserialized=true;
34 Clazz.overrideMethod(c$,"compareTo",
37 var thisPrimitive=this.isPrimitive();
38 var fPrimitive=f.isPrimitive();
39 if(thisPrimitive!=fPrimitive){
40 return thisPrimitive?-1:1;
41 }return this.getName().compareTo(f.getName());
43 Clazz.overrideMethod(c$,"equals",
45 return this.compareTo(arg0)==0;
47 Clazz.overrideMethod(c$,"hashCode",
49 return this.getName().hashCode();
51 Clazz.defineMethod(c$,"getName",
55 Clazz.defineMethod(c$,"getOffset",
59 Clazz.defineMethod(c$,"getTypeInternal",
62 },$fz.isPrivate=true,$fz));
63 Clazz.defineMethod(c$,"getType",
65 var cl=this.getTypeInternal();
66 if(this.isDeserialized&&!cl.isPrimitive()){
70 Clazz.defineMethod(c$,"getTypeCode",
72 var t=this.getTypeInternal();
77 }if(t===Character.TYPE){
81 }if(t===Boolean.TYPE){
93 Clazz.defineMethod(c$,"getTypeString",
95 if(this.isPrimitive()){
97 }if(this.typeString==null){
98 var t=this.getTypeInternal();
99 var typeName=t.getName().$replace('.', '/');
100 var str=(t.isArray())?typeName:("L"+typeName+';');
101 this.typeString=str.intern();
102 }return this.typeString;
104 Clazz.defineMethod(c$,"isPrimitive",
106 var t=this.getTypeInternal();
107 return t!=null&&t.isPrimitive();
109 Clazz.defineMethod(c$,"setOffset",
111 this.offset=newValue;
113 Clazz.overrideMethod(c$,"toString",
115 return this.getClass().getName()+'(' + this.getName () + ':' + this.getTypeInternal () + ')';
117 c$.sortFields=Clazz.defineMethod(c$,"sortFields",
120 var fieldDescComparator=((Clazz.isClassDefined("java.io.ObjectStreamField$1")?0:java.io.ObjectStreamField.$ObjectStreamField$1$()),Clazz.innerTypeInstance(java.io.ObjectStreamField$1,this,null));
121 java.util.Arrays.sort(fields,fieldDescComparator);
123 Clazz.defineMethod(c$,"resolve",
125 if(this.typeString.length==1){
126 switch(this.typeString.charAt(0)){
128 this.type=Integer.TYPE;
134 this.type=Character.TYPE;
137 this.type=Short.TYPE;
140 this.type=Boolean.TYPE;
146 this.type=Float.TYPE;
149 this.type=Double.TYPE;
152 }var className=this.typeString.$replace('/', '.');
153 if((className.charAt(0)).charCodeAt(0)==('L').charCodeAt(0)){
154 className=className.substring(1,className.length-1);
156 var cl=Clazz._4Name(className,false,loader);
159 if(Clazz.instanceOf(e,ClassNotFoundException)){
165 Clazz.defineMethod(c$,"isUnshared",
167 return this.unshared;
169 c$.$ObjectStreamField$1$=function(){
171 c$=Clazz.declareAnonymous(java.io,"ObjectStreamField$1",null,java.util.Comparator);
172 Clazz.overrideMethod(c$,"compare",
174 return f1.compareTo(f2);
175 },"java.io.ObjectStreamField,java.io.ObjectStreamField");