Return-Path: X-Original-To: apmail-subversion-users-archive@minotaur.apache.org Delivered-To: apmail-subversion-users-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 974BA9876 for ; Sun, 5 Feb 2012 17:19:56 +0000 (UTC) Received: (qmail 15172 invoked by uid 500); 5 Feb 2012 17:19:55 -0000 Delivered-To: apmail-subversion-users-archive@subversion.apache.org Received: (qmail 15138 invoked by uid 500); 5 Feb 2012 17:19:55 -0000 Mailing-List: contact users-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list users@subversion.apache.org Received: (qmail 15131 invoked by uid 99); 5 Feb 2012 17:19:54 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Feb 2012 17:19:54 +0000 X-ASF-Spam-Status: No, hits=1.8 required=5.0 tests=HTML_FONT_FACE_BAD,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of dharma.a@gmail.com designates 209.85.214.171 as permitted sender) Received: from [209.85.214.171] (HELO mail-tul01m020-f171.google.com) (209.85.214.171) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 05 Feb 2012 17:19:48 +0000 Received: by obcuy19 with SMTP id uy19so10602949obc.16 for ; Sun, 05 Feb 2012 09:19:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=KMMvevM3BbRN8gGjy46m45xiohE0T3g0sySXesnGQN4=; b=RhE94BFeQelJTMo+lJXL76s59hojFnxlVeVMbpqOEdtXbcYaRqPcgLR+syHFi0Bgq1 Li86xernAMPwlhrJZocQMDSo9JThcPUwvgVzEWft6Cz2mLmpwETp5f4wgWQUnC3+oJ3W BHm3tgudh1UsW/KVMEvyRg5xDqhZm4pwNIz18= MIME-Version: 1.0 Received: by 10.182.75.102 with SMTP id b6mr14011057obw.9.1328462367709; Sun, 05 Feb 2012 09:19:27 -0800 (PST) Received: by 10.182.90.227 with HTTP; Sun, 5 Feb 2012 09:19:27 -0800 (PST) Date: Sun, 5 Feb 2012 22:49:27 +0530 Message-ID: Subject: "[digester]" Apache commons Digester Custom rule..... From: Dharma To: users@subversion.apache.org Content-Type: multipart/alternative; boundary=14dae93994a9865a8b04b83abfc7 --14dae93994a9865a8b04b83abfc7 Content-Type: text/plain; charset=ISO-8859-1 Hi, It would be great if i get solution for the below mentioned problem. I have a class which has only private constructor(two parameterised) and need to access the static variable of that class using digester. I understand that to access static variable of a class, need to use digester custom rule. Since am new to digester, if i get sample code for custom rule / list of steps to write custom rule would solve my problem. Please find below code snippet Eg: OrderStatus.java public class OrderStatus { private char type = ' '; public static final char A_TYPE = 'A'; public static final char T_TYPE = 'T'; public static final OrderStatus A = new OrderStatus(A_TYPE); // Need to get OrderStatus.A using digester public static final OrderStatus T = new OrderStatus(T_TYPE); // Need to get OrderStatus.T using digester private OrderStatus(char type) { super(); this.type = type; } } Regards, Dharma.A * * --14dae93994a9865a8b04b83abfc7 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
Hi,

=A0It would be gre= at if i get solution for the below mentioned problem.

=A0I have a cl= ass which has only private constructor(two parameterised) and need to acces= s the static variable of that class using digester.=A0 I understand that to= access static variable of a class, need to use digester custom rule.=A0 Si= nce am new to digester, if i get sample code for custom rule / list of step= s to write custom rule would solve my problem.
=A0
=A0Please find below code snippet=A0=A0=A0=A0=A0
=A0=A0
=A0E= g:

=A0 OrderStatus.java


=A0 public class OrderStatus
= =A0 {

=A0=A0=A0=A0 private char type =3D ' ';
=A0=A0=A0= =A0
=A0=A0=A0=A0 public static final char A_TYPE =3D 'A';
=A0=A0
=A0=A0=A0=A0 public static final char T_TYPE =3D 'T';
=A0=A0=A0=A0 public static final OrderStatus A =3D new OrderStatus(A_T= YPE);=A0 // Need to get OrderStatus.A using digester
=A0=A0
=A0=A0= =A0=A0=A0 public static final OrderStatus T =3D new OrderStatus(T_TYPE); //= Need to get OrderStatus.T using digester

=A0=A0=A0=A0=A0 private OrderStatus(char type)
=A0=A0=A0=A0=A0 {
= =A0=A0=A0=A0=A0=A0 super();
=A0=A0=A0=A0=A0=A0 this.type =3D type;
= =A0=A0=A0=A0=A0=A0 }

=A0 }


Regards,
Dharma.A






--14dae93994a9865a8b04b83abfc7--