Class AbstractSimpleTypeWrapper

    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AbstractSimpleTypeWrapper​(java.lang.Class<?> valType)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.Object fromString​(java.lang.String value)
      Attempts to convert a parameter value expressed as string into an instance of the appropriate (for this parameter) type.
      java.lang.Class<?> getValueType()
      java.lang.String toString​(java.lang.Object value)
      Attempts to convert a parameter value expressed as an object of the appropriate (for this parameter) type into a string representation.
      boolean valid​(java.lang.Object o)
      Checks if the object is of a valid type for this type info.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • AbstractSimpleTypeWrapper

        protected AbstractSimpleTypeWrapper​(java.lang.Class<?> valType)
        Parameters:
        valType - a Class object
    • Method Detail

      • getValueType

        public java.lang.Class<?> getValueType()
        Specified by:
        getValueType in interface TypeWrapper
        Returns:
        the class instance being wrapped
      • valid

        public boolean valid​(java.lang.Object o)
        Checks if the object is of a valid type for this type info.
        Specified by:
        valid in interface TypeWrapper
        Parameters:
        o - the object to check
        Returns:
        true if the parameter can be set.
      • fromString

        public java.lang.Object fromString​(java.lang.String value)
        Attempts to convert a parameter value expressed as string into an instance of the appropriate (for this parameter) type.
        Specified by:
        fromString in interface TypeWrapper
        Parameters:
        value - parameter value as string
        Returns:
        parameter value as an instance of the proper type
      • toString

        public java.lang.String toString​(java.lang.Object value)
        Attempts to convert a parameter value expressed as an object of the appropriate (for this parameter) type into a string representation.
        Specified by:
        toString in interface TypeWrapper
        Parameters:
        value - parameter value as object
        Returns:
        parameter value as string