1 /*******************************************************************************
2  * Copyright (c) 2000, 2009 IBM Corporation and others.
3  *
4  * This program and the accompanying materials
5  * are made available under the terms of the Eclipse Public License 2.0
6  * which accompanies this distribution, and is available at
7  * https://www.eclipse.org/legal/epl-2.0/
8  *
9  * SPDX-License-Identifier: EPL-2.0
10  *
11  * Contributors:
12  *     IBM Corporation - initial API and implementation
13  *******************************************************************************/
14 package org.eclipse.jdt.core.util;
15 
16 /**
17  * Description of a verification type info as described in the JVM specifications.
18  *
19  * This interface may be implemented by clients.
20  *
21  * @since 3.0
22  */
23 public interface IVerificationTypeInfo {
24 	/**
25 	 * The tag value representing top variable info
26 	 * @since 3.2
27 	 */
28 	public static final int ITEM_TOP = 0;
29 	/**
30 	 * The tag value representing integer variable info
31 	 * @since 3.2
32 	 */
33 	public static final int ITEM_INTEGER = 1;
34 	/**
35 	 * The tag value representing float variable info
36 	 * @since 3.2
37 	 */
38 	public static final int ITEM_FLOAT = 2;
39 	/**
40 	 * The tag value representing double variable info
41 	 * @since 3.2
42 	 */
43 	public static final int ITEM_DOUBLE = 3;
44 	/**
45 	 * The tag value representing long variable info
46 	 * @since 3.2
47 	 */
48 	public static final int ITEM_LONG = 4;
49 	/**
50 	 * The tag value representing null variable info
51 	 * @since 3.2
52 	 */
53 	public static final int ITEM_NULL = 5;
54 	/**
55 	 * The tag value representing uninitialized this variable info
56 	 * @since 3.2
57 	 */
58 	public static final int ITEM_UNINITIALIZED_THIS = 6;
59 	/**
60 	 * The tag value representing object variable info
61 	 * @since 3.2
62 	 */
63 	public static final int ITEM_OBJECT = 7;
64 	/**
65 	 * The tag value representing uninitialized variable info
66 	 * @since 3.2
67 	 */
68 	public static final int ITEM_UNINITIALIZED = 8;
69 
70 	/**
71 	 * Answer back the tag of this verification type info as described in the JVM specifications.
72 	 * <ul>
73 	 * <li>0 for the top type</li>
74 	 * <li>1 for the int type</li>
75 	 * <li>2 for the float type</li>
76 	 * <li>3 for the double type</li>
77 	 * <li>4 for the long type</li>
78 	 * <li>5 for the null type</li>
79 	 * <li>6 for the uninitialized this type</li>
80 	 * <li>7 for the object type</li>
81 	 * <li>8 for the uninitialized offset type</li>
82 	 * </ul>
83 	 *
84 	 * @return the tag of this verification type info as described in the JVM specifications
85 	 * @since 3.0
86 	 */
getTag()87 	int getTag();
88 
89 	/**
90 	 * Answer back the offset of this verification type info as described in the JVM specifications.
91 	 * This makes sense only if the tag is 8.
92 	 *
93 	 * @return the offset of this verification type info as described in the JVM specifications
94 	 * @since 3.0
95 	 */
getOffset()96 	int getOffset();
97 
98 	/**
99 	 * Answer back the constant pool index of this verification type info as described in the JVM specifications.
100 	 * This makes sense only if the tag is 7.
101 	 *
102 	 * @return the constant pool index of this verification type info as described in the JVM specifications
103 	 * @since 3.0
104 	 */
getConstantPoolIndex()105 	int getConstantPoolIndex();
106 
107 	/**
108 	 * Answer back the name of the class type referenced by the index in the constant pool
109 	 * as described in the JVM specifications.
110 	 * This makes sense only if the tag is 7.
111 	 *
112 	 * @return the name of the class type referenced by the index in the constant pool
113 	 * as described in the JVM specifications
114 	 * @since 3.0
115 	 */
getClassTypeName()116 	char[] getClassTypeName();
117 }
118