Package jminusminus

Class CLFile

java.lang.Object
jminusminus.CLFile

class CLFile extends Object
This class provides a representation of the ClassFile structure.
  • Field Details

    • magic

      public long magic
      ClassFile.magic item.
    • minorVersion

      public int minorVersion
      ClassFile.minor_version item.
    • majorVersion

      public int majorVersion
      ClassFile.major_version item.
    • constantPoolCount

      public int constantPoolCount
      ClassFile.constant_pool_count item.
    • constantPool

      public CLConstantPool constantPool
      ClassFile.constant_pool item.
    • accessFlags

      public int accessFlags
      ClassFile.access_flags item.
    • thisClass

      public int thisClass
      ClassFile.this_class item.
    • superClass

      public int superClass
      ClassFile.super_class item.
    • interfacesCount

      public int interfacesCount
      ClassFile.interfaces_count item.
    • interfaces

      public ArrayList<Integer> interfaces
      ClassFile.interfaces item.
    • fieldsCount

      public int fieldsCount
      ClassFile.fields_count item.
    • fields

      public ArrayList<CLFieldInfo> fields
      ClassFile.fields item.
    • methodsCount

      public int methodsCount
      ClassFile.methods_count item.
    • methods

      public ArrayList<CLMethodInfo> methods
      ClassFile.methods item.
    • attributesCount

      public int attributesCount
      ClassFile.attributes_count item.
    • attributes

      public ArrayList<CLAttributeInfo> attributes
      ClassFile.attributes item.
  • Constructor Details

    • CLFile

      CLFile()
  • Method Details

    • write

      public void write(CLOutputStream out) throws IOException
      Writes the contents of this class to the specified output stream.
      Parameters:
      out - output stream.
      Throws:
      IOException - if an error occurs while writing.
    • innerClassAccessFlagsToString

      public static String innerClassAccessFlagsToString(int accessFlags)
      Returns a string identifying the inner class access permissions and properties contained in the specified mask of flags.
      Parameters:
      accessFlags - mask of access flags.
      Returns:
      a string identifying the inner class access permissions and properties.
    • fieldAccessFlagsToString

      public static String fieldAccessFlagsToString(int accessFlags)
      Returns a string identifying the field access permissions and properties contained in the specified mask of flags.
      Parameters:
      accessFlags - mask of access flags.
      Returns:
      a string identifying the field access permissions and properties.
    • methodAccessFlagsToString

      public static String methodAccessFlagsToString(int accessFlags)
      Returns a string identifying the method access permissions and properties contained in the specified mask of flags.
      Parameters:
      accessFlags - mask of access flags.
      Returns:
      a string identifying the method access permissions and properties.
    • accessFlagToInt

      public static int accessFlagToInt(String accessFlag)
      Returns the integer value (mask) corresponding to the specified access flag.
      Parameters:
      accessFlag - access flag.
      Returns:
      the integer value (mask) corresponding to the specified access flag.