aboutsummaryrefslogtreecommitdiffstats
path: root/docs/adk15ProgGuideDB/covariance.xml
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2021-04-10 19:19:39 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2021-04-10 19:19:39 +0700
commit92edca3ea7a482d59a9086b1cb61413ed8604b67 (patch)
treed709ab2fd24a563cf626fb5ff354a0972a1dc6a9 /docs/adk15ProgGuideDB/covariance.xml
parent79c272eb9c158a976b7b3313c50759dd87b1b5fd (diff)
downloadaspectj-92edca3ea7a482d59a9086b1cb61413ed8604b67.tar.gz
aspectj-92edca3ea7a482d59a9086b1cb61413ed8604b67.zip
Remove indentation from <programlisting> blocks in docs
Many dozens (hundreds?) of documentation code blocks were indented to match the surrounding XML or just arbitrarily. The thing is: Inside <programlisting> tags, similar to <pre> tags, line feeds and leading whitespace are being preserved, which looked very awkward in the HTML documentation. While a few files were mostly correct in this respect, which shows that it was meant to be like that, many others were not. This was tedious, stupid work to fix, but it had to be done. Please note that the documentation was in no way updated content-wise. This is also overdue, but not my focus here. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
Diffstat (limited to 'docs/adk15ProgGuideDB/covariance.xml')
-rw-r--r--docs/adk15ProgGuideDB/covariance.xml84
1 files changed, 42 insertions, 42 deletions
diff --git a/docs/adk15ProgGuideDB/covariance.xml b/docs/adk15ProgGuideDB/covariance.xml
index 2268258f3..e8845ddb8 100644
--- a/docs/adk15ProgGuideDB/covariance.xml
+++ b/docs/adk15ProgGuideDB/covariance.xml
@@ -1,64 +1,64 @@
<chapter id="covariance" xreflabel="Covariance">
<title>Covariance</title>
-
+
<sect1 id="covariance-inJava5">
<title>Covariance in Java 5</title>
-
+
<para>
Java 5 (and hence AspectJ 5) allows you to narrow the return type
in an overriding method. For example:
</para>
<programlisting><![CDATA[
- class A {
- public A whoAreYou() {...}
- }
-
- class B extends A {
- // override A.whoAreYou *and* narrow the return type.
- public B whoAreYou() {...}
- }
- ]]></programlisting>
-
+class A {
+ public A whoAreYou() {...}
+}
+
+class B extends A {
+ // override A.whoAreYou *and* narrow the return type.
+ public B whoAreYou() {...}
+}
+]]></programlisting>
+
</sect1>
-
+
<sect1 id="covariance-and-join-point-matching">
<title>Covariant methods and Join Point matching</title>
-
+
<para>The join point matching rules for <literal>call</literal>
and <literal>execution</literal> pointcut designators are extended
to match against covariant methods.</para>
-
+
<para>
Given the classes <literal>A</literal> and <literal>B</literal>
as defined in the previous section, and the program fragment
</para>
<programlisting><![CDATA[
- A a = new A();
- B b = new B();
- a.whoAreYou();
- b.whoAreYou();
- ]]></programlisting>
-
- <para>The signatures for the call join point <literal>a.whoAreYou()</literal> are
- simply:</para>
+A a = new A();
+B b = new B();
+a.whoAreYou();
+b.whoAreYou();
+]]></programlisting>
- <programlisting><![CDATA[
- A A.whoAreYou()
- ]]></programlisting>
-
- <para>The signatures for the call join point <literal>b.whoAreYou()</literal> are:
- </para>
+<para>The signatures for the call join point <literal>a.whoAreYou()</literal> are
+simply:</para>
+
+<programlisting><![CDATA[
+A A.whoAreYou()
+]]></programlisting>
+
+<para>The signatures for the call join point <literal>b.whoAreYou()</literal> are:
+</para>
+
+<programlisting><![CDATA[
+A A.whoAreYou()
+B B.whoAreYou()
+]]></programlisting>
- <programlisting><![CDATA[
- A A.whoAreYou()
- B B.whoAreYou()
- ]]></programlisting>
-
<para>Following the join point matching rules given in <xref linkend="jpsigs"/>,</para>
-
+
<variablelist>
<varlistentry>
@@ -87,7 +87,7 @@
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>call(A B.whoAreYou())</term>
<listitem>
@@ -98,22 +98,22 @@
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>call(A+ B.whoAreYou())</term>
<listitem>
<para>Matches the call to <literal>b.whoAreYou()</literal> since
- the signature pattern matches the signature <literal>B B.whoAreYou()</literal>.
+ the signature pattern matches the signature <literal>B B.whoAreYou()</literal>.
A lint warning is given for the call <literal>a.whoAreYou()</literal> ("does not match
because declaring type is A, if match required use target(B)").
</para>
</listitem>
</varlistentry>
-
+
<varlistentry>
<term>call(B A.whoAreYou())</term>
<listitem>
- <para>Does not match anything since neither join point has a
+ <para>Does not match anything since neither join point has a
signature matched by this pattern.
</para>
</listitem>
@@ -136,13 +136,13 @@
</varlistentry>
</variablelist>
-
+
<para>The rule for signature matching at call and execution join points
is unchanged from AspectJ 1.2: a call or execution pointcut matches if
the signature pattern matches at least one of the signatures of the
join point, and if the modifiers of the method or constructor are matched
by any modifier pattern or annotation pattern that may be present.</para>
-
+
</sect1>
</chapter>