genericRefType.setDelegate(ret); rawType.setGenericType(genericRefType); typeMap.put(signature, rawType); } else { referenceTypeFromTypeMap = new ReferenceType(signature, this); ret = buildBcelDelegate(referenceTypeFromTypeMap, jc, artificial, true); typeMap.put(signature, referenceTypeFromTypeMap);
genericRefType.setDelegate(retval); referenceTypeFromTypeMap.setGenericType(genericRefType); typeMap.put(signature, referenceTypeFromTypeMap); } else { referenceTypeFromTypeMap = new ReferenceType(signature, this); retval = buildBcelDelegate(referenceTypeFromTypeMap, jc, artificial, true); typeMap.put(signature, referenceTypeFromTypeMap);
if (rawType == null) { rawType = resolve(UnresolvedType.forSignature(rawSignature), allowMissing); typeMap.put(rawSignature, rawType);
/** * Some TypeFactory operations create resolved types directly, but these won't be in the typeMap - this resolution process puts * them there. Resolved types are also told their world which is needed for the special autoboxing resolved types. */ public ResolvedType resolve(ResolvedType ty) { if (ty.isTypeVariableReference()) { return ty; // until type variables have proper sigs... } ResolvedType resolved = typeMap.get(ty.getSignature()); if (resolved == null) { resolved = ensureRawTypeIfNecessary(ty); typeMap.put(ty.getSignature(), resolved); resolved = ty; } resolved.world = this; return resolved; }
/** * Insert the primitives */ protected World() { super(); // Dump.registerNode(this.getClass(), this); typeMap.put("B", BYTE); typeMap.put("S", SHORT); typeMap.put("I", INT); typeMap.put("J", LONG); typeMap.put("F", FLOAT); typeMap.put("D", DOUBLE); typeMap.put("C", CHAR); typeMap.put("Z", BOOLEAN); typeMap.put("V", VOID); precedenceCalculator = new AspectPrecedenceCalculator(this); }
/** * Lookup a type by signature, if not found then build one and put it in the map. */ public ReferenceType lookupOrCreateName(UnresolvedType ty) { String signature = ty.getSignature(); ReferenceType ret = lookupBySignature(signature); if (ret == null) { ret = ReferenceType.fromTypeX(ty, this); typeMap.put(signature, ret); } return ret; }