Annotation Interface Name


@Target(FIELD) @Retention(RUNTIME) @Documented public @interface Name
This annotation is used in conjunction with ConfigValue in case the nested schema contains a field with InjectedName in order to be able to set different default values for the field with InjectedName.

 @Config
  public class DataRegionConfigurationSchema {
      @InjectedName
       public String name;

      @Value
       public long size;
 }

 @Config
  public class DataStorageConfigurationSchema {
      @Name("defaultInMemory")
      @ConfigValue
       public DataRegionConfigurationSchema defaultInMemoryRegion;

      @Name("defaultPersistent")
      @ConfigValue
       public DataRegionConfigurationSchema defaultPersistentRegion;
 }
 
See Also:
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Returns the default value for InjectedName.