com.android.dx.cf.iface
Interface ClassFile

All Known Implementing Classes:
DirectClassFile

public interface ClassFile

Interface for things which purport to be class files or reasonable facsimiles thereof.

Note: The fields referred to in this documentation are of the ClassFile structure defined in vmspec-2 sec4.1.


Method Summary
 int getAccessFlags()
          Gets the field access_flags.
 AttributeList getAttributes()
          Gets the field attributes (along with attributes_count).
 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.
 

Method Detail

getMagic

int getMagic()
Gets the field magic.

Returns:
the value in question

getMinorVersion

int getMinorVersion()
Gets the field minor_version.

Returns:
the value in question

getMajorVersion

int getMajorVersion()
Gets the field major_version.

Returns:
the value in question

getAccessFlags

int getAccessFlags()
Gets the field access_flags.

Returns:
the value in question

getThisClass

CstType getThisClass()
Gets the field this_class, interpreted as a type constant.

Returns:
non-null; the value in question

getSuperclass

CstType getSuperclass()
Gets the field super_class, interpreted as a type constant if non-zero.

Returns:
null-ok; the value in question

getConstantPool

ConstantPool getConstantPool()
Gets the field constant_pool (along with constant_pool_count).

Returns:
non-null; the constant pool

getInterfaces

TypeList getInterfaces()
Gets the field interfaces (along with interfaces_count).

Returns:
non-null; the list of interfaces

getFields

FieldList getFields()
Gets the field fields (along with fields_count).

Returns:
non-null; the list of fields

getMethods

MethodList getMethods()
Gets the field methods (along with methods_count).

Returns:
non-null; the list of fields

getAttributes

AttributeList getAttributes()
Gets the field attributes (along with attributes_count).

Returns:
non-null; the list of attributes

getSourceFile

CstString getSourceFile()
Gets the name out of the SourceFile attribute of this file, if any. This is a convenient shorthand for scrounging around the class's attributes.

Returns:
non-null; the constant pool


Copyright © 2015. All rights reserved.