Add CodeHelpers.throwInvalidRange() specializations
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 13 Dec 2018 19:07:37 +0000 (20:07 +0100)
committerAnil Belur <abelur@linuxfoundation.org>
Wed, 19 Jun 2024 00:41:26 +0000 (10:41 +1000)
commit6bb343b9265961d8a8c2465c863d126a500a7612
tree97af5b8697c737a4829f952386c6bbc85bdf865a
parent140998ff9e2cb0ea31d9e902d38ea77576744114
Add CodeHelpers.throwInvalidRange() specializations

Range-checking code can (and does) emit checks based on primitive
types, hence it is forcing a boxing operation.

Provide overloaded methods to allow generated code to bind to both
int- and long-based specializations, resulting is less byte code
being generated.

Change-Id: If6d3cc04c3f7d3d3d5fb3ad3a10f3c3d8f813654
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/yang-binding/src/main/java/org/opendaylight/yangtools/yang/binding/CodeHelpers.java