Package javassist.bytecode
Class RecordAttribute
java.lang.Object
javassist.bytecode.AttributeInfo
javassist.bytecode.RecordAttribute
Represents the Record attribute in a class file, which stores information
about the record components of a record class.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRepresents a single record component within the Record attribute. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate List<RecordAttribute.RecordComponentInfo> static final StringFields inherited from class javassist.bytecode.AttributeInfo
constPool, info, name -
Constructor Summary
ConstructorsConstructorDescriptionRecordAttribute(ConstPool cp, int nameIndex, DataInputStream in) Constructs a RecordAttribute by reading from a DataInputStream.RecordAttribute(ConstPool cp, List<RecordAttribute.RecordComponentInfo> components) Constructs a RecordAttribute with specified components. -
Method Summary
Modifier and TypeMethodDescriptionMakes a copy.Returns the list of record components.(package private) voidgetRefClasses(Map<String, String> classnames) (package private) voidrenameClass(String oldname, String newname) (package private) voidrenameClass(Map<String, String> classnames) voidwrite(DataOutputStream out) Methods inherited from class javassist.bytecode.AttributeInfo
copyAll, get, getConstPool, getLength, getName, getRefClasses, length, lookup, read, remove, renameClass, renameClass, set, writeAll
-
Field Details
-
tag
- See Also:
-
components
-
-
Constructor Details
-
RecordAttribute
Constructs a RecordAttribute by reading from a DataInputStream.- Parameters:
cp- the constant poolnameIndex- the index into the constant pool of the attribute namein- the input stream to read from- Throws:
IOException- if an I/O error occurs
-
RecordAttribute
Constructs a RecordAttribute with specified components.- Parameters:
cp- the constant poolcomponents- the list of record componentsattrName- the attribute name
-
-
Method Details
-
getComponents
Returns the list of record components.- Returns:
- the list of RecordComponentInfo
-
copy
Description copied from class:AttributeInfoMakes a copy. Class names are replaced according to the givenMapobject.- Overrides:
copyin classAttributeInfo- Parameters:
newCp- the constant pool table used by the new copy.classnames- pairs of replaced and substituted class names.
-
renameClass
- Overrides:
renameClassin classAttributeInfo
-
renameClass
- Overrides:
renameClassin classAttributeInfo
-
getRefClasses
- Overrides:
getRefClassesin classAttributeInfo
-
write
- Overrides:
writein classAttributeInfo- Throws:
IOException
-