Class TypeDefBuilder<M,​T>

    • Constructor Detail

      • TypeDefBuilder

        public TypeDefBuilder()
    • Method Detail

      • build

        public abstract M build​(T value)
        Build an instance of the typedef class from the given value.
        Parameters:
        value - A value to be wrapped in a typedef.
        Returns:
        an instance of the typedef class from the given value.
        Throws:
        IllegalArgumentException - if the value is null or otherwise invalid. This may be the case if the schema defines limits on the magnitude of the value, or if a facade has been written for the type.
      • build

        public abstract M build​(org.symphonyoss.s2.common.dom.json.JsonValue<?,​?> jsonValue)
        Build an instance of the typedef class from the value provided by the given JsonValue.
        Parameters:
        jsonValue - A JsonValue whose value is to be wrapped in a typedef.
        Returns:
        an instance of the typedef class from the value provided by the given JsonValue.
        Throws:
        IllegalArgumentException - if the value is of the incorrect type of is null or otherwise invalid. This may be the case if the schema defines limits on the magnitude of the value, or if a facade has been written for the type.
      • toValue

        public abstract T toValue​(M instance)
        Return the value of the given typedef.
        Parameters:
        instance - An instance of the typedef.
        Returns:
        The value contained in the typedef instance.