public interface ClassFile extends HasAttribute
Note: The fields referred to in this documentation are of the
ClassFile structure defined in vmspec-2 sec4.1.
| Modifier and Type | Method and Description |
|---|---|
int |
getAccessFlags()
Gets the field
access_flags. |
AttributeList |
getAttributes()
Gets the field
attributes (along with
attributes_count). |
BootstrapMethodsList |
getBootstrapMethods()
Gets the bootstrap method
attributes. |
ConstantPool |
getConstantPool()
Gets the field
constant_pool (along with
constant_pool_count). |
FieldList |
getFields()
Gets the field
fields (along with
fields_count). |
TypeList |
getInterfaces()
Gets the field
interfaces (along with
interfaces_count). |
int |
getMagic()
Gets the field
magic. |
int |
getMajorVersion()
Gets the field
major_version. |
MethodList |
getMethods()
Gets the field
methods (along with
methods_count). |
int |
getMinorVersion()
Gets the field
minor_version. |
CstString |
getSourceFile()
Gets the name out of the
SourceFile attribute of this
file, if any. |
CstType |
getSuperclass()
Gets the field
super_class, interpreted as a type constant
if non-zero. |
CstType |
getThisClass()
Gets the field
this_class, interpreted as a type constant. |
int getMagic()
magic.int getMinorVersion()
minor_version.int getMajorVersion()
major_version.int getAccessFlags()
access_flags.CstType getThisClass()
this_class, interpreted as a type constant.non-null; the value in questionCstType getSuperclass()
super_class, interpreted as a type constant
if non-zero.null-ok; the value in questionConstantPool getConstantPool()
constant_pool (along with
constant_pool_count).non-null; the constant poolTypeList getInterfaces()
interfaces (along with
interfaces_count).non-null; the list of interfacesFieldList getFields()
fields (along with
fields_count).non-null; the list of fieldsMethodList getMethods()
methods (along with
methods_count).non-null; the list of fieldsAttributeList getAttributes()
attributes (along with
attributes_count).getAttributes in interface HasAttributenon-null; the list of attributesBootstrapMethodsList getBootstrapMethods()
attributes.non-null; the list of bootstrap methodsCstString getSourceFile()
SourceFile attribute of this
file, if any. This is a convenient shorthand for scrounging around
the class's attributes.non-null; the constant poolCopyright © 2020. All Rights Reserved.