1b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato/*
2b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * ProGuard -- shrinking, optimization, obfuscation, and preverification
3b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato *             of Java bytecode.
4b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato *
5b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * Copyright (c) 2002-2009 Eric Lafortune (eric@graphics.cornell.edu)
6b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato *
7b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * This program is free software; you can redistribute it and/or modify it
8b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * under the terms of the GNU General Public License as published by the Free
9b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * Software Foundation; either version 2 of the License, or (at your option)
10b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * any later version.
11b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato *
12b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * This program is distributed in the hope that it will be useful, but WITHOUT
13b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
15b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * more details.
16b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato *
17b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * You should have received a copy of the GNU General Public License along
18b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * with this program; if not, write to the Free Software Foundation, Inc.,
19b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato */
21b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onoratopackage proguard.evaluation;
22b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato
23b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onoratoimport proguard.classfile.*;
24b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onoratoimport proguard.classfile.attribute.CodeAttribute;
25b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onoratoimport proguard.classfile.instruction.ConstantInstruction;
26b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onoratoimport proguard.evaluation.value.Value;
27b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato
28b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato/**
29b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * This interface sets up the variables for entering a method,
30b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * and it updates the stack for the invocation of a class member.
31b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato *
32b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato * @author Eric Lafortune
33b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato */
34b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onoratopublic interface InvocationUnit
35b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato{
36b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato    /**
37b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato     * Sets up the given variables for entering the given method.
38b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato     */
39b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato    public void enterMethod(Clazz     clazz,
40b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato                            Method    method,
41b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato                            Variables variables);
42b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato
43b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato
44b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato    /**
45b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato     * Exits the given method with the given return value.
46b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato     */
47b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato    public void exitMethod(Clazz  clazz,
48b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato                           Method method,
49b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato                           Value  returnValue);
50b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato
51b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato
52b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato    /**
53b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato     * Updates the given stack corresponding to the execution of the given
54b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato     * field or method reference instruction.
55b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato     */
56b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato    public void invokeMember(Clazz               clazz,
57b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato                             Method              method,
58b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato                             CodeAttribute       codeAttribute,
59b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato                             int                 offset,
60b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato                             ConstantInstruction constantInstruction,
61b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato                             Stack               stack);
62b72c5c2e5482cf10117b2b25f642f7616b2326c3Joe Onorato}
63