You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

raw types.txt 2.1KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. Current situation with respect to raw types...
  2. * We can create an unresolved type (typeKind = SIMPLE) by
  3. UnresolvedType.forSignature or forName
  4. * We can create an unresolved type (typeKind = RAW) by calling
  5. UnresolvedType.forRawTypeName
  6. This method is called by...
  7. BcelWorld.addSourceObjectType when types in jar files or on the classpath are added to
  8. the weaver for processing. If the JavaClass is determined to be generic then a raw
  9. UnresolvedType is built and a ReferenceType constructed from that. A BcelObjectType is
  10. built using the Resolved raw type (and when it's generic signature is unpacked later that will
  11. be swapped out for the generic type). Then a generic type is created, the delegates of
  12. the generic and raw types are set to point to the BcelObjectType, and the generic type
  13. of the raw type is set to point to the generic type. The raw type is explicitly added into
  14. the typeMap.
  15. EclipseFactory.addSourceTypeBinding when adding a binding for a generic type during
  16. completeTypeBindings. This is put into the world by calling world.lookupOrCreateName.
  17. Then a generic type is created and the raw type's generic type is set to refer to it.
  18. EclipseFactory.fromBinding when processing a RawTypeBinding. A later call to resolve
  19. is responsible for adding this to the type map.
  20. * World.resolve processing works as follows:
  21. in resolveObjectType, if the typeKind of the UnresolvedType is neither parameterized
  22. nor generic, then a new ReferenceType is created using the rawTypeSignature of the
  23. unresolved type. Then the delegate is created, and if this turns out to be generic then a
  24. generic type is also built and set as the generic type of the reference type (but nothing
  25. sets the type of the reference type to raw???).
  26. in resolveTheGenericType the rawTypeSignature is looked up in the typeMap. If it
  27. is not found, then a new UnresolvedType is created forSignature, resolved (see above),
  28. and put in the type map. The generic type is then created and set as the generic type
  29. of the raw type.