ProGuard

proguard.classfile
Class ProgramMemberInfo

java.lang.Object
  extended byproguard.classfile.ProgramMemberInfo
All Implemented Interfaces:
MemberInfo, VisitorAccepter
Direct Known Subclasses:
ProgramFieldInfo, ProgramMethodInfo

public abstract class ProgramMemberInfo
extends Object
implements MemberInfo

Representation of a field or method from a program class file.


Field Summary
 AttrInfo[] attributes
           
 ClassFile[] referencedClassFiles
          An extra field pointing to the ClassFile objects referenced in the descriptor string.
 int u2accessFlags
           
 int u2attributesCount
           
 int u2descriptorIndex
           
 int u2nameIndex
           
 Object visitorInfo
          An extra field in which visitors can store information.
 
Constructor Summary
protected ProgramMemberInfo()
           
 
Method Summary
 void accept(ClassFile classFile, MemberInfoVisitor memberInfoVisitor)
          Accepts the given class file visitor.
abstract  void accept(ProgramClassFile programClassFile, MemberInfoVisitor memberInfoVisitor)
          Accepts the given member info visitor.
abstract  void attributesAccept(ProgramClassFile programClassFile, AttrInfoVisitor attrInfoVisitor)
          Lets the given attribute info visitor visit all the attributes of this member info.
 int getAccessFlags()
          Returns access flags.
 String getDescriptor(ClassFile classFile)
          Returns descriptor string.
 String getLineNumberRange(ClassFile classFile)
          Returns the line number range of the given class member as "m:n", if it can find it, or null otherwise.
 String getName(ClassFile classFile)
          Returns method/field string name.
 Object getVisitorInfo()
          Gets the visitor information of the visitor accepter.
protected  void read(DataInput din, ClassFile cf)
          Imports the field or method data to internal representation.
 void referencedClassesAccept(ClassFileVisitor classFileVisitor)
          Lets the ClassFile objects referenced in the descriptor string accept the given visitor.
 void setVisitorInfo(Object visitorInfo)
          Sets the visitor information of the visitor accepter.
 void write(DataOutput dout)
          Exports the representation to a DataOutput stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

u2accessFlags

public int u2accessFlags

u2nameIndex

public int u2nameIndex

u2descriptorIndex

public int u2descriptorIndex

u2attributesCount

public int u2attributesCount

attributes

public AttrInfo[] attributes

referencedClassFiles

public ClassFile[] referencedClassFiles
An extra field pointing to the ClassFile objects referenced in the descriptor string. This field is filled out by the ClassFileReferenceInitializer. References to primitive types are ignored. References to library classes are left blank (null).


visitorInfo

public Object visitorInfo
An extra field in which visitors can store information.

Constructor Detail

ProgramMemberInfo

protected ProgramMemberInfo()
Method Detail

getLineNumberRange

public String getLineNumberRange(ClassFile classFile)
Returns the line number range of the given class member as "m:n", if it can find it, or null otherwise.


accept

public abstract void accept(ProgramClassFile programClassFile,
                            MemberInfoVisitor memberInfoVisitor)
Accepts the given member info visitor.


attributesAccept

public abstract void attributesAccept(ProgramClassFile programClassFile,
                                      AttrInfoVisitor attrInfoVisitor)
Lets the given attribute info visitor visit all the attributes of this member info.


referencedClassesAccept

public void referencedClassesAccept(ClassFileVisitor classFileVisitor)
Lets the ClassFile objects referenced in the descriptor string accept the given visitor.


read

protected void read(DataInput din,
                    ClassFile cf)
             throws IOException
Imports the field or method data to internal representation.

Throws:
IOException

write

public void write(DataOutput dout)
           throws IOException
Exports the representation to a DataOutput stream.

Throws:
IOException

getAccessFlags

public int getAccessFlags()
Description copied from interface: MemberInfo
Returns access flags.

Specified by:
getAccessFlags in interface MemberInfo

getName

public String getName(ClassFile classFile)
Description copied from interface: MemberInfo
Returns method/field string name.

Specified by:
getName in interface MemberInfo

getDescriptor

public String getDescriptor(ClassFile classFile)
Description copied from interface: MemberInfo
Returns descriptor string.

Specified by:
getDescriptor in interface MemberInfo

accept

public void accept(ClassFile classFile,
                   MemberInfoVisitor memberInfoVisitor)
Description copied from interface: MemberInfo
Accepts the given class file visitor.

Specified by:
accept in interface MemberInfo

getVisitorInfo

public Object getVisitorInfo()
Description copied from interface: VisitorAccepter
Gets the visitor information of the visitor accepter.

Specified by:
getVisitorInfo in interface VisitorAccepter

setVisitorInfo

public void setVisitorInfo(Object visitorInfo)
Description copied from interface: VisitorAccepter
Sets the visitor information of the visitor accepter.

Specified by:
setVisitorInfo in interface VisitorAccepter

ProGuard