com.android.dx.dex.file
Class EncodedMember

java.lang.Object
  extended by com.android.dx.dex.file.EncodedMember
All Implemented Interfaces:
ToHuman
Direct Known Subclasses:
EncodedField, EncodedMethod

public abstract class EncodedMember
extends Object
implements ToHuman

Representation of a member (field or method) of a class, for the purposes of encoding it inside a ClassDataItem.


Constructor Summary
EncodedMember(int accessFlags)
          Constructs an instance.
 
Method Summary
abstract  void addContents(DexFile file)
          Populates a DexFile with items from within this instance.
abstract  void debugPrint(PrintWriter out, boolean verbose)
          Does a human-friendly dump of this instance.
abstract  int encode(DexFile file, AnnotatedOutput out, int lastIndex, int dumpSeq)
          Encodes this instance to the given output.
 int getAccessFlags()
          Gets the access flags.
abstract  CstString getName()
          Gets the name.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.android.dx.util.ToHuman
toHuman
 

Constructor Detail

EncodedMember

public EncodedMember(int accessFlags)
Constructs an instance.

Parameters:
accessFlags - access flags for the member
Method Detail

getAccessFlags

public final int getAccessFlags()
Gets the access flags.

Returns:
the access flags

getName

public abstract CstString getName()
Gets the name.

Returns:
non-null; the name

debugPrint

public abstract void debugPrint(PrintWriter out,
                                boolean verbose)
Does a human-friendly dump of this instance.

Parameters:
out - non-null; where to dump
verbose - whether to be verbose with the output

addContents

public abstract void addContents(DexFile file)
Populates a DexFile with items from within this instance.

Parameters:
file - non-null; the file to populate

encode

public abstract int encode(DexFile file,
                           AnnotatedOutput out,
                           int lastIndex,
                           int dumpSeq)
Encodes this instance to the given output.

Parameters:
file - non-null; file this instance is part of
out - non-null; where to write to
lastIndex - >= 0; the previous member index value encoded, or 0 if this is the first element to encode
dumpSeq - >= 0; sequence number of this instance for annotation purposes
Returns:
>= 0; the member index value that was encoded


Copyright © 2015. All rights reserved.