Check-in [c4c5ceda4f]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Initialization of minimized class file.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1:c4c5ceda4fcf8712222537ffd31e523fb514a0ab
User & Date: stephanie.gawroriski 2019-04-17 15:51:14
Context
2019-04-17
16:03
Fixups. check-in: 819eece9c9 user: stephanie.gawroriski tags: trunk
15:51
Initialization of minimized class file. check-in: c4c5ceda4f user: stephanie.gawroriski tags: trunk
15:44
Reading of method data. check-in: 2406898b0e user: stephanie.gawroriski tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to runt/libs/tool-classfile/dev/shadowtail/classfile/mini/MinimizedClassFile.java.

22
23
24
25
26
27
28






















































29
30
31
32
33
34
35
...
101
102
103
104
105
106
107
108


109
110
111
 * {@link net.multiphasicapps.classfile.ClassFile} that is more optimized to
 * virtual machines for usage.
 *
 * @since 2019/03/10
 */
public final class MinimizedClassFile
{






















































	/**
	 * Decodes and returns the minimized representation of the class file.
	 *
	 * @param __is The stream to decode from.
	 * @return The resulting minimized class.
	 * @throws InvalidClassFormatException If the class is not formatted
	 * correctly.
................................................................................
		
		// Read static and instance methods
		MinimizedMethod[] smethods = MinimizedMethod.decodeMethods(
				header.smcount, pool, __is, header.smoff, header.smsize),
			imethods = MinimizedMethod.decodeMethods(
				header.imcount, pool, __is, header.imoff, header.imsize);
		
		throw new todo.TODO();


	}
}








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







 







|
>
>



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
...
155
156
157
158
159
160
161
162
163
164
165
166
167
 * {@link net.multiphasicapps.classfile.ClassFile} that is more optimized to
 * virtual machines for usage.
 *
 * @since 2019/03/10
 */
public final class MinimizedClassFile
{
	/** Header. */
	public final MinimizedClassHeader header;
	
	/** Pool. */
	public final MinimizedPool pool;
	
	/** Static fields. */
	private final MinimizedField[] _sfields;
	
	/** Instance fields. */
	private final MinimizedField[] _ifields;
	
	/** Static methods. */
	private final MinimizedMethod[] _smethods;
	
	/** Instance methods. */
	private final MinimizedMethod[] _imethods;
	
	/**
	 * Initializes the minimized class file.
	 *
	 * @param __h The header.
	 * @param __p The pool.
	 * @param __sf Static fields.
	 * @param __if Instance fields.
	 * @param __sm Static methods.
	 * @param __im Instance methods.
	 * @throws NullPointerException On null arguments.
	 * @since 2019/04/17
	 */
	public MinimizedClassFile(MinimizedClassHeader __h, MinimizedPool __p,
		MinimizedField[] __sf, MinimizedField[] __if,
		MinimizedMethod[] __sm, MinimizedMethod[] __im)
		throws NullPointerException
	{
		if (__h == null || __p == null || __sf == null || __if == null ||
			__sm == null || __im == null)
			throw new NullPointerException("NARG");
		
		// Set
		this.header = __h;
		this.pool = __p;
		this._sfields = (__sf = __sf.clone());
		this._ifields = (__if = __if.clone());
		this._smethods = (__sm = __sm.clone());
		this._imethods = (__im = __im.clone());
		
		// Check for nulls
		for (Object[] va : new Object[][]{__sf, __if, __sm, __im})
			for (Object v : va)
				if (v == null)
					throw new NullPointerException("NARG");
	}
	
	/**
	 * Decodes and returns the minimized representation of the class file.
	 *
	 * @param __is The stream to decode from.
	 * @return The resulting minimized class.
	 * @throws InvalidClassFormatException If the class is not formatted
	 * correctly.
................................................................................
		
		// Read static and instance methods
		MinimizedMethod[] smethods = MinimizedMethod.decodeMethods(
				header.smcount, pool, __is, header.smoff, header.smsize),
			imethods = MinimizedMethod.decodeMethods(
				header.imcount, pool, __is, header.imoff, header.imsize);
		
		// Build final class
		return new MinimizedClassFile(header, pool,
			sfields, ifields, smethods, imethods);
	}
}