Module jvm
[hide private]
[frames] | no frames]

Module jvm

source code

Classes [hide private]
  CpInfo
Generic class to manage constant info object
  MethodRef
  InterfaceMethodRef
  FieldRef
  Class
  Utf8
  String
  Integer
  Float
  Long
  Double
  NameAndType
  FieldInfo
An object which represents a Field
  MethodInfo
An object which represents a Method
  CreateString
Create a specific String constant by given the name index
  CreateInteger
Create a specific Integer constant by given the name index
  CreateClass
Create a specific Class constant by given the name index
  CreateNameAndType
Create a specific NameAndType constant by given the name and the descriptor index
  CreateFieldRef
Create a specific FieldRef constant by given the class and the NameAndType index
  CreateMethodRef
Create a specific MethodRef constant by given the class and the NameAndType index
  CreateCodeAttributeInfo
Create a specific CodeAttributeInfo by given bytecodes (into an human readable format)
  CreateMethodInfo
Create a specific MethodInfo by given the name, the prototype and the code (into an human readable format) of the "new" method
  JBC
JBC manages each bytecode with the value, name, raw buffer and special functions
  JavaCode
JavaCode manages a list of bytecode to a specific method, by decoding a raw buffer and transform each bytecode into a JBC object
  BasicAttribute
  CodeAttribute
  SourceFileAttribute
  LineNumberTableAttribute
  LocalVariableTableAttribute
  ExceptionsAttribute
  VerificationTypeInfo
  FullFrame
  ChopFrame
  SameFrame
  SameLocals1StackItemFrame
  SameLocals1StackItemFrameExtended
  SameFrameExtended
  AppendFrame
  StackMapTableAttribute
  InnerClassesDesc
  InnerClassesAttribute
  AttributeInfo
AttributeInfo manages each attribute info (Code, SourceFile ....)
  ClassManager
ClassManager can be used by all classes to get more information
  JVMFormat
An object which is the main class to handle properly a class file.
Functions [hide private]
 
special_F0(x) source code
 
special_F0R(x) source code
 
special_F1(x) source code
 
special_F1R(x) source code
 
special_F2(x) source code
 
special_F2R(x) source code
 
special_F3(x) source code
 
special_F3R(x) source code
 
