Share empty ConstraintDefinition instances 98/29098/2
authorRobert Varga <rovarga@cisco.com>
Sun, 1 Nov 2015 18:27:29 +0000 (19:27 +0100)
committerGerrit Code Review <gerrit@opendaylight.org>
Mon, 2 Nov 2015 08:19:04 +0000 (08:19 +0000)
commit1619febd2d96ad1685ae5e009a85c3f471725af0
tree694ad913a55ba52d37d6de9957652d74e0154c52
parent1cfc7fb782c27702a9b5b26400ab08b1586e186e
Share empty ConstraintDefinition instances

Introduce a specialized class with two singleton instances for holding
the (very common) empty ConstraintDefinition object. Hide
EffectiveConstraintDefinitionImpl and make it expose just a static
factory method, which does the right thing.

Also creates ConstraintDefinitions to hold common functions for the two
implementations.

Change-Id: I4c25aee638ddb0617030fffcb0bc54ac13d28bc1
Signed-off-by: Robert Varga <rovarga@cisco.com>
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveDataSchemaNode.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/AbstractEffectiveSimpleDataNodeContainer.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/ConstraintDefinitions.java [new file with mode: 0644]
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/EffectiveConstraintDefinitionImpl.java
yang/yang-parser-impl/src/main/java/org/opendaylight/yangtools/yang/parser/stmt/rfc6020/effective/EmptyConstraintDefinition.java [new file with mode: 0644]