Class ModelTypeValidator

    • Field Detail

      • BIGDECIMAL_MAX

        protected static final BigDecimal BIGDECIMAL_MAX
      • BIGDECIMAL_MIN

        protected static final BigDecimal BIGDECIMAL_MIN
      • BIGINTEGER_MAX

        protected static final BigInteger BIGINTEGER_MAX
      • BIGINTEGER_MIN

        protected static final BigInteger BIGINTEGER_MIN
      • validTypes

        protected final Set<org.jboss.dmr.ModelType> validTypes
      • nullable

        protected final boolean nullable
      • strictType

        protected final boolean strictType
    • Constructor Detail

      • ModelTypeValidator

        public ModelTypeValidator​(org.jboss.dmr.ModelType type)
        Same as ModelTypeValidator(type, false, false, false).
        Parameters:
        type - the valid type. Cannot be null
      • ModelTypeValidator

        public ModelTypeValidator​(org.jboss.dmr.ModelType type,
                                  boolean nullable)
        Same as ModelTypeValidator(type, nullable, false, false).
        Parameters:
        type - the valid type. Cannot be null
        nullable - whether ModelType.UNDEFINED is allowed
      • ModelTypeValidator

        public ModelTypeValidator​(org.jboss.dmr.ModelType type,
                                  boolean nullable,
                                  boolean allowExpressions)
        Same as ModelTypeValidator(type, nullable, allowExpressions, false).
        Parameters:
        type - the valid type. Cannot be null
        nullable - whether ModelType.UNDEFINED is allowed
        allowExpressions - whether ModelType.EXPRESSION is allowed
      • ModelTypeValidator

        public ModelTypeValidator​(org.jboss.dmr.ModelType type,
                                  boolean nullable,
                                  boolean allowExpressions,
                                  boolean strictType)
        Creates a ModelTypeValidator that allows the given type.
        Parameters:
        type - the valid type. Cannot be null
        nullable - whether ModelType.UNDEFINED is allowed
        allowExpressions - whether ModelType.EXPRESSION is allowed
        strictType - true if the type of a node must precisely match type; false if the value conversions described in the class javadoc can be performed to check for compatible types
      • ModelTypeValidator

        public ModelTypeValidator​(boolean nullable,
                                  boolean allowExpressions,
                                  boolean strictType,
                                  org.jboss.dmr.ModelType firstValidType,
                                  org.jboss.dmr.ModelType... otherValidTypes)
        Creates a ModelTypeValidator that allows potentially more than one type.
        Parameters:
        nullable - whether ModelType.UNDEFINED is allowed
        allowExpressions - whether ModelType.EXPRESSION is allowed
        strictType - true if the type of a node must precisely match type; false if the value conversions described in the class javadoc can be performed to check for compatible types
        firstValidType - a valid type. Cannot be null
        otherValidTypes - additional valid types. May be null