You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by Dharma <dh...@gmail.com> on 2012/02/05 18:19:27 UTC
"[digester]" Apache commons Digester Custom rule.....
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
*
*
Re: "[digester]" Apache commons Digester Custom rule.....
Posted by Daniel Shahaf <d....@daniel.shahaf.name>.
Please send your questions about Apache Commons to an approriate
@commons.apache.org mailing list.
http://commons.apache.org -> click on "Mailing Lists"
Konstantin Kolinko wrote on Sun, Feb 05, 2012 at 22:43:04 +0400:
> You are still sending your message to users@subversion.
>
> Your question is not related to Apache Subversion. This is wrong mailing list.
>
>
> 2012/2/5 Dharma <dh...@gmail.com>:
> > 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
> >
> >
> >
> >
> >
> >
Re: "[digester]" Apache commons Digester Custom rule.....
Posted by Konstantin Kolinko <kn...@gmail.com>.
You are still sending your message to users@subversion.
Your question is not related to Apache Subversion. This is wrong mailing list.
2012/2/5 Dharma <dh...@gmail.com>:
> 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
>
>
>
>
>
>