1 /******************************************************************************* 2 * Copyright (c) 2000, 2006 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 * Description of a constant pool as described in the JVM specifications. 15 * 16 * This interface may be implemented by clients. 17 * 18 * @since 2.0 19 */ 20 public interface IConstantPool { 21 22 /** 23 * Answer back the number of entries in the constant pool. 24 * 25 * @return the number of entries in the constant pool 26 */ 27 int getConstantPoolCount(); 28 29 /** 30 * Answer back the type of the entry at the index @index 31 * in the constant pool. 32 * 33 * @param index the index of the entry in the constant pool 34 * @return the type of the entry at the index @index in the constant pool 35 */ 36 int getEntryKind(int index); 37 38 /** 39 * Answer back the entry at the index @index 40 * in the constant pool. 41 * 42 * @param index the index of the entry in the constant pool 43 * @return the entry at the index @index in the constant pool 44 */ 45 IConstantPoolEntry decodeEntry(int index); 46 } 47