01: /* ===========================================================================
02: * $RCSfile: NameMapper.java,v $
03: * ===========================================================================
04: *
05: * RetroGuard -- an obfuscation package for Java classfiles.
06: *
07: * Copyright (c) 1998-2006 Mark Welsh (markw@retrologic.com)
08: *
09: * This program can be redistributed and/or modified under the terms of the
10: * Version 2 of the GNU General Public License as published by the Free
11: * Software Foundation.
12: *
13: * This program is distributed in the hope that it will be useful,
14: * but WITHOUT ANY WARRANTY; without even the implied warranty of
15: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16: * GNU General Public License for more details.
17: *
18: */
19:
20: package COM.rl.obf.classfile;
21:
22: import java.io.*;
23: import java.util.*;
24:
25: /**
26: * Interface to a class, method, field remapping table.
27: *
28: * @author Mark Welsh
29: */
30: public interface NameMapper {
31: // Interface Methods -----------------------------------------------------
32: /** Return a list of attributes marked to keep. */
33: public String[] getAttrsToKeep() throws Exception;
34:
35: /** Mapping for fully qualified class name. */
36: public String mapClass(String className) throws Exception;
37:
38: /** Mapping for method name, of fully qualified class. */
39: public String mapMethod(String className, String methodName,
40: String descriptor) throws Exception;
41:
42: /** Mapping for field name, of fully qualified class. */
43: public String mapField(String className, String fieldName)
44: throws Exception;
45:
46: /** Mapping for descriptor of field or method. */
47: public String mapDescriptor(String descriptor) throws Exception;
48:
49: /** Mapping for generic type signature. */
50: public String mapSignature(String signature) throws Exception;
51: }
|