EXTRACT_INFORMATION(op_value)
Extract information (special functions) about a bytecode
source code
Variables [hide private]
  JAVA_OPCODES = {0: ['nop'], 1: ['aconst_null'], 2: ['iconst_m1...
  INVERT_JAVA_OPCODES = {'aaload': 50, 'aastore': 83, 'aconst_nu...
  BRANCH_JAVA_OPCODES = ['goto', 'goto_w', 'if_acmpeq', 'if_icmp...
  METHOD_INFO = ['>HHHH', <class 'jvm.MethodInfo'>]
  ATTRIBUTE_INFO = ['>HL', <class 'jvm.AttributeInfo'>]
  FIELD_INFO = ['>HHHH', <class 'jvm.FieldInfo'>]
  LINE_NUMBER_TABLE = ['>HH', <class 'jvm.LineNumberTable'>]
  EXCEPTION_TABLE = ['>HHHH', <class 'jvm.ExceptionTable'>]
  LOCAL_VARIABLE_TABLE = ['>HHHHH', <class 'jvm.LocalVariableTab...
  CODE_LOW_STRUCT = ['>HHL', <class 'jvm.LOW'>]
  ARRAY_TYPE = {4: 'T_BOOLEAN', 5: 'T_CHAR', 6: 'T_FLOAT', 7: 'T...
  INVERT_ARRAY_TYPE = {'T': 11}
  ACC_CLASS_FLAGS = {1: ['ACC_PUBLIC', 'Declared public; may be ...
  INVERT_ACC_CLASS_FLAGS = {'ACC_ABSTRACT': 1024, 'ACC_FINAL': 1...
  ACC_FIELD_FLAGS = {1: ['ACC_PUBLIC', 'Declared public; may be ...
  INVERT_ACC_FIELD_FLAGS = {'ACC_FINAL': 16, 'ACC_PRIVATE': 2, '...
  ACC_METHOD_FLAGS = {1: ['ACC_PUBLIC', 'Declared public; may be...
  INVERT_ACC_METHOD_FLAGS = {'ACC_ABSTRACT': 1024, 'ACC_FINAL': ...
  CONSTANT_INFO = {1: ['CONSTANT_Utf8', '>BH', <class 'jvm.CONST...
  INVERT_CONSTANT_INFO = {'CONSTANT_Class': 7, 'CONSTANT_Double'...
  ITEM_Top = 0
  ITEM_Integer = 1
  ITEM_Float = 2
  ITEM_Long = 4
  ITEM_Double = 3
  ITEM_Null = 5
  ITEM_UninitializedThis = 6
  ITEM_Object = 7
  ITEM_Uninitialized = 8
  VERIFICATION_TYPE_INFO = {0: ['Top_variable_info', '>B', <clas...
  __package__ = None
  k = 12
Variables Details [hide private]

JAVA_OPCODES

Value:
{0: ['nop'],
 1: ['aconst_null'],
 2: ['iconst_m1'],
 3: ['iconst_0'],
 4: ['iconst_1'],
 5: ['iconst_2'],
 6: ['iconst_3'],
 7: ['iconst_4'],
...

INVERT_JAVA_OPCODES

Value:
{'aaload': 50,
 'aastore': 83,
 'aconst_null': 1,
 'aload': 25,
 'aload_0': 42,
 'aload_1': 43,
 'aload_2': 44,
 'aload_3': 45,
...

BRANCH_JAVA_OPCODES

Value:
['goto',
 'goto_w',
 'if_acmpeq',
 'if_icmpeq',
 'if_icmpne',
 'if_icmplt',
 'if_icmpge',
 'if_icmpgt',
...

LOCAL_VARIABLE_TABLE

Value:
['>HHHHH', <class 'jvm.LocalVariableTable'>]

ARRAY_TYPE

Value:
{4: 'T_BOOLEAN',
 5: 'T_CHAR',
 6: 'T_FLOAT',
 7: 'T_DOUBLE',
 8: 'T_BYTE',
 9: 'T_SHORT',
 10: 'T_INT',
 11: 'T_LONG'}

ACC_CLASS_FLAGS

Value:
{1: ['ACC_PUBLIC',
     'Declared public; may be accessed from outside its package.'],
 16: ['ACC_FINAL', 'Declared final; no subclasses allowed.'],
 32: ['ACC_SUPER',
      'Treat superclass methods specially when invoked by the invokesp\
ecial instruction.'],
 512: ['ACC_INTERFACE', 'Is an interface, not a class.'],
 1024: ['ACC_ABSTRACT', 'Declared abstract; may not be instantiated.']\
...

INVERT_ACC_CLASS_FLAGS

Value:
{'ACC_ABSTRACT': 1024,
 'ACC_FINAL': 16,
 'ACC_INTERFACE': 512,
 'ACC_PUBLIC': 1,
 'ACC_SUPER': 32}

ACC_FIELD_FLAGS

Value:
{1: ['ACC_PUBLIC',
     'Declared public; may be accessed from outside its package.'],
 2: ['ACC_PRIVATE',
     'Declared private; usable only within the defining class.'],
 4: ['ACC_PROTECTED',
     'Declared protected; may be accessed within subclasses.'],
 8: ['ACC_STATIC', 'Declared static.'],
 16: ['ACC_FINAL', 'Declared final; no further assignment after initia\
...

INVERT_ACC_FIELD_FLAGS

Value:
{'ACC_FINAL': 16,
 'ACC_PRIVATE': 2,
 'ACC_PROTECTED': 4,
 'ACC_PUBLIC': 1,
 'ACC_STATIC': 8,
 'ACC_TRANSIENT': 128,
 'ACC_VOLATILE': 64}

ACC_METHOD_FLAGS

Value:
{1: ['ACC_PUBLIC',
     'Declared public; may be accessed from outside its package.'],
 2: ['ACC_PRIVATE',
     'Declared private; accessible only within the defining class.'],
 4: ['ACC_PROTECTED',
     'Declared protected; may be accessed within subclasses.'],
 8: ['ACC_STATIC', 'Declared static.'],
 16: ['ACC_FINAL', 'Declared final; may not be overridden.'],
...

INVERT_ACC_METHOD_FLAGS

Value:
{'ACC_ABSTRACT': 1024,
 'ACC_FINAL': 16,
 'ACC_NATIVE': 256,
 'ACC_PRIVATE': 2,
 'ACC_PROTECTED': 4,
 'ACC_PUBLIC': 1,
 'ACC_STATIC': 8,
 'ACC_STRICT': 2048,
...

CONSTANT_INFO

Value:
{1: ['CONSTANT_Utf8',
     '>BH',
     <class 'jvm.CONSTANT_Utf8_info'>,
     <class 'jvm.Utf8'>],
 3: ['CONSTANT_Integer',
     '>BL',
     <class 'jvm.CONSTANT_Integer_info'>,
     <class 'jvm.Integer'>],
...

INVERT_CONSTANT_INFO

Value:
{'CONSTANT_Class': 7,
 'CONSTANT_Double': 6,
 'CONSTANT_Fieldref': 9,
 'CONSTANT_Float': 4,
 'CONSTANT_Integer': 3,
 'CONSTANT_InterfaceMethodref': 11,
 'CONSTANT_Long': 5,
 'CONSTANT_Methodref': 10,
...

VERIFICATION_TYPE_INFO

Value:
{0: ['Top_variable_info', '>B', <class 'jvm.Top_variable_info'>],
 1: ['Integer_variable_info',
     '>B',
     <class 'jvm.Integer_variable_info'>],
 2: ['Float_variable_info', '>B', <class 'jvm.Float_variable_info'>],
 3: ['Double_variable_info', '>B', <class 'jvm.Double_variable_info'>]\
,
 4: ['Long_variable_info', '>B', <class 'jvm.Long_variable_info'>],
...