Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.

aspectj_1_5_0.dtd 6.9KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!--*****************************************************************************************************************************
  3. AspectJ 5 DTD
  4. To use this DTD, start your defintion file with
  5. <!DOCTYPE aspectj PUBLIC
  6. "-//AspectJ//DTD 1.5.0//EN"
  7. "http://.../dtd/aspectj_1_5_0.dtd">
  8. You can also use the "aliasing DTD" that matchs always the latest release of AspectJ
  9. <!DOCTYPE aspectj PUBLIC
  10. "-//AspectJ//DTD//EN"
  11. "http://.../dtd/aspectj.dtd">
  12. To not use this DTD, start your definition file with
  13. <?xml version="1.0"?>
  14. ******************************************************************************************************************************-->
  15. <!--*****************************************************************************************************************************
  16. aspectj
  17. *********************************************************************************************************************************
  18. [aspectj] defines the root element
  19. ******************************************************************************************************************************-->
  20. <!ELEMENT aspectj (
  21. weaver?,
  22. aspects?
  23. )>
  24. <!--*****************************************************************************************************************************
  25. weaver
  26. *********************************************************************************************************************************
  27. [weaver] defines the weaver configuration
  28. @options defines a command like line of option
  29. When multiple aspectj DD are found, the options are simply toggled
  30. TODO: Note: the scope of the options can be ClassLoader aware but should be assumed JVM wide
  31. ******************************************************************************************************************************-->
  32. <!ELEMENT weaver (
  33. (include | exclude)*
  34. )>
  35. <!ATTLIST weaver
  36. options CDATA #IMPLIED
  37. >
  38. <!--*****************************************************************************************************************************
  39. include
  40. *********************************************************************************************************************************
  41. [include] narrows the scope of the weaver
  42. A class must be matched by ALL the include elements to be exposed to the weaver
  43. @within defines a type pattern
  44. (it is not a startWith)
  45. ******************************************************************************************************************************-->
  46. <!ELEMENT include EMPTY>
  47. <!ATTLIST include
  48. within CDATA #REQUIRED
  49. >
  50. <!--*****************************************************************************************************************************
  51. exclude
  52. *********************************************************************************************************************************
  53. [exclude] narrows the scope of the weaver
  54. A class must be matched by NONE of the exclude elements to be exposed to the weaver
  55. @within defines a type pattern
  56. (it is not a startWith)
  57. TODO should it be called @from: "<exclude from=..> instead of <exclude within=..>
  58. TODO: AND must be written that way and not with the "&&" symbol. Thus NOT and OR exists as well.
  59. ******************************************************************************************************************************-->
  60. <!ELEMENT exclude EMPTY>
  61. <!ATTLIST exclude
  62. within CDATA #REQUIRED
  63. >
  64. <!--*****************************************************************************************************************************
  65. aspects
  66. *********************************************************************************************************************************
  67. [aspects] defines a set of aspects
  68. TODO we were about to use include but it is already used for weaver scope with "within" which is not relevant
  69. for aspects. I (AV) decided to use only aspect and provide include= thru name, and exclude= as exclude.
  70. see sample.
  71. ******************************************************************************************************************************-->
  72. <!ELEMENT aspects (
  73. (aspect | exclude | concrete-aspect)*
  74. )>
  75. <!--*****************************************************************************************************************************
  76. aspect
  77. TODO: did not used include since already used in weaver/include@within and @within does not makes sense
  78. *********************************************************************************************************************************
  79. [aspect] defines an aspect to include
  80. @name FQN of the aspect, nested class must use $
  81. ******************************************************************************************************************************-->
  82. <!ELEMENT aspect EMPTY>
  83. <!ATTLIST aspect
  84. name CDATA #REQUIRED
  85. >
  86. <!--*****************************************************************************************************************************
  87. exclude
  88. *********************************************************************************************************************************
  89. [exclude] defines a set of aspect to exclude
  90. @within within pattern (even from other systems / parent classloader)
  91. SAME AS FOR weaver/exclude
  92. ******************************************************************************************************************************-->
  93. <!--*****************************************************************************************************************************
  94. concrete-aspect
  95. *********************************************************************************************************************************
  96. [concrete-aspect] defines a concrete aspect from an abstract one
  97. @name FQN of the concrete aspect (use $ for nested class) [will be jit generated]
  98. @extends FQN of the abstract aspect (use $ for nested class)
  99. ******************************************************************************************************************************-->
  100. <!ELEMENT concrete-aspect (
  101. pointcut+
  102. )>
  103. <!ATTLIST concrete-aspect
  104. name CDATA #REQUIRED
  105. extends CDATA #REQUIRED
  106. >
  107. <!--*****************************************************************************************************************************
  108. pointcut
  109. *********************************************************************************************************************************
  110. [pointcut] defines a concrete pointcut within a concrete aspect from an abstract one
  111. @name name of the abstract pointcut (method name, unique in aspect class hierarchy)
  112. @expression pointcut expression
  113. Note: for argument binding, the bounded arguments must be present and bounded:
  114. <pointcut name="myAdvice(int i)" expression="... AND args(i)"/>
  115. TODO: AND must be written that way and not with the "&&" symbol. Thus NOT and OR exists as well.
  116. ******************************************************************************************************************************-->
  117. <!ELEMENT pointcut EMPTY>
  118. <!ATTLIST pointcut
  119. name CDATA #REQUIRED
  120. expression CDATA #REQUIRED
  121. >