File size: 4,479 Bytes
233f6d4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
Clazz.load(null,"java.io.ObjectStreamField",["java.lang.Boolean","$.Byte","$.Character","$.Double","$.Float","$.Long","$.NullPointerException","$.Short","java.util.Arrays"],function(){
c$=Clazz.decorateAsClass(function(){
this.name=null;
this.type=null;
this.offset=0;
this.typeString=null;
this.unshared=false;
this.isDeserialized=false;
Clazz.instantialize(this,arguments);
},java.io,"ObjectStreamField",null,Comparable);
Clazz.makeConstructor(c$,
function(name,cl){
if(name==null||cl==null){
throw new NullPointerException();
}this.name=name;
this.type=cl;
},"~S,Class");
Clazz.makeConstructor(c$,
function(name,cl,unshared){
if(name==null||cl==null){
throw new NullPointerException();
}this.name=name;
this.type=cl;
this.unshared=unshared;
},"~S,Class,~B");
Clazz.makeConstructor(c$,
function(signature,name){
if(name==null){
throw new NullPointerException();
}this.name=name;
this.typeString=signature.$replace('.', '/');
this.isDeserialized=true;
},"~S,~S");
Clazz.overrideMethod(c$,"compareTo",
function(o){
var f=o;
var thisPrimitive=this.isPrimitive();
var fPrimitive=f.isPrimitive();
if(thisPrimitive!=fPrimitive){
return thisPrimitive?-1:1;
}return this.getName().compareTo(f.getName());
},"~O");
Clazz.overrideMethod(c$,"equals",
function(arg0){
return this.compareTo(arg0)==0;
},"~O");
Clazz.overrideMethod(c$,"hashCode",
function(){
return this.getName().hashCode();
});
Clazz.defineMethod(c$,"getName",
function(){
return this.name;
});
Clazz.defineMethod(c$,"getOffset",
function(){
return this.offset;
});
Clazz.defineMethod(c$,"getTypeInternal",
($fz=function(){
return this.type;
},$fz.isPrivate=true,$fz));
Clazz.defineMethod(c$,"getType",
function(){
var cl=this.getTypeInternal();
if(this.isDeserialized&&!cl.isPrimitive()){
return Clazz._O;
}return cl;
});
Clazz.defineMethod(c$,"getTypeCode",
function(){
var t=this.getTypeInternal();
if(t===Integer.TYPE){
return'I';
}if(t===Byte.TYPE){
return'B';
}if(t===Character.TYPE){
return'C';
}if(t===Short.TYPE){
return'S';
}if(t===Boolean.TYPE){
return'Z';
}if(t===Long.TYPE){
return'J';
}if(t===Float.TYPE){
return'F';
}if(t===Double.TYPE){
return'D';
}if(t.isArray()){
return'[';
}return'L';
});
Clazz.defineMethod(c$,"getTypeString",
function(){
if(this.isPrimitive()){
return null;
}if(this.typeString==null){
var t=this.getTypeInternal();
var typeName=t.getName().$replace('.', '/');
var str=(t.isArray())?typeName:("L"+typeName+';');
this.typeString=str.intern();
}return this.typeString;
});
Clazz.defineMethod(c$,"isPrimitive",
function(){
var t=this.getTypeInternal();
return t!=null&&t.isPrimitive();
});
Clazz.defineMethod(c$,"setOffset",
function(newValue){
this.offset=newValue;
},"~N");
Clazz.overrideMethod(c$,"toString",
function(){
return this.getClass().getName()+'(' + this.getName () + ':' + this.getTypeInternal () + ')';
});
c$.sortFields=Clazz.defineMethod(c$,"sortFields",
function(fields){
if(fields.length>1){
var fieldDescComparator=((Clazz.isClassDefined("java.io.ObjectStreamField$1")?0:java.io.ObjectStreamField.$ObjectStreamField$1$()),Clazz.innerTypeInstance(java.io.ObjectStreamField$1,this,null));
java.util.Arrays.sort(fields,fieldDescComparator);
}},"~A");
Clazz.defineMethod(c$,"resolve",
function(loader){
if(this.typeString.length==1){
switch(this.typeString.charAt(0)){
case'I':
this.type=Integer.TYPE;
return;
case'B':
this.type=Byte.TYPE;
return;
case'C':
this.type=Character.TYPE;
return;
case'S':
this.type=Short.TYPE;
return;
case'Z':
this.type=Boolean.TYPE;
return;
case'J':
this.type=Long.TYPE;
return;
case'F':
this.type=Float.TYPE;
return;
case'D':
this.type=Double.TYPE;
return;
}
}var className=this.typeString.$replace('/', '.');
if((className.charAt(0)).charCodeAt(0)==('L').charCodeAt(0)){
className=className.substring(1,className.length-1);
}try{
var cl=Clazz._4Name(className,false,loader);
this.type=cl;
}catch(e){
if(Clazz.instanceOf(e,ClassNotFoundException)){
}else{
throw e;
}
}
},"ClassLoader");
Clazz.defineMethod(c$,"isUnshared",
function(){
return this.unshared;
});
c$.$ObjectStreamField$1$=function(){
Clazz.pu$h(self.c$);
c$=Clazz.declareAnonymous(java.io,"ObjectStreamField$1",null,java.util.Comparator);
Clazz.overrideMethod(c$,"compare",
function(f1,f2){
return f1.compareTo(f2);
},"java.io.ObjectStreamField,java.io.ObjectStreamField");
c$=Clazz.p0p();
};
});