Class ParameterWrapper

java.lang.Object
com.chemaxon.apidiscovery.ParameterWrapper

@Beta @PublicAPI @Deprecated(forRemoval=true) @SubjectToRemoval(date=JAN_01_2025) public class ParameterWrapper extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
The API discovery tool will be removed.
Wraps a parameter which can be set or get on an object.

Usually parameters of Builder objects are wrapped

Please note that support of all types and validation is not complete yet.

Please note that this class is marked with Beta annotation, so it can be subject of incompatible changes or removal in later releases.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Deprecated, for removal: This API element is subject to removal in a future version.
    Wrapped parameter types.
  • Method Summary

    Modifier and Type
    Method
    Description
    Deprecated, for removal: This API element is subject to removal in a future version.
    API field name.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    Value of a boolean field.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Current value.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Current value on a different object.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Detailed description.
    double
    Deprecated, for removal: This API element is subject to removal in a future version.
    Value of a double field.
    Class<? extends Enum>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Return enum class for enum field.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Value of an enum field.
    int
    Deprecated, for removal: This API element is subject to removal in a future version.
    Value of an int field.
    long
    Deprecated, for removal: This API element is subject to removal in a future version.
    Value of an long field.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Largest possible floating point value for floating point fields.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Largest possible fixed point value for fixed point fields.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Smallest possible floating point value for floating point fields.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Smallest possible fixed point value for fixed point fields.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Name.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Parameter field class.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Short name.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Value of a String field.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Type.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Parse parameter value from a String.
    void
    setBooleanValue(boolean b)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set value of a boolean field.
    void
    setDoubleValue(double d)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set value of a double field.
    void
    setIntValue(int i)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set int value of a int field.
    void
    setLongValue(long i)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set long value of a long field.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set String value of a String field.
    void
    Deprecated, for removal: This API element is subject to removal in a future version.
    Set value.
    Deprecated, for removal: This API element is subject to removal in a future version.
    Create String representation of the represented value.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • getAPIFieldName

      public String getAPIFieldName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      API field name.
      Returns:
      The API field name of the represented parameter
    • getShortName

      public String getShortName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Short name.
      Returns:
      Short name of the represented parameter - from its Description annotation
    • getName

      public String getName()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Name.
      Returns:
      Name of the represented parameter - from its Description annotation
    • getDetailedDescription

      public String getDetailedDescription()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Detailed description.
      Returns:
      Detailed description of the represented parameter - from its Description annotation
    • getMinDouble

      public Optional<Double> getMinDouble()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Smallest possible floating point value for floating point fields.
      Returns:
      smallest possible floating point value if specified
    • getMaxDouble

      public Optional<Double> getMaxDouble()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Largest possible floating point value for floating point fields.
      Returns:
      largest possible floating point value if specified
    • getMinLong

      public Optional<Long> getMinLong()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Smallest possible fixed point value for fixed point fields.
      Returns:
      smallest possible fixed point value if specified
    • getMaxLong

      public Optional<Long> getMaxLong()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Largest possible fixed point value for fixed point fields.
      Returns:
      largest possible fixed point value if specified
    • getCurrentValue

      public Object getCurrentValue()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Current value.
      Returns:
      The current value of the represented parameter
    • getCurrentValueOn

      public Object getCurrentValueOn(Object o)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Current value on a different object.
      Parameters:
      o - Object to use to get the value
      Returns:
      The current value of the represented parameter on a different objetc
    • setValue

      public void setValue(Object o)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set value.
      Parameters:
      o - Value to set. Type must match represented parameter type. Note that setting null is not allowed.
    • getType

      Deprecated, for removal: This API element is subject to removal in a future version.
      Type.
      Returns:
      Type of the represented parameter
    • toStringRepresentation

      public String toStringRepresentation()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Create String representation of the represented value.

      Note that this method uses Enum.name() instead of its Object.toString() since later can be overridden preventing further safe parse.

      Note that ParameterWrapper.ParameterType.OTHER type parameters are currently not supported.

      Returns:
      String representation which can be parsed using parseParameterValue(java.lang.String)
      Throws:
      UnsupportedOperationException - when represented parameter type is ParameterWrapper.ParameterType.OTHER
    • parseParameterValue

      public void parseParameterValue(String value)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parse parameter value from a String.
      Parameters:
      value - String value. Note that null values are not allowed.
      Throws:
      IllegalArgumentException - when parse failed
      UnsupportedOperationException - when represented parameter type is ParameterWrapper.ParameterType.OTHER
    • getLongValue

      public long getLongValue()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Value of an long field.
      Returns:
      The value of the long field.
      Throws:
      UnsupportedOperationException - when the associated parameters type is different
    • setLongValue

      public void setLongValue(long i)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set long value of a long field.
      Parameters:
      i - Value to be set
      Throws:
      UnsupportedOperationException - when the associated parameters type is different
    • getIntValue

      public int getIntValue()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Value of an int field.
      Returns:
      The value of the int field.
      Throws:
      UnsupportedOperationException - when the associated parameters type is different
    • setIntValue

      public void setIntValue(int i)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set int value of a int field.
      Parameters:
      i - Value to be set
      Throws:
      UnsupportedOperationException - when the associated parameters type is different
    • getDoubleValue

      public double getDoubleValue()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Value of a double field.
      Returns:
      The value of the represented double field.
      Throws:
      UnsupportedOperationException - when the associated parameters type is different
    • setDoubleValue

      public void setDoubleValue(double d)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set value of a double field.
      Parameters:
      d - Value to be set
      Throws:
      UnsupportedOperationException - when the associated parameters type is different
    • getStringValue

      public String getStringValue()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Value of a String field.
      Returns:
      The value of a String field.
      Throws:
      UnsupportedOperationException - when the associated parameters type is different
    • setStringValue

      public void setStringValue(String s)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set String value of a String field.
      Parameters:
      s - Value to be set
      Throws:
      UnsupportedOperationException - when the associated parameters type is different
    • getBooleanValue

      public boolean getBooleanValue()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Value of a boolean field.
      Returns:
      The value of a boolean field.
      Throws:
      UnsupportedOperationException - when the associated parameters type is different
    • setBooleanValue

      public void setBooleanValue(boolean b)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Set value of a boolean field.
      Parameters:
      b - Value to be set
      Throws:
      UnsupportedOperationException - when the associated parameters type is different
    • getParameterClass

      public Class<?> getParameterClass()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Parameter field class.
      Returns:
      Parameter field class
    • getEnumParameterClass

      public Class<? extends Enum> getEnumParameterClass()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Return enum class for enum field.
      Returns:
      Enum class for enum field
    • getEnumValue

      public Enum getEnumValue()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Value of an enum field.
      Returns:
      The current value
      Throws:
      UnsupportedOperationException - when the associated parameters type is different