<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to Nested types</title><link>https://sourceforge.net/p/asil/wiki/Nested%2520types/</link><description>Recent changes to Nested types</description><atom:link href="https://sourceforge.net/p/asil/wiki/Nested%20types/feed" rel="self"/><language>en</language><lastBuildDate>Sun, 16 Feb 2014 10:34:24 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/asil/wiki/Nested%20types/feed" rel="self" type="application/rss+xml"/><item><title>Nested types modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Nested%2520types/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v4
+++ v5
@@ -9,6 +9,7 @@
 Unlike Java non-static inner classes, ASIL **[inner](keywords-inner)** classes can have static members.  The authors of Java decided that static members inside non-static inner classes didn't make sense.  To them, those members should below to the enclosing class.  However, it makes sense to allow static members inside ASIL **[inner](keywords-innner)** classes for scope reasons.

 ~~~~
+:::text
 class OuterClass
   class NestedClass1
     ' Add some members; This class can only reference static members and types declared in OuterClass
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Sun, 16 Feb 2014 10:34:24 -0000</pubDate><guid>https://sourceforge.net1021c5678f3aeb2416c7c921240158903793f4ee</guid></item><item><title>Nested types modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Nested%2520types/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Sun, 16 Feb 2014 09:40:52 -0000</pubDate><guid>https://sourceforge.netb5aff26baa7b2fcb5fa576c9bef9340f2af1c3fa</guid></item><item><title>Nested classes, structures, and structure-based enums modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Nested%2520classes%252C%2520structures%252C%2520and%2520structure-based%2520enums/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v2
+++ v3
@@ -1,6 +1,6 @@
 Modern object oriented programming requires nested types.  You've already seen some nested types in previous sections of this wiki.  This section concentrates on how nested classes interact with their enclosing class(es).  In ASIL, the only types you can declare that's not allowed to declare a nested type are primitive-based enums.

-Until ASIL, nested classes came in two varieties.  C++ and C# have simple nested classes where the nested class could access any static member of the enclosing type, but didn't have a reference/pointer to an instance of that enclosing type.   Java nested types (called inner types) were different.  If you just declared a nested type, the nested class can exist only with in the context of the enclosing class.  All its members, static and non-static, are available.  Java changes that if you declare the nested type with the static keyword.  Now its access to the enclosing class is that of a non-nested type.  You can only access static members of the enclosing class with a fully qualified identifier.
+Until ASIL, nested classes came in two varieties.  C++ and C# have simple nested classes where the nested class could access any static member of the enclosing type, but lack a reference/pointer to an instance of that enclosing type.   Java nested types (called inner types) were different.  If you just declared a nested type, the nested class can exist only with in the context of the enclosing class.  All its members, static and non-static, are available.  Java changes that if you declare the nested type with the static keyword.  Now its access to the enclosing class is that of a non-nested type.  You can only access static members of the enclosing class with a fully qualified identifier.

 ASIL merges these two types of nested classes.  If you just declare an nested type, ASIL gives you a type similar to that used by C++ and C#.  You have access to all static members/methods of the enclosing type, event private members/methods.  The one thing you can't do is create a new instance of the enclosing type using any private constructors it declares (at least directly).

&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Fri, 14 Feb 2014 05:05:19 -0000</pubDate><guid>https://sourceforge.net36049862cbd9b69a9d11666f4b1aef9210471d23</guid></item><item><title>Nested classes, structures, and structure-based enums modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Nested%2520classes%252C%2520structures%252C%2520and%2520structure-based%2520enums/</link><description>&lt;div class="markdown_content"&gt;&lt;pre&gt;--- v1
+++ v2
@@ -4,7 +4,9 @@

 ASIL merges these two types of nested classes.  If you just declare an nested type, ASIL gives you a type similar to that used by C++ and C#.  You have access to all static members/methods of the enclosing type, event private members/methods.  The one thing you can't do is create a new instance of the enclosing type using any private constructors it declares (at least directly).

-On the other hand, if you declare a class with the [**inner**] qualifier keyword, you get a class more like Java's static inner class system.  (Don't confuse a Java inner class with an ASIL inner class.)  Please note that [**static**] classes can't contain [**inner**] classes.  Nor can you use both [**static**] and [**inner**] on the same type.  Finally, the [**inner**] qualifier keyword can't be applied to primitive-based enums or interfaces.
+On the other hand, if you declare a class with the **[inner](keywords-inner)** qualifier keyword, you get a class more like Java's static inner class system.  (Don't confuse a Java inner class with an ASIL inner class.)  Please note that **[static](keywords-static)** classes can't contain **[inner](keywords-inner)** classes.  Nor can you use both **[static](keywords-static)** and **[inner](keywords-inner)** on the same type.  Finally, the **[inner](keywords-inner)** qualifier keyword can't be applied to primitive-based enums or interfaces.
+
+Unlike Java non-static inner classes, ASIL **[inner](keywords-inner)** classes can have static members.  The authors of Java decided that static members inside non-static inner classes didn't make sense.  To them, those members should below to the enclosing class.  However, it makes sense to allow static members inside ASIL **[inner](keywords-innner)** classes for scope reasons.

 ~~~~
 class OuterClass
&lt;/pre&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Fri, 14 Feb 2014 05:03:25 -0000</pubDate><guid>https://sourceforge.net4e32c4e88a74ccfcb739de9de0edd511588b091c</guid></item><item><title>Nested classes, structures, and structure-based enums modified by Will Pittenger</title><link>https://sourceforge.net/p/asil/wiki/Nested%2520classes%252C%2520structures%252C%2520and%2520structure-based%2520enums/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;Modern object oriented programming requires nested types.  You've already seen some nested types in previous sections of this wiki.  This section concentrates on how nested classes interact with their enclosing class(es).  In ASIL, the only types you can declare that's not allowed to declare a nested type are primitive-based enums.&lt;/p&gt;
&lt;p&gt;Until ASIL, nested classes came in two varieties.  C++ and C# have simple nested classes where the nested class could access any static member of the enclosing type, but didn't have a reference/pointer to an instance of that enclosing type.   Java nested types (called inner types) were different.  If you just declared a nested type, the nested class can exist only with in the context of the enclosing class.  All its members, static and non-static, are available.  Java changes that if you declare the nested type with the static keyword.  Now its access to the enclosing class is that of a non-nested type.  You can only access static members of the enclosing class with a fully qualified identifier.&lt;/p&gt;
&lt;p&gt;ASIL merges these two types of nested classes.  If you just declare an nested type, ASIL gives you a type similar to that used by C++ and C#.  You have access to all static members/methods of the enclosing type, event private members/methods.  The one thing you can't do is create a new instance of the enclosing type using any private constructors it declares (at least directly).&lt;/p&gt;
&lt;p&gt;On the other hand, if you declare a class with the &lt;span&gt;[&lt;strong&gt;inner&lt;/strong&gt;]&lt;/span&gt; qualifier keyword, you get a class more like Java's static inner class system.  (Don't confuse a Java inner class with an ASIL inner class.)  Please note that &lt;span&gt;[&lt;strong&gt;static&lt;/strong&gt;]&lt;/span&gt; classes can't contain &lt;span&gt;[&lt;strong&gt;inner&lt;/strong&gt;]&lt;/span&gt; classes.  Nor can you use both &lt;span&gt;[&lt;strong&gt;static&lt;/strong&gt;]&lt;/span&gt; and &lt;span&gt;[&lt;strong&gt;inner&lt;/strong&gt;]&lt;/span&gt; on the same type.  Finally, the &lt;span&gt;[&lt;strong&gt;inner&lt;/strong&gt;]&lt;/span&gt; qualifier keyword can't be applied to primitive-based enums or interfaces.&lt;/p&gt;
&lt;div class="codehilite"&gt;&lt;pre&gt;&lt;span class="n"&gt;class&lt;/span&gt; &lt;span class="n"&gt;OuterClass&lt;/span&gt;
  &lt;span class="n"&gt;class&lt;/span&gt; &lt;span class="n"&gt;NestedClass1&lt;/span&gt;
    &lt;span class="err"&gt;'&lt;/span&gt; &lt;span class="n"&gt;Add&lt;/span&gt; &lt;span class="n"&gt;some&lt;/span&gt; &lt;span class="n"&gt;members&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;This&lt;/span&gt; &lt;span class="n"&gt;class&lt;/span&gt; &lt;span class="n"&gt;can&lt;/span&gt; &lt;span class="n"&gt;only&lt;/span&gt; &lt;span class="n"&gt;reference&lt;/span&gt; &lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="n"&gt;members&lt;/span&gt; &lt;span class="n"&gt;and&lt;/span&gt; &lt;span class="n"&gt;types&lt;/span&gt; &lt;span class="n"&gt;declared&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;OuterClass&lt;/span&gt;

  &lt;span class="n"&gt;class&lt;/span&gt; &lt;span class="n"&gt;inner&lt;/span&gt; &lt;span class="n"&gt;NestedClass2&lt;/span&gt;
    &lt;span class="err"&gt;'&lt;/span&gt; &lt;span class="n"&gt;Add&lt;/span&gt; &lt;span class="n"&gt;some&lt;/span&gt; &lt;span class="n"&gt;members&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="n"&gt;This&lt;/span&gt; &lt;span class="n"&gt;class&lt;/span&gt; &lt;span class="n"&gt;an&lt;/span&gt; &lt;span class="n"&gt;only&lt;/span&gt; &lt;span class="n"&gt;exist&lt;/span&gt; &lt;span class="n"&gt;in&lt;/span&gt; &lt;span class="n"&gt;the&lt;/span&gt; &lt;span class="n"&gt;context&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="n"&gt;an&lt;/span&gt; &lt;span class="n"&gt;instance&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="n"&gt;OuterClass&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;but&lt;/span&gt; &lt;span class="n"&gt;can&lt;/span&gt; &lt;span class="n"&gt;reference&lt;/span&gt; &lt;span class="n"&gt;all&lt;/span&gt; &lt;span class="n"&gt;members&lt;/span&gt; &lt;span class="n"&gt;of&lt;/span&gt; &lt;span class="n"&gt;OuterClass&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="n"&gt;even&lt;/span&gt; &lt;span class="n"&gt;non&lt;/span&gt;&lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="k"&gt;static&lt;/span&gt; &lt;span class="n"&gt;members&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Will Pittenger</dc:creator><pubDate>Sun, 09 Feb 2014 04:41:11 -0000</pubDate><guid>https://sourceforge.net2b85e7d16f740214084df6af5ce44fe3b0361e4a</guid></item></channel></rss>