1 /******************************************************************************* 2 * Copyright (c) 2000, 2003 IBM Corporation and others. 3 * All rights reserved. This program and the accompanying materials 4 * are made available under the terms of the Common Public License v1.0 5 * which accompanies this distribution, and is available at 6 * http://www.eclipse.org/legal/cpl-v10.html 7 * 8 * Contributors: 9 * IBM Corporation - initial API and implementation 10 *******************************************************************************/ 11 package net.sourceforge.phpdt.internal.compiler.env; 12 13 import net.sourceforge.phpdt.core.compiler.CharOperation; 14 15 public interface IBinaryType extends IGenericType { 16 17 char[][] NoInterface = CharOperation.NO_CHAR_CHAR; 18 19 IBinaryNestedType[] NoNestedType = new IBinaryNestedType[0]; 20 21 IBinaryField[] NoField = new IBinaryField[0]; 22 23 IBinaryMethod[] NoMethod = new IBinaryMethod[0]; 24 25 /** 26 * Answer the resolved name of the enclosing type in the class file format 27 * as specified in section 4.2 of the Java 2 VM spec or null if the receiver 28 * is a top level type. 29 * 30 * For example, java.lang.String is java/lang/String. 31 */ 32 getEnclosingTypeName()33 char[] getEnclosingTypeName(); 34 35 /** 36 * Answer the receiver's fields or null if the array is empty. 37 */ 38 getFields()39 IBinaryField[] getFields(); 40 41 /** 42 * Answer the resolved names of the receiver's interfaces in the class file 43 * format as specified in section 4.2 of the Java 2 VM spec or null if the 44 * array is empty. 45 * 46 * For example, java.lang.String is java/lang/String. 47 */ 48 getInterfaceNames()49 char[][] getInterfaceNames(); 50 51 /** 52 * Answer the receiver's nested types or null if the array is empty. 53 * 54 * This nested type info is extracted from the inner class attributes. Ask 55 * the name environment to find a member type using its compound name. 56 */ 57 58 // NOTE: The compiler examines the nested type info & ignores the local 59 // types 60 // so the local types do not have to be included. getMemberTypes()61 IBinaryNestedType[] getMemberTypes(); 62 63 /** 64 * Answer the receiver's methods or null if the array is empty. 65 */ 66 getMethods()67 IBinaryMethod[] getMethods(); 68 69 /** 70 * Answer the resolved name of the type in the class file format as 71 * specified in section 4.2 of the Java 2 VM spec. 72 * 73 * For example, java.lang.String is java/lang/String. 74 */ 75 getName()76 char[] getName(); 77 78 /** 79 * Answer the resolved name of the receiver's superclass in the class file 80 * format as specified in section 4.2 of the Java 2 VM spec or null if it 81 * does not have one. 82 * 83 * For example, java.lang.String is java/lang/String. 84 */ 85 getSuperclassName()86 char[] getSuperclassName(); 87 88 /** 89 * Answer true if the receiver is an anonymous class. false otherwise 90 */ isAnonymous()91 boolean isAnonymous(); 92 93 /** 94 * Answer true if the receiver is a local class. false otherwise 95 */ isLocal()96 boolean isLocal(); 97 98 /** 99 * Answer true if the receiver is a member class. false otherwise 100 */ isMember()101 boolean isMember(); 102 103 /** 104 * Answer the source file attribute, or null if none. 105 * 106 * For example, "String.java" 107 */ 108 sourceFileName()109 char[] sourceFileName(); 110 111 } 112