Good evening everyone!
My first post on the forums (I hope I place this in the right part of the forums).

I have for the last couple of days been on a quest. The quest for testing classes for immutability! My native tongue is Java and thus I'm thinking in Java.

My current algorithm looks something like this (in some kind of pseudo-code):

<font class="small">Code:</font><hr /><pre>
boolean isImmutable (Class c){
if isInterface(c)
return false
if isAbstract(c)
return false
if !isDeclaredFinal(c)
return false
if !hasNoneFinalMembers(c)
return false
for all none primitive members m of c {
if !isImmutable(m)
return false
return true;
</pre><hr />

Id very much like to have some feedback on this.
And again, I hope I found the right place for questions like this.

Let the discussion commence!
Have a nice Saturday evening everyone, I am going back to watching Madagascar.

Said Aspen