All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yworks.yguard.obf.classfile.ModuleMainClassAttrInfo Maven / Gradle / Ivy

Go to download

The open-source Java obfuscation tool working with Ant and Gradle by yWorks - the diagramming experts

There is a newer version: 2.10.0
Show newest version
package com.yworks.yguard.obf.classfile;

import java.io.DataInput;
import java.io.DataOutput;
import java.io.IOException;

/**
 * Representation of the module main class attribute. 
 * @author Thomas Behr
 */
public class ModuleMainClassAttrInfo extends AttrInfo {
  // Constants -------------------------------------------------------------


  // Fields ----------------------------------------------------------------
  private int u2mainClassIndex;


  // Class Methods ---------------------------------------------------------


  // Instance Methods ------------------------------------------------------
  ModuleMainClassAttrInfo(
          final ClassFile cf, final int attrNameIndex, final int attrLength
  ) {
    super(cf, attrNameIndex, attrLength);
  }

  /**
   * Returns "ModuleMainClass".
   */
  protected String getAttrName() {
    return ATTR_ModuleMainClass;
  }

  /**
   * Read the data following the header.
   */
  protected void readInfo( final DataInput din ) throws IOException {
    u2mainClassIndex = din.readUnsignedShort();
  }

  /**
   * Export data following the header to a DataOutput stream.
   */
  public void writeInfo( final DataOutput dout ) throws IOException {
    dout.writeShort(u2mainClassIndex);
  }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy