1 package polyglot.types; 2 3 import polyglot.util.Position; 4 5 9 public interface Type extends Qualifier 10 { 11 16 String translate(Resolver c); 17 18 21 ArrayType arrayOf(); 22 23 26 ArrayType arrayOf(int dims); 27 28 31 ClassType toClass(); 32 33 36 NullType toNull(); 37 38 41 ReferenceType toReference(); 42 43 46 PrimitiveType toPrimitive(); 47 48 51 ArrayType toArray(); 52 53 56 boolean isSubtype(Type ancestor); 57 58 61 boolean descendsFrom(Type ancestor); 62 63 66 boolean isCastValid(Type toType); 67 68 72 boolean isImplicitCastValid(Type toType); 73 74 77 boolean numericConversionValid(Object value); 78 79 82 boolean numericConversionValid(long value); 83 84 87 boolean isSubtypeImpl(Type t); 88 89 92 boolean descendsFromImpl(Type t); 93 94 97 boolean isCastValidImpl(Type t); 98 99 103 boolean isImplicitCastValidImpl(Type t); 104 105 108 boolean numericConversionValidImpl(Object value); 109 110 114 boolean numericConversionValidImpl(long value); 115 116 119 boolean isPrimitive(); 120 121 124 boolean isVoid(); 125 126 129 boolean isBoolean(); 130 131 134 boolean isChar(); 135 136 139 boolean isByte(); 140 141 144 boolean isShort(); 145 146 149 boolean isInt(); 150 151 154 boolean isLong(); 155 156 159 boolean isFloat(); 160 161 164 boolean isDouble(); 165 166 169 boolean isIntOrLess(); 170 171 174 boolean isLongOrLess(); 175 176 179 boolean isNumeric(); 180 181 184 boolean isReference(); 185 186 189 boolean isNull(); 190 191 194 boolean isArray(); 195 196 199 boolean isClass(); 200 201 204 boolean isThrowable(); 205 206 209 boolean isUncheckedException(); 210 211 215 boolean isComparable(Type t); 216 217 228 String toString(); 229 } 230 | Popular Tags |