jawa.attribute module¶
-
jawa.attribute.
ATTRIBUTE_CLASSES
= {'BootstrapMethods': <class 'jawa.attributes.bootstrap.BootstrapMethodsAttribute'>, 'Code': <class 'jawa.attributes.code.CodeAttribute'>, 'ConstantValue': <class 'jawa.attributes.constant_value.ConstantValueAttribute'>, 'Deprecated': <class 'jawa.attributes.deprecated.DeprecatedAttribute'>, 'EnclosingMethod': <class 'jawa.attributes.enclosing_method.EnclosingMethodAttribute'>, 'Exceptions': <class 'jawa.attributes.exceptions.ExceptionsAttribute'>, 'InnerClasses': <class 'jawa.attributes.inner_classes.InnerClassesAttribute'>, 'LineNumberTable': <class 'jawa.attributes.line_number_table.LineNumberTableAttribute'>, 'LocalVariableTable': <class 'jawa.attributes.local_variable.LocalVariableTableAttribute'>, 'LocalVariableTypeTable': <class 'jawa.attributes.local_variable_type.LocalVariableTypeTableAttribute'>, 'Signature': <class 'jawa.attributes.signature.SignatureAttribute'>, 'SourceFile': <class 'jawa.attributes.source_file.SourceFileAttribute'>, 'StackMapTable': <class 'jawa.attributes.stack_map_table.StackMapTableAttribute'>, 'Synthetic': <class 'jawa.attributes.synthetic.SyntheticAttribute'>}¶ A dictionary of known attribute subclasses at the time this module was loaded.
-
class
jawa.attribute.
Attribute
(parent: jawa.attribute.AttributeTable, name_index: int)[source]¶ Bases:
object
-
ADDED_IN
= None¶
-
MINIMUM_CLASS_VERSION
= None¶
-
cf
¶ The ClassFile that owns this attribute, if any.
-
name
¶ The name of this attribute.
-
-
class
jawa.attribute.
AttributeTable
(cf, parent: jawa.attribute.Attribute = None)[source]¶ Bases:
object
-
cf
= None¶ The ClassFile that ultimately owns this AttributeTable.
-
create
(type_, *args, **kwargs) → Any[source]¶ Creates a new attribute of type_, appending it to the attribute table and returning it.
-
pack
(out: IO)[source]¶ Write the AttributeTable to the file-like object out.
Note
Advanced usage only. You will typically never need to call this method as it will be called for you when saving a ClassFile.
Parameters: out – Any file-like object providing write()
-
parent
= None¶ The parent Attribute, if one exists.
-
-
class
jawa.attribute.
UnknownAttribute
(parent: jawa.attribute.AttributeTable, name_index: int)[source]¶ Bases:
jawa.attribute.Attribute