These methods leak the internals of how constraints are enforced. No
outside parties should rely on them, so lets mark them deprecated. If we
do not get reports of use, we should be removing them in a future
release.
Change-Id: I128c5abe5c894a4808ff30dcebd6af42d8f682cb
Signed-off-by: Robert Varga <rovarga@cisco.com>
def private generateLengthMethod(String methodName, String varName) '''
«IF restrictions != null && !(restrictions.lengthConstraints.empty)»
«val numberClass = restrictions.lengthConstraints.iterator.next.min.class»
+ /**
+ * @deprecated This method is slated for removal in a future release. See BUG-1485 for details.
+ */
+ @Deprecated
public static «List.importedName»<«Range.importedName»<«numberClass.importedNumber»>> «methodName»() {
return «varName»;
}
def private generateRangeMethod(String methodName, String varName) '''
«IF restrictions != null && !(restrictions.rangeConstraints.empty)»
«val returnType = allProperties.iterator.next.returnType»
+ /**
+ * @deprecated This method is slated for removal in a future release. See BUG-1485 for details.
+ */
+ @Deprecated
public static «List.importedName»<«Range.importedName»<«returnType.importedNumber»>> «methodName»() {
return «varName»;
}