[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Apache commons Digester Custom rule.....

From: Dharma <dharma.a_at_gmail.com>
Date: Sat, 4 Feb 2012 20:23:24 +0530


 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



  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)
       this.type = type;

Received on 2012-02-05 16:56:29 CET

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.