Beispiel #1
0
 internal ExceptionHandler(JavaClassImage classImage, ByteCodeMethodBody byteCodeMethodBody, ExceptionHandlerInfo info)
 {
     Start        = byteCodeMethodBody.Instructions.GetByOffset(info.StartOffset);
     End          = byteCodeMethodBody.Instructions.GetByOffset(info.EndOffset);
     HandlerStart = byteCodeMethodBody.Instructions.GetByOffset(info.HandlerOffset);
     CatchType    = classImage.ResolveClass(info.CatchType);
 }
        internal LocalVariable(JavaClassImage classImage, ByteCodeMethodBody body, LocalVariableInfo variableInfo)
        {
            _name = new LazyValue <string>(() =>
                                           classImage.ClassFile.ConstantPool.ResolveString(variableInfo.NameIndex));

            _descriptor = new LazyValue <FieldDescriptor>(() =>
                                                          classImage.ResolveFieldDescriptor(variableInfo.DescriptorIndex));

            Index = variableInfo.LocalIndex;
            Start = body.Instructions.GetByOffset(variableInfo.StartOffset);
            End   = body.Instructions.GetByOffset(variableInfo.StartOffset + variableInfo.Length);
        }
 public StackInbalanceException(ByteCodeMethodBody body, int offset)
     : base(string.Format("Stack inbalance was detected at offset {0:X4} in method body of {1}", offset, body))
 {
     Body   = body;
     Offset = offset;
 }