/** * Adds a enumeration value to the specified enumeration name. If no enumeration class is found, then a new * enumeration class will be created. * * @param enumName * the enumeration class name. * @param enumValue * the new enumeration value. */ public void addEnumValue(final String enumName, final String enumValue) { for (MetadataEnum instance : enumList) { if (instance.getName().equals(enumName) && instance.getNamespace().equals(getCurrentNamespace())) { instance.addValue(enumValue); return; } } final MetadataEnum newEnum = new MetadataEnum(enumName); newEnum.addValue(enumValue); newEnum.setNamespace(getCurrentNamespace()); newEnum.setSchemaName(getCurrentSchmema()); newEnum.setPackageApi(getCurrentPackageApi()); enumList.add(newEnum); }
/** * Adds a enumeration value to the specified enumeration name. If no enumeration class is found, then a new * enumeration class will be created. * * @param enumName * the enumeration class name. * @param enumValue * the new enumeration value. */ public void addEnumValue(final String enumName, final String enumValue) { for (MetadataEnum instance : enumList) { if (instance.getName().equals(enumName) && instance.getNamespace().equals(getCurrentNamespace())) { instance.addValue(enumValue); return; } } final MetadataEnum newEnum = new MetadataEnum(enumName); newEnum.addValue(enumValue); newEnum.setNamespace(getCurrentNamespace()); newEnum.setSchemaName(getCurrentSchmema()); newEnum.setPackageApi(getCurrentPackageApi()); enumList.add(newEnum); }