~ubuntu-branches/ubuntu/breezy/proguard/breezy

« back to all changes in this revision

Viewing changes to src/proguard/classfile/InterfaceMethodrefCpInfo.java

  • Committer: Bazaar Package Importer
  • Author(s): Sam Clegg
  • Date: 2005-06-17 14:25:24 UTC
  • Revision ID: james.westby@ubuntu.com-20050617142524-thz2yfa3vemy3j9d
Tags: upstream-3.2
ImportĀ upstreamĀ versionĀ 3.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* $Id: InterfaceMethodrefCpInfo.java,v 1.20 2004/11/07 18:49:09 eric Exp $
 
2
 *
 
3
 * ProGuard -- shrinking, optimization, and obfuscation of Java class files.
 
4
 *
 
5
 * Copyright (c) 1999      Mark Welsh (markw@retrologic.com)
 
6
 * Copyright (c) 2002-2004 Eric Lafortune (eric@graphics.cornell.edu)
 
7
 *
 
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)
 
11
 * any later version.
 
12
 *
 
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
 
16
 * for more details.
 
17
 *
 
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
 
21
 */
 
22
package proguard.classfile;
 
23
 
 
24
import proguard.classfile.visitor.*;
 
25
 
 
26
/**
 
27
 * Representation of a 'interface method reference' entry in the ConstantPool.
 
28
 *
 
29
 * @author Mark Welsh
 
30
 * @author Eric Lafortune
 
31
 */
 
32
public class InterfaceMethodrefCpInfo extends RefCpInfo
 
33
{
 
34
    protected InterfaceMethodrefCpInfo()
 
35
    {
 
36
    }
 
37
 
 
38
 
 
39
    /**
 
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.
 
45
     */
 
46
    public InterfaceMethodrefCpInfo(int        u2classIndex,
 
47
                                    int        u2nameAndTypeIndex,
 
48
                                    ClassFile  referencedClassFile,
 
49
                                    MemberInfo referencedMemberInfo)
 
50
    {
 
51
        this.u2classIndex         = u2classIndex;
 
52
        this.u2nameAndTypeIndex   = u2nameAndTypeIndex;
 
53
        this.referencedClassFile  = referencedClassFile;
 
54
        this.referencedMemberInfo = referencedMemberInfo;
 
55
    }
 
56
 
 
57
 
 
58
    // Implementations for CpInfo.
 
59
 
 
60
    public int getTag()
 
61
    {
 
62
        return ClassConstants.CONSTANT_InterfaceMethodref;
 
63
    }
 
64
 
 
65
    public void accept(ClassFile classFile, CpInfoVisitor cpInfoVisitor)
 
66
    {
 
67
        cpInfoVisitor.visitInterfaceMethodrefCpInfo(classFile, this);
 
68
    }
 
69
}