FileDocCategorySizeDatePackage
ClassMemberInfo.javaAPI DocJ2ME CLDC 1.12322Wed Feb 05 15:56:02 GMT 2003components

ClassMemberInfo

public abstract class ClassMemberInfo extends ClassComponent

Fields Summary
public int
access
public int
nameIndex
public int
typeIndex
public UnicodeConstant
name
public UnicodeConstant
type
public ClassInfo
parent
private int
ID
private boolean
computedID
public int
index
public int
flags
public static final int
INCLUDE
Constructors Summary
public ClassMemberInfo(int n, int t, int a, ClassInfo p)

 // a flag value.

              
    nameIndex = n;
    typeIndex = t;
    access    = a;
    parent    = p;
    flags      = INCLUDE; // by default, we want everything.
    
Methods Summary
public voidcountConstantReferences()

    if ( name != null ) name.incReference();
    if ( type != null ) type.incReference();
    
public voidexternalize(ConstantPool p)

    name = (UnicodeConstant)p.add( name );
    type = (UnicodeConstant)p.add( type );
    
public intgetID()

    if ( ! computedID ){
        ID       = Str2ID.sigHash.getID( name, type );
        computedID = true;
    }
    return ID;
    
public booleanisPrivateMember()

    return ( (access & Const.ACC_PRIVATE) != 0 );
    
public booleanisStaticMember()

    return ( (access & Const.ACC_STATIC) != 0 );
    
public java.lang.StringqualifiedName()

    if ( resolved ){
        return name.string+":"+type.string;
    }else{
        return Util.accessToString(access)+" "+parent.className+" [ "+nameIndex+" : "+typeIndex+" ]";
    }
    
public voidresolve(ConstantObject[] table)

    if ( resolved ) return;
    name     = (UnicodeConstant)table[nameIndex];
    type     = (UnicodeConstant)table[typeIndex];
    resolved = true;
    
public java.lang.StringtoString()

    if ( resolved ){
        return Util.accessToString(access)+" "+name.string+" : "+type.string;
    } else {
        return Util.accessToString(access)+" [ "+nameIndex+" : "+typeIndex+" ]";
    }