1 |
5c81df14
|
@havlijan17
|
package jdeserialize;
|
2 |
|
|
import java.io.*;
|
3 |
|
|
import java.util.*;
|
4 |
|
|
|
5 |
|
|
/**
|
6 |
|
|
* <p>Represents an array instance, including the values the comprise the array. </p>
|
7 |
|
|
*
|
8 |
|
|
* <p>Note that in arrays of primitives, the classdesc will be named "[x", where x is the
|
9 |
|
|
* field type code representing the primitive type. See jdeserialize.resolveJavaType()
|
10 |
|
|
* for an example of analysis/generation of human-readable names from these class names.</p>
|
11 |
|
|
*/
|
12 |
|
|
public class arrayobj extends contentbase {
|
13 |
|
|
/**
|
14 |
|
|
* Type of the array instance.
|
15 |
|
|
*/
|
16 |
|
|
public classdesc classdesc;
|
17 |
|
|
|
18 |
|
|
/**
|
19 |
|
|
* Values of the array, in the order they were read from the stream.
|
20 |
|
|
*/
|
21 |
|
|
public arraycoll data;
|
22 |
|
|
|
23 |
|
|
public arrayobj(int handle, classdesc cd, arraycoll data) {
|
24 |
|
|
super(contenttype.ARRAY);
|
25 |
|
|
this.handle = handle;
|
26 |
|
|
this.classdesc = cd;
|
27 |
|
|
this.data = data;
|
28 |
|
|
}
|
29 |
|
|
public String toString() {
|
30 |
|
|
return "[array " + jdeserialize.hex(handle) + " classdesc " + classdesc.toString() + ": "
|
31 |
|
|
+ data.toString() + "]";
|
32 |
|
|
}
|
33 |
|
|
}
|