Package com.tonic.parser.attribute
Class LocalVariableTypeTableAttribute
- java.lang.Object
-
- com.tonic.parser.attribute.Attribute
-
- com.tonic.parser.attribute.LocalVariableTypeTableAttribute
-
public class LocalVariableTypeTableAttribute extends Attribute
The LocalVariableTypeTable attribute: generic signatures of local variables.
-
-
Constructor Summary
Constructors Constructor Description LocalVariableTypeTableAttribute(String name, ClassFile parent, int nameIndex, int length)Creates the attribute shell for parsing, attached to a class.LocalVariableTypeTableAttribute(String name, MemberEntry parent, int nameIndex, int length)Creates the attribute shell for parsing, attached to a member.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description List<LocalVariableTypeTableEntry>getLocalVariableTypeTable()voidread(ClassFile classFile, int length)Reads the attribute data from the class file.voidsetLocalVariableTypeTable(List<LocalVariableTypeTableEntry> localVariableTypeTable)StringtoString()voidupdateLength()Recomputes the attribute length field from the current in-memory content.
-
-
-
Constructor Detail
-
LocalVariableTypeTableAttribute
public LocalVariableTypeTableAttribute(String name, MemberEntry parent, int nameIndex, int length)
Creates the attribute shell for parsing, attached to a member.- Parameters:
name- the attribute nameparent- the member the attribute belongs tonameIndex- constant-pool index of the name Utf8length- the attribute length in bytes
-
LocalVariableTypeTableAttribute
public LocalVariableTypeTableAttribute(String name, ClassFile parent, int nameIndex, int length)
Creates the attribute shell for parsing, attached to a class.- Parameters:
name- the attribute nameparent- the class the attribute belongs tonameIndex- constant-pool index of the name Utf8length- the attribute length in bytes
-
-
Method Detail
-
getLocalVariableTypeTable
public List<LocalVariableTypeTableEntry> getLocalVariableTypeTable()
- Returns:
- the local variable type table
-
setLocalVariableTypeTable
public void setLocalVariableTypeTable(List<LocalVariableTypeTableEntry> localVariableTypeTable)
- Parameters:
localVariableTypeTable- the entries to emit
-
read
public void read(ClassFile classFile, int length)
Description copied from class:AttributeReads the attribute data from the class file.
-
updateLength
public void updateLength()
Description copied from class:AttributeRecomputes the attribute length field from the current in-memory content.- Specified by:
updateLengthin classAttribute
-
-