jasm.lang
Class BytecodeAttribute.Unknown

java.lang.Object
  extended by jasm.lang.BytecodeAttribute.Unknown
All Implemented Interfaces:
BytecodeAttribute
Enclosing interface:
BytecodeAttribute

public static class BytecodeAttribute.Unknown
extends java.lang.Object
implements BytecodeAttribute

Class for representing unknown attributes. This class does not write the same attribute back out but, instead, boxes inside a specia "Unknown" attribute. The reason for this is that, if the attribute contains e.g. constant pool items, then their indices may be incorrect.

Author:
David J. Pearce

Nested Class Summary
 
Nested classes/interfaces inherited from interface jasm.lang.BytecodeAttribute
BytecodeAttribute.Fn, BytecodeAttribute.Reader, BytecodeAttribute.Unknown
 
Constructor Summary
BytecodeAttribute.Unknown(java.lang.String n, byte[] bs)
           
 
Method Summary
 void addPoolItems(java.util.Set<Constant.Info> constantPool)
          When this method is called, the attribute must add all items that it needs to the constant pool.
 java.lang.String name()
           
 void print(java.io.PrintWriter output, java.util.Map<Constant.Info,java.lang.Integer> constantPool)
          This method is used to print the contents of the attribute in human-readable form, similar to that produced by "javap".
 void write(BinaryOutputStream writer, java.util.Map<Constant.Info,java.lang.Integer> constantPool)
          This method requires the attribute to write itself to the binary stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BytecodeAttribute.Unknown

public BytecodeAttribute.Unknown(java.lang.String n,
                                 byte[] bs)
Method Detail

name

public java.lang.String name()
Specified by:
name in interface BytecodeAttribute

addPoolItems

public void addPoolItems(java.util.Set<Constant.Info> constantPool)
Description copied from interface: BytecodeAttribute
When this method is called, the attribute must add all items that it needs to the constant pool.

Specified by:
addPoolItems in interface BytecodeAttribute

write

public void write(BinaryOutputStream writer,
                  java.util.Map<Constant.Info,java.lang.Integer> constantPool)
           throws java.io.IOException
Description copied from interface: BytecodeAttribute
This method requires the attribute to write itself to the binary stream.

Specified by:
write in interface BytecodeAttribute
Throws:
java.io.IOException

print

public void print(java.io.PrintWriter output,
                  java.util.Map<Constant.Info,java.lang.Integer> constantPool)
           throws java.io.IOException
Description copied from interface: BytecodeAttribute
This method is used to print the contents of the attribute in human-readable form, similar to that produced by "javap".

Specified by:
print in interface BytecodeAttribute
Throws:
java.io.IOException


Copyright © 2013 David J. Pearce. All Rights Reserved.