public static boolean isImmutable(Object function){
  return isImmutableClass(function.getClass());
}

public static boolean isImmutable ( Object function ) { return isImmutableClass ( function . getClass ( ) ) ; }
see if the functional logic is immutable . logic is stateful if : has a non - final instance field . has a final instance field that is not a primitive or a known immutable object .
