Ejemplo n.º 1
0
        protected internal override ByteVector Write(ClassWriter classWriter, byte[] code
                                                     , int codeLength, int maxStack, int maxLocals)
        {
            var byteVector = new ByteVector();

            byteVector.PutShort(classWriter.NewUTF8(algorithm));
            if (modules == null)
            {
                byteVector.PutShort(0);
            }
            else
            {
                var numModules = modules.Count;
                byteVector.PutShort(numModules);
                for (var i = 0; i < numModules; ++i)
                {
                    var module = modules[i];
                    var hash   = hashes[i];
                    byteVector.PutShort(classWriter.NewModule(module)).PutShort(hash.Length).PutByteArray
                        (hash, 0, hash.Length);
                }
            }

            return(byteVector);
        }
Ejemplo n.º 2
0
        protected internal override ByteVector Write(ClassWriter classWriter, byte[] code
                                                     , int codeLength, int maxStack, int maxLocals)
        {
            var byteVector = new ByteVector();

            byteVector.PutShort(platform == null ? 0 : classWriter.NewUTF8(platform));
            return(byteVector);
        }