Package jminusminus
Class CLAttributeInfo
java.lang.Object
jminusminus.CLAttributeInfo
- Direct Known Subclasses:
CLAnnotationDefaultAttribute
,CLCodeAttribute
,CLConstantValueAttribute
,CLDeprecatedAttribute
,CLEnclosingMethodAttribute
,CLExceptionsAttribute
,CLInnerClassesAttribute
,CLLineNumberTableAttribute
,CLLocalVariableTableAttribute
,CLLocalVariableTypeTableAttribute
,CLRuntimeInvisibleAnnotationsAttribute
,CLRuntimeInvisibleParameterAnnotationsAttribute
,CLRuntimeVisibleAnnotationsAttribute
,CLRuntimeVisibleParameterAnnotationsAttribute
,CLSignatureAttribute
,CLSourceDebugExtensionAttribute
,CLSourceFileAttribute
,CLSyntheticAttribute
The abstract base class for the representation of attribute_info} structure. Classes
representing individual attributes inherit this class. This file has representations for all
attributes specified in JVM Spec Second Edition, including the ones that were added for JDK 1.5.
Attributes are used in the CLFile, CLFieldInfo, CLMethodInfo, and CLCodeAttribute structures of the class file. While there are many kinds of attributes, only some are mandatory; these include:
- InnerClasses_attribute (class attribute)
- Synthetic_attribute (class, field, and method attribute)
- Code_attribute (method attribute)
- Exceptions_attribute (method attribute)
CLEmitter implicitly adds the required attributes to the appropriate structure. The optional attributes have to be added explicitly using the CLEmitter methods addClassAttribute(), addFieldAttribute(), addMethodAttribute(), and addCodeAttribute().
-
Field Summary
Modifier and TypeFieldDescriptionlong
attribute_info.attribute_length item.int
attribute_info.attribute_name_index item. -
Constructor Summary
ModifierConstructorDescriptionprotected
CLAttributeInfo
(int attributeNameIndex, long attributeLength) Construct a CLAttributeInfo object. -
Method Summary
Modifier and TypeMethodDescriptionvoid
write
(CLOutputStream out) Write the contents of this attribute to the specified output stream.
-
Field Details
-
attributeNameIndex
public int attributeNameIndexattribute_info.attribute_name_index item. -
attributeLength
public long attributeLengthattribute_info.attribute_length item.
-
-
Constructor Details
-
CLAttributeInfo
protected CLAttributeInfo(int attributeNameIndex, long attributeLength) Construct a CLAttributeInfo object.- Parameters:
attributeNameIndex
- attribute_info.attribute_name_index item.attributeLength
- attribute_info.attribute_length item.
-
-
Method Details
-
write
Write the contents of this attribute to the specified output stream.- Parameters:
out
- output stream.- Throws:
IOException
- if an error occurs while writing.
-