I have one java enum class called Country for which I have below code :

```
public enum Country {

    AFGHANISTAN("Afghanistan","AF","AFG",004, RegionAfghanistan.class),
    ALBANIA("Albania","AL","ALB",8, RegionAlbania.class);
    .......
    Some methods and constructor.
}

```

So you can see in the last field I have embedded the class in the enum fields. Each of these region is enum class as below.

```
public enum RegionAfghanistan {

    BADAKHSHAN("Badakhshān", "AF-BDS*", CountryCategory.PROVINCE),
    BAGHLAN("Baghlān", "AF-BGL*", CountryCategory.PROVINCE),
    BALKH("Balkh", "AF-BAL*", CountryCategory.PROVINCE),
    BADGHIS("Bādghīs", "AF-BDG*", CountryCategory.PROVINCE),
    BAMYAN("Bāmyān", "AF-BAM*", CountryCategory.PROVINCE),
    DAYKUNDI("Dāykundī", "AF-DAY*", CountryCategory.PROVINCE),
    ......
    Some methods and feilds.

```

Now Suppose I am given Region: Badakhshān Country: Afghanistan as a String. First I have method which gives me Country.AFGHANISTAN from the "Afghanistan", So that, is fine.
I also get a class from the Country.AFGHANISTAN i.e. class com.\*\*\*\*.core.location.RegionAfghanistan but I would like to get RegionAfghanistan.BADAKHSHAN from the given region "Badakhshān".
Could you please help me how to achieve this using the java enums. Hope you understand what I want to achieve using this.

I have used the following code

```
Class c = Country.AFGHANISTAN.getRegion(); 
Method methodname = c.getMethod("getRegionAfghanistanBySubdivisionName", String.class); 
System.out.println(methodname.invoke(c, "Badakhshān")); 

```

I get Country.AFGHANISTAN from string "Afghanistan", then I get the class and I invoke a method in class passing the region "Badakhshān" and I get the right value but I am not sure if I am doing it the right way or there is another better way to do it.

I would really want a help if this is right approach or there is better way to do it....Thank you so much for your help.