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.

devnotes.txt 4.0KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. -------------- Problems:
  2. ---- todo FIX output HTML is using "introduction" as labels.
  3. - use "[Summary|Details] of [fields|methods|constructors] declared for target types"
  4. ("target" rather than "other" since they may be defined on self?)
  5. - see also top index links:
  6. - super introductions...
  7. solution: change doclet resources
  8. ---- FIXED comments not displayed for inter-type declarations in the aspects
  9. solution: IntroducedDocImpl.java sets source location for the dec from the introduced dec
  10. > dec.setSourceLocation(introducedDec.getSourceLocation()); // PR790, 712
  11. ---- PARTIAL FIX: synthetic constructors are shown in the javadoc
  12. solution: post-process to remove unadvised constructors with same source location as parent class
  13. See ClassDocImpl.java
  14. problem with the solution: does not remove synthetic constructors on aspects??
  15. (only if they advise themselves?)
  16. ---- FIXED class cast exception trying to print introduced Constructor parameters
  17. solution:
  18. diff -r1.5 IntroducedDocImpl.java
  19. 105c107
  20. < makeParameters(((MethodDocImpl)cs[i]).
  21. ---
  22. > makeParameters(((ConstructorDocImpl)cs[i]).
  23. ---- introduced constructor names use the name of the declaring aspect, not the target
  24. solution:
  25. diff -r1.4 ConstructorDocImpl.java
  26. 53c56,58
  27. < return containingClass().name();
  28. ---
  29. > String qname = getQualifiedName();
  30. > return (null != qname ? qname : containingClass().name());
  31. ---- ok: in aspect docs, inter-type declarations targeting the aspect work as expected,
  32. with both the inter-type declaration and the aspect-declared member documented.
  33. ---- ajc prints out declare-warnings when compiling for ajdoc
  34. ---- in aspect docs, links out to affected classes not printed for introduced constructors
  35. essentially, the name of the constructor (should) differ for each target. sigh.
  36. - identifier should be the FQN of the aspect plus the type pattern and signature of the constructor.
  37. (parm signature - result, throws not required)
  38. - display label in the aspect should be the identifier
  39. -> currently is the name of the aspect plus ()
  40. - display label in affected classes should be the name of the affected class and the parm signature
  41. -> c
  42. ---- in target docs, links back to declaring aspects for introduced constructors fail
  43. (iff parms?)
  44. ---- in target docs, summaries of members declared by aspects do not list initial comment line.
  45. ---- is aspect docs, members declared on target types are displayed only with the member name,
  46. not the typepattern.
  47. see IntroducedDocImpl.java name()
  48. public String name() {
  49. // when using qualified name, unable to find links aout to targets
  50. // return (null != qualifiedName ? qualifiedName : dec().getId()); // XXX
  51. // when using id, only get simple name
  52. return dec().getId();
  53. }
  54. ==> get caller to use printedName as label
  55. UNFIXABLE - caller is sun doclet, and we only give it the member as parameter.
  56. We do control the names of the links out, but not the name of the member in the class,
  57. except to override qualifiedName, which causes the links out to fail (because
  58. IntroducedDocImpl.createTargets() uses MemberDocImpl.weakEquals() to discover
  59. all introduced members in other types to find out if they were introduced by this
  60. declaration (awful!), and [Method|Field|Member]DocImpl.weakEquals() implementations
  61. use name() - using qualifiedName() would result in false positives for any field
  62. in a target class). Overriding name() also causes other things to fail because it is
  63. used as an id. Even changing the name during the lifecycle seems risky. There's
  64. not a clean separation between the type name and the name as displayed.
  65. ---- in target class docs, introduced member links back to declaring aspect
  66. have the member name as their label; should have the aspect type.
  67. ---- bad fix: references to declaration targets lost and incomplete html thereafter
  68. is a result of modifying name() or qualifiedName() of memberDoc
  69. -------------- Background:
  70. ??
  71. declaration target - Introduced
  72. declaration source - Introduction