public class InnerClasses extends Object implements BytecodeAttribute
BytecodeAttribute.Fn, BytecodeAttribute.Reader, BytecodeAttribute.Unknown| Modifier and Type | Field and Description |
|---|---|
protected List<Triple<JvmType.Clazz,JvmType.Clazz,List<Modifier>>> |
inners |
protected JvmType.Clazz |
type |
| Constructor and Description |
|---|
InnerClasses(JvmType.Clazz type,
List<Triple<JvmType.Clazz,JvmType.Clazz,List<Modifier>>> inners)
Create an InnerClasses attribute (see JLS Section 4.7.5).
|
| Modifier and Type | Method and Description |
|---|---|
void |
addPoolItems(Set<Constant.Info> constantPool)
When this method is called, the attribute must add all items that it
needs to the constant pool.
|
List<Triple<JvmType.Clazz,JvmType.Clazz,List<Modifier>>> |
inners() |
String |
name() |
void |
print(PrintWriter output,
Map<Constant.Info,Integer> constantPool)
This method is used to print the contents of the attribute in
human-readable form, similar to that produced by "javap".
|
JvmType.Clazz |
type() |
void |
write(BinaryOutputStream output,
Map<Constant.Info,Integer> constantPool)
This method requires the attribute to write itself to the binary stream.
|
protected List<Triple<JvmType.Clazz,JvmType.Clazz,List<Modifier>>> inners
protected JvmType.Clazz type
public InnerClasses(JvmType.Clazz type, List<Triple<JvmType.Clazz,JvmType.Clazz,List<Modifier>>> inners)
type - - the type of the class containing this attribute.inners - - the types and modifiers for all classes contained in this
class.public String name()
name in interface BytecodeAttributepublic List<Triple<JvmType.Clazz,JvmType.Clazz,List<Modifier>>> inners()
public JvmType.Clazz type()
public void addPoolItems(Set<Constant.Info> constantPool)
BytecodeAttributeaddPoolItems in interface BytecodeAttributepublic void print(PrintWriter output, Map<Constant.Info,Integer> constantPool)
BytecodeAttributeprint in interface BytecodeAttributeoutput - Output writer to which the attribute is printed.constantPool - Map of CONSTANT_info items to their index in the constant
pool.public void write(BinaryOutputStream output, Map<Constant.Info,Integer> constantPool) throws IOException
BytecodeAttributewrite in interface BytecodeAttributeoutput - Outputstream to which the attribute should be written.constantPool - Map of CONSTANT_info items to their index in the constant pool.IOExceptionCopyright © 2016. All rights reserved.