FileDocCategorySizeDatePackage
InterfaceMethodRefCPInfo.javaAPI DocApache Ant 1.704311Wed Dec 13 06:16:20 GMT 2006org.apache.tools.ant.taskdefs.optional.depend.constantpool

InterfaceMethodRefCPInfo

public class InterfaceMethodRefCPInfo extends ConstantPoolEntry
A InterfaceMethodRef CP Info

Fields Summary
private String
interfaceMethodClassName
the class name of the class defining the interface method
private String
interfaceMethodName
the name of the interface nmethod
private String
interfaceMethodType
the method signature of the interface method
private int
classIndex
the index into the constant pool of the class entry for the interface class
private int
nameAndTypeIndex
the index into the constant pool of the name and type entry describing the method
Constructors Summary
public InterfaceMethodRefCPInfo()
Constructor.

        super(CONSTANT_INTERFACEMETHODREF, 1);
    
Methods Summary
public java.lang.StringgetInterfaceMethodClassName()
Gets the name of the class defining the interface method

return
the name of the class defining the interface method

        return interfaceMethodClassName;
    
public java.lang.StringgetInterfaceMethodName()
Get the name of the interface method

return
the name of the interface method

        return interfaceMethodName;
    
public java.lang.StringgetInterfaceMethodType()
Gets the type of the interface method

return
the interface method's type signature

        return interfaceMethodType;
    
public voidread(java.io.DataInputStream cpStream)
read a constant pool entry from a class stream.

param
cpStream the DataInputStream which contains the constant pool entry to be read.
exception
IOException if there is a problem reading the entry from the stream.

        classIndex = cpStream.readUnsignedShort();
        nameAndTypeIndex = cpStream.readUnsignedShort();
    
public voidresolve(ConstantPool constantPool)
Resolve this constant pool entry with respect to its dependents in the constant pool.

param
constantPool the constant pool of which this entry is a member and against which this entry is to be resolved.

        ClassCPInfo interfaceMethodClass
             = (ClassCPInfo) constantPool.getEntry(classIndex);

        interfaceMethodClass.resolve(constantPool);

        interfaceMethodClassName = interfaceMethodClass.getClassName();

        NameAndTypeCPInfo nt
             = (NameAndTypeCPInfo) constantPool.getEntry(nameAndTypeIndex);

        nt.resolve(constantPool);

        interfaceMethodName = nt.getName();
        interfaceMethodType = nt.getType();

        super.resolve(constantPool);
    
public java.lang.StringtoString()
Print a readable version of the constant pool entry.

return
the string representation of this constant pool entry.

        String value;

        if (isResolved()) {
            value = "InterfaceMethod : Class = " + interfaceMethodClassName
                 + ", name = " + interfaceMethodName + ", type = "
                 + interfaceMethodType;
        } else {
            value = "InterfaceMethod : Class index = " + classIndex
                 + ", name and type index = " + nameAndTypeIndex;
        }

        return value;