KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > eclipse > jdt > core > util > IClassFileDisassembler


1 /*******************************************************************************
2  * Copyright (c) 2000, 2007 IBM Corporation and others.
3  * All rights reserved. This program and the accompanying materials
4  * are made available under the terms of the Eclipse Public License v1.0
5  * which accompanies this distribution, and is available at
6  * http://www.eclipse.org/legal/epl-v10.html
7  *
8  * Contributors:
9  * IBM Corporation - initial API and implementation
10  *******************************************************************************/

11 package org.eclipse.jdt.core.util;
12
13 /**
14  * This interface is intended to be implemented to disassemble
15  * IClassFileReader onto a String using the proper line separator.
16  *
17  * @since 2.0
18  * @deprecated Use {@link ClassFileBytesDisassembler} instead
19  */

20 public interface IClassFileDisassembler {
21     
22     /**
23      * The mode is the detailed mode to disassemble IClassFileReader. It returns the magic
24      * numbers, the version numbers and field and method descriptors.
25      */

26     int DETAILED = 1;
27     
28     /**
29      * The mode is the default mode to disassemble IClassFileReader.
30      */

31     int DEFAULT = 2;
32     /**
33      * Answers back the disassembled string of the IClassFileReader using the default
34      * mode.
35      * This is an output quite similar to the javap tool, using DEFAULT mode.
36      *
37      * @param classFileReader The classFileReader to be disassembled
38      * @param lineSeparator the line separator to use.
39      *
40      * @return the disassembled string of the IClassFileReader using the default mode.
41      */

42     String JavaDoc disassemble(IClassFileReader classFileReader, String JavaDoc lineSeparator);
43
44     /**
45      * Answers back the disassembled string of the IClassFileReader according to the
46      * mode.
47      * This is an output quite similar to the javap tool.
48      *
49      * @param classFileReader The classFileReader to be disassembled
50      * @param lineSeparator the line separator to use.
51      * @param mode the mode used to disassemble the IClassFileReader
52      *
53      * @return the disassembled string of the IClassFileReader according to the mode
54      */

55     String JavaDoc disassemble(IClassFileReader classFileReader, String JavaDoc lineSeparator, int mode);
56 }
57
Popular Tags