Migrate AbstractTypeStatementSupport 26/91026/1
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 2 Jul 2020 16:11:15 +0000 (18:11 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Wed, 8 Jul 2020 17:28:57 +0000 (19:28 +0200)
commita8ee4363236a66fe9b6fd4740f419353756d37da
treef34bb6340e54039840680580f15184d1bdb4de85
parent39d0bc8b16c2de6552a0376d45f50a5ae7430d77
Migrate AbstractTypeStatementSupport

Support for 'type' statement is rather twisted, but at the end of
the day, externalizing substatement creation is rather easy.

Switching to BaseStatementSupport allows us to discern when we can
end up pointing to a BuiltinTypeStatement -- since there is not such
thing as an implicit type statement.

On the declared front, this is a straightforward migration to
AbstractDeclaredStatement.WithRawStringArgument subclasses, which
ends up reducing typical footprint from 32 bytes to 16/24 bytes.

On the effective front, this does not really do anything, as these
are handled on per-type basis.

JIRA: YANGTOOLS-1065
Change-Id: I421f72a765fd6a28f984d463d8b9991dd7c1d231
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
(cherry picked from commit a0efae9be47c4a403ed59b9846b3bcf766255707)
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/type/AbstractTypeStatementSupport.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/type/BuiltinTypeStatement.java
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/type/EmptyTypeStatement.java [moved from yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/type/TypeStatementImpl.java with 57% similarity]
yang/yang-parser-rfc7950/src/main/java/org/opendaylight/yangtools/yang/parser/rfc7950/stmt/type/RegularTypeStatement.java [new file with mode: 0644]