1
/* $Id: InterfaceMethodrefCpInfo.java,v 1.20 2004/11/07 18:49:09 eric Exp $
3
* ProGuard -- shrinking, optimization, and obfuscation of Java class files.
5
* Copyright (c) 1999 Mark Welsh (markw@retrologic.com)
6
* Copyright (c) 2002-2004 Eric Lafortune (eric@graphics.cornell.edu)
8
* This library is free software; you can redistribute it and/or modify it
9
* under the terms of the GNU General Public License as published by the Free
10
* Software Foundation; either version 2 of the License, or (at your option)
13
* This library is distributed in the hope that it will be useful, but WITHOUT
14
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
15
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
18
* You should have received a copy of the GNU Lesser General Public License
19
* along with this library; if not, write to the Free Software Foundation,
20
* Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
22
package proguard.classfile;
24
import proguard.classfile.visitor.*;
27
* Representation of a 'interface method reference' entry in the ConstantPool.
30
* @author Eric Lafortune
32
public class InterfaceMethodrefCpInfo extends RefCpInfo
34
protected InterfaceMethodrefCpInfo()
40
* Creates a new InterfaceMethodrefCpInfo with the given name and type indices.
41
* @param u2classIndex the index of the class in the constant pool.
42
* @param u2nameAndTypeIndex the index of the name and type entry in the constant pool.
43
* @param referencedClassFile the referenced class file.
44
* @param referencedMemberInfo the referenced member info.
46
public InterfaceMethodrefCpInfo(int u2classIndex,
47
int u2nameAndTypeIndex,
48
ClassFile referencedClassFile,
49
MemberInfo referencedMemberInfo)
51
this.u2classIndex = u2classIndex;
52
this.u2nameAndTypeIndex = u2nameAndTypeIndex;
53
this.referencedClassFile = referencedClassFile;
54
this.referencedMemberInfo = referencedMemberInfo;
58
// Implementations for CpInfo.
62
return ClassConstants.CONSTANT_InterfaceMethodref;
65
public void accept(ClassFile classFile, CpInfoVisitor cpInfoVisitor)
67
cpInfoVisitor.visitInterfaceMethodrefCpInfo(classFile, this);