/** * Gets the string representation of this type, as it should be given * when defining a descriptor in the xml. * * @param valueType The type to look for * @param multiValue Whether the descriptor is multivalued or not * * @return The string id * * @deprecated The signature will probably be altered in 7.0.0 but a similar functionality will be available */ @Deprecated public static String typeIdFor(Class<?> valueType, boolean multiValue) { for (Map.Entry<String, PropertyTypeId> entry : CONSTANTS_BY_MNEMONIC.entrySet()) { if (entry.getValue().propertyValueType() == valueType && entry.getValue().isPropertyMultivalue() == multiValue) { return entry.getKey(); } } return null; } }
private ValueParser<?> getValueParser(PropertyTypeId typeId) { ValueParser<?> parser = typeId.getValueParser(); if (typeId.isPropertyMultivalue()) { char delimiter = typeId.isPropertyNumeric() ? DEFAULT_NUMERIC_DELIMITER : DEFAULT_DELIMITER; parser = ValueParserConstants.multi(parser, delimiter); } return parser; }
/** * Gets the string representation of this type, as it should be given * when defining a descriptor in the xml. * * @param valueType The type to look for * @param multiValue Whether the descriptor is multivalued or not * * @return The string id * * @deprecated The signature will probably be altered in 7.0.0 but a similar functionality will be available */ @Deprecated public static String typeIdFor(Class<?> valueType, boolean multiValue) { for (Map.Entry<String, PropertyTypeId> entry : CONSTANTS_BY_MNEMONIC.entrySet()) { if (entry.getValue().propertyValueType() == valueType && entry.getValue().isPropertyMultivalue() == multiValue) { return entry.getKey(); } } return null; } }