| Modifier and Type | Field and Description |
|---|---|
| private final int | accessFlags
access flags |
| private AnnotationsDirectoryItem | annotationsDirectory
|
| private final ClassDataItem | classData
|
| private TypeListItem | interfaces
|
| private final CstString | sourceFile
|
| private EncodedArrayItem | staticValuesItem
|
| private final CstType | superclass
|
| private final CstType | thisClass
|
| Access | Constructor and Description |
|---|---|
| public | ClassDefItem(CstType
non-null; type constant for this classaccess flags accessFlags, CstType null-ok; superclass or null if
this class is a/the root classnon-null; list of implemented interfacesnull-ok; source file name or
null if unknownConstructs an instance. |
| Modifier and Type | Method and Description |
|---|---|
| public void | addContents(DexFile
non-null; the file to populateImplements abstract org. DexFile with items from within this instance.
|
| public void | addDirectMethod(EncodedMethod
non-null; the method to addAdds a direct ( |
| public void | addFieldAnnotations(CstFieldRef
non-null; field in questionnon-null; associated annotations to addAdds a field annotations item to this class. |
| public void | |
| public void | addMethodAnnotations(CstMethodRef
non-null; method in questionnon-null; associated annotations to addAdds a method annotations item to this class. |
| public void | addParameterAnnotations(CstMethodRef
non-null; method in questionnon-null; associated list of annotation sets to addAdds a parameter annotations item to this class. |
| public void | addStaticField(EncodedField
non-null; the field to addnull-ok; initial value for the field, if anyAdds a static field. |
| public void | |
| public void | debugPrint(Writer
non-null; where to output towhether to be verbose with the output verbose)Prints out the contents of this instance, in a debugging-friendly way. |
| public int | |
| public TypeList | |
| public Annotations | Returns: null-ok; the method annotations, if anynon-null; the methodGets the method annotations for a given method, if any. |
| public ArrayList | |
| public AnnotationsList | Returns: null-ok; the parameter annotations, if anynon-null; the methodGets the parameter annotations for a given method, if any. |
| public CstString | |
| public CstType | Returns: null-ok; the superclass or null if
this class is a/the root classGets the superclass. |
| public CstType | |
| public ItemType | itemType()
Implements abstract org. |
| public void | setClassAnnotations(Annotations
non-null; annotations to set for this classSets the direct annotations on this class. |
| public int | writeSize()
Implements abstract org. |
| public void | writeTo(DexFile
non-null; the file to use for referencenon-null; where to write toImplements abstract org. DexFile to look things up as needed.
|
| accessFlags | back to summary |
|---|---|
| private final int accessFlags access flags | |
| annotationsDirectory | back to summary |
|---|---|
| private AnnotationsDirectoryItem annotationsDirectory
| |
| classData | back to summary |
|---|---|
| private final ClassDataItem classData
| |
| interfaces | back to summary |
|---|---|
| private TypeListItem interfaces
| |
| sourceFile | back to summary |
|---|---|
| private final CstString sourceFile
| |
| staticValuesItem | back to summary |
|---|---|
| private EncodedArrayItem staticValuesItem
| |
| superclass | back to summary |
|---|---|
| private final CstType superclass
| |
| thisClass | back to summary |
|---|---|
| private final CstType thisClass
| |
| ClassDefItem | back to summary |
|---|---|
| public ClassDefItem(CstType thisClass, int accessFlags, CstType superclass, TypeList interfaces, CstString sourceFile) Constructs an instance. Its sets of members and annotations are initially empty. | |
| addContents | back to summary |
|---|---|
| public void addContents(DexFile file) Implements abstract org. Doc from org. Populates a Note Subclasses must override this to do something appropriate. | |
| addDirectMethod | back to summary |
|---|---|
| public void addDirectMethod(EncodedMethod method) Adds a direct (
| |
| addFieldAnnotations | back to summary |
|---|---|
| public void addFieldAnnotations(CstFieldRef field, Annotations annotations) Adds a field annotations item to this class.
| |
| addInstanceField | back to summary |
|---|---|
| public void addInstanceField(EncodedField field) Adds an instance field.
| |
| addMethodAnnotations | back to summary |
|---|---|
| public void addMethodAnnotations(CstMethodRef method, Annotations annotations) Adds a method annotations item to this class.
| |
| addParameterAnnotations | back to summary |
|---|---|
| public void addParameterAnnotations(CstMethodRef method, AnnotationsList list) Adds a parameter annotations item to this class.
| |
| addStaticField | back to summary |
|---|---|
| public void addStaticField(EncodedField field, Constant value) Adds a static field.
| |
| addVirtualMethod | back to summary |
|---|---|
| public void addVirtualMethod(EncodedMethod method) Adds a virtual method.
| |
| debugPrint | back to summary |
|---|---|
| public void debugPrint(Writer out, boolean verbose) Prints out the contents of this instance, in a debugging-friendly way.
| |
| getAccessFlags | back to summary |
|---|---|
| public int getAccessFlags() Gets the access flags.
| |
| getInterfaces | back to summary |
|---|---|
| public TypeList getInterfaces() Gets the list of interfaces implemented.
| |
| getMethodAnnotations | back to summary |
|---|---|
| public Annotations getMethodAnnotations(CstMethodRef method) Gets the method annotations for a given method, if any. This is meant for use by debugging / dumping code.
| |
| getMethods | back to summary |
|---|---|
| public ArrayList Gets all the methods in this class. The returned list is not linked in any way to the underlying lists contained in this instance, but the objects contained in the list are shared.
| |
| getParameterAnnotations | back to summary |
|---|---|
| public AnnotationsList getParameterAnnotations(CstMethodRef method) Gets the parameter annotations for a given method, if any. This is meant for use by debugging / dumping code.
| |
| getSourceFile | back to summary |
|---|---|
| public CstString getSourceFile() Gets the source file name.
| |
| getSuperclass | back to summary |
|---|---|
| public CstType getSuperclass() Gets the superclass.
| |
| getThisClass | back to summary |
|---|---|
| public CstType getThisClass() Gets the constant corresponding to this class.
| |
| itemType | back to summary |
|---|---|
| public ItemType itemType() Implements abstract org. Doc from org. Returns the item type for this instance. | |
| setClassAnnotations | back to summary |
|---|---|
| public void setClassAnnotations(Annotations annotations) Sets the direct annotations on this class. These are annotations made on the class, per se, as opposed to on one of its members. It is only valid to call this method at most once per instance.
| |
| writeSize | back to summary |
|---|---|
| public int writeSize() Implements abstract org. Doc from org. Gets the size of this instance when written, in bytes.
| |
| writeTo | back to summary |
|---|---|
| public void writeTo(DexFile file, AnnotatedOutput out) Implements abstract org. Doc from org. Writes the representation of this instance to the given data section,
using the given
| |