-
Enhancement
-
Resolution: Done
-
Major
-
None
-
None
Add a few constants to the ModelNode class to hold unmodifiable nodes for a few common cases:
public static final ModelNode TRUE = new ModelNode(true).protect();
public static final ModelNode FALSE = new ModelNode(false).protect();
public static final ModelNode ZERO = new ModelNode(0).protect();
Specific use case is the hundreds of examples of this kind of thing in WildFly where we could use a constant for declaring default values:
static final AttributeDefinition FOO = new SimpleAttributeDefinitionBuilder("foo", ModelType.BOOLEAN) .setRequired(false) .setDefaultValue(ModelNode.TRUE) .build();