MCPcopy Index your code
hub / github.com/clojure/clojure / putAttributes

Method putAttributes

src/jvm/clojure/asm/ModuleWriter.java:219–252  ·  view source on GitHub ↗

Puts the Module, ModulePackages and ModuleMainClass attributes generated by this ModuleWriter in the given ByteVector. @param output where the attributes must be put.

(final ByteVector output)

Source from the content-addressed store, hash-verified

217 * @param output where the attributes must be put.
218 */
219 void putAttributes(final ByteVector output) {
220 // 6 bytes for name, flags and version, and 5 * 2 bytes for counts.
221 int moduleAttributeLength =
222 16 + requires.length + exports.length + opens.length + usesIndex.length + provides.length;
223 output
224 .putShort(symbolTable.addConstantUtf8(Constants.MODULE))
225 .putInt(moduleAttributeLength)
226 .putShort(moduleNameIndex)
227 .putShort(moduleFlags)
228 .putShort(moduleVersionIndex)
229 .putShort(requiresCount)
230 .putByteArray(requires.data, 0, requires.length)
231 .putShort(exportsCount)
232 .putByteArray(exports.data, 0, exports.length)
233 .putShort(opensCount)
234 .putByteArray(opens.data, 0, opens.length)
235 .putShort(usesCount)
236 .putByteArray(usesIndex.data, 0, usesIndex.length)
237 .putShort(providesCount)
238 .putByteArray(provides.data, 0, provides.length);
239 if (packageCount > 0) {
240 output
241 .putShort(symbolTable.addConstantUtf8(Constants.MODULE_PACKAGES))
242 .putInt(2 + packageIndex.length)
243 .putShort(packageCount)
244 .putByteArray(packageIndex.data, 0, packageIndex.length);
245 }
246 if (mainClassIndex > 0) {
247 output
248 .putShort(symbolTable.addConstantUtf8(Constants.MODULE_MAIN_CLASS))
249 .putInt(2)
250 .putShort(mainClassIndex);
251 }
252 }
253}

Callers

nothing calls this directly

Calls 4

putByteArrayMethod · 0.80
putShortMethod · 0.80
putIntMethod · 0.80
addConstantUtf8Method · 0.80

Tested by

no test coverage detected