Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 3ACE1200C7E for ; Tue, 23 May 2017 14:43:57 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 397F6160BC3; Tue, 23 May 2017 12:43:57 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 80610160BB6 for ; Tue, 23 May 2017 14:43:56 +0200 (CEST) Received: (qmail 56284 invoked by uid 500); 23 May 2017 12:43:55 -0000 Mailing-List: contact commits-help@groovy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@groovy.apache.org Delivered-To: mailing list commits@groovy.apache.org Received: (qmail 56275 invoked by uid 99); 23 May 2017 12:43:55 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 23 May 2017 12:43:55 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 9A6B0DFC2E; Tue, 23 May 2017 12:43:55 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: paulk@apache.org To: commits@groovy.apache.org Message-Id: <265902c0a9434a70923b597acd4028e1@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: groovy git commit: GROOVY-8170: Error in note 1 for pseudo-properties: should be "writing" not "reading" Date: Tue, 23 May 2017 12:43:55 +0000 (UTC) archived-at: Tue, 23 May 2017 12:43:57 -0000 Repository: groovy Updated Branches: refs/heads/GROOVY_2_4_X 8223b98af -> cd668e0e3 GROOVY-8170: Error in note 1 for pseudo-properties: should be "writing" not "reading" Project: http://git-wip-us.apache.org/repos/asf/groovy/repo Commit: http://git-wip-us.apache.org/repos/asf/groovy/commit/cd668e0e Tree: http://git-wip-us.apache.org/repos/asf/groovy/tree/cd668e0e Diff: http://git-wip-us.apache.org/repos/asf/groovy/diff/cd668e0e Branch: refs/heads/GROOVY_2_4_X Commit: cd668e0e3927d073f22039ee7cffc1fbb77650a5 Parents: 8223b98 Author: paulk Authored: Tue May 23 22:40:46 2017 +1000 Committer: paulk Committed: Tue May 23 22:43:41 2017 +1000 ---------------------------------------------------------------------- src/spec/doc/core-object-orientation.adoc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/groovy/blob/cd668e0e/src/spec/doc/core-object-orientation.adoc ---------------------------------------------------------------------- diff --git a/src/spec/doc/core-object-orientation.adoc b/src/spec/doc/core-object-orientation.adoc index 5f5b34d..1189e9c 100644 --- a/src/spec/doc/core-object-orientation.adoc +++ b/src/spec/doc/core-object-orientation.adoc @@ -456,14 +456,15 @@ It is possible to list the properties of a class thanks to the meta `properties` include::{projectdir}/src/spec/test/ClassTest.groovy[tags=properties_meta,indent=0] ---- -By convention, Groovy will recognize properties even if there is no backing field, if there are getters or setters +By convention, Groovy will recognize properties even if there is no backing field +provided there are getters or setters that follow the Java Beans specification. For example: [source,groovy] ---- include::{projectdir}/src/spec/test/ClassTest.groovy[tags=pseudo_properties,indent=0] ---- -<1> reading `p.name` is allowed because there is a pseudo-property `name` +<1> writing `p.name` is allowed because there is a pseudo-property `name` <2> reading `p.age` is allowed because there is a pseudo-readonly property `age` <3> writing `p.groovy` is allowed because there is a pseudo-writeonly property `groovy`