--- Srinivas Pavani <[EMAIL PROTECTED]> wrote:
> 
> I think it is beneficial to support both the value
> of key and alternately an additional tag. 
> 
> 
> 
> Given below are some examples:
> 
> 
> 
> /** @msg.message = "Delete Transaction" */
> 
> String TXN_DELETE = "transaction.delete";
> 
> 
> 
> public class Car {
> 
>   String _make;
> 
>   int _year;
> 
>   private Car(String make, int year) {
> 
>       _make = make;
> 
>       _year = year;
> 
>   }
> 
> 
> 
>   public String getMake() {
> 
>       return _make;
> 
>   }
> 
> 
> 
>   public int getYear() {
> 
>       return _year;
> 
>   }
> 
> 
> 
>   public String getDetails() {
> 
>      return CarTranslator.getString(_make);
> 
>   }
> 
> 
> 
>   /** @msg.message = "Audi 2003/8 cyl/$30, 000" key
> = "car.audi" */
> 
>   public static final Car GERMAN_CAR = new
> Car("Audi", 2003);
> 
>   /** @msg.message = "Toyota/4 cyl/$20, 000" key =
> "car.toyota" */
> 
>   public static final Car JAPANESE_CAR = new
> Car("Toyota", 2004);
> 
> }

It's not only generation of resource bundles, 
there is also translator. 

To main benefit from externalizer is compile-time
checking of your properties. 

So, you need some static variable  that compiler can
check for integrity. 

Then comes translator ( which decides which bundle to
be asked for property ) - you have to feed it with
some value, so it can select correct property. 

This value has to be string, and come from some
constant ( where  @msg tag is defined )  - so your 
car classes are not so cool idea. 


regards,

=====
----[ Konstantin Pribluda ( ko5tik ) ]----------------
Zu Verst�rkung meines Teams suche ich ab Sofort einen
Softwareentwickler[In] f�r die Festanstellung. 
Arbeitsort: Mainz 
Skills:  Programieren, Kentnisse in OpenSource-Bereich
----[ http://www.pribluda.de ]------------------------

__________________________________
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard
http://antispam.yahoo.com/whatsnewfree


-------------------------------------------------------
This SF.net email is sponsored by: SF.net Giveback Program.
Does SourceForge.net help you be more productive?  Does it
help you create better code?  SHARE THE LOVE, and help us help
YOU!  Click Here: http://sourceforge.net/donate/
_______________________________________________
xdoclet-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/xdoclet-user

Reply via email to