Interface IValue


public interface IValue
Models a value of a variable, enumerator or expression.
Since:
5.1
Restriction:
This interface is not intended to be implemented by clients.
Restriction:
This interface is not intended to be extended by clients.
  • Method Summary

    Modifier and Type
    Method
    Description
    Make a deep copy of this value.
    org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation[]
    If this value consists of sub-values, returns an array containing all of them.
    org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation
    Returns the evaluation object if this value cannot be represented as a single numerical value, or null otherwise.
    default char[]
    Deprecated.
    Returns an empty character array.
    char[]
    Returns a signature uniquely identifying the value.
    org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation
    getSubValue(int index)
    If this value consists of sub-values, returns the sub-value at the given index.
    default IBinding[]
    Deprecated.
    Returns an empty array.
    boolean
    Returns true if this value is equivalent to 'other' for declaration matching purposes.
    void
    marshal(org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer buffer)
    Serialize this value to the given type marshal buffer.
    int
    If this value consists of sub-values, returns the number of these sub-values.
    Returns the value as a number, or null if it is not possible.
    default Long
    Deprecated.
    Use numberValue() instead.
    void
    setSubValue(int position, org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation newValue)
    If this value consists of sub-values, set the sub-value at the given position to the given new value.
  • Method Details

    • numericalValue

      @Deprecated default Long numericalValue()
      Deprecated.
      Use numberValue() instead.
      Returns the value as a Long number, or null if it is not possible.
    • numberValue

      Number numberValue()
      Returns the value as a number, or null if it is not possible.
      Since:
      6.2
    • numberOfSubValues

      int numberOfSubValues()
      If this value consists of sub-values, returns the number of these sub-values. Otherwise returns 1.
      Restriction:
      This method is not intended to be referenced by clients.
    • getSubValue

      org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation getSubValue(int index)
      If this value consists of sub-values, returns the sub-value at the given index. Otherwise, returns this value (represented as an ICPPEvaluation) if the index 0 is passed. EvalFixed.INCOMPLETE is returned if the given index is out of bounds.
      Restriction:
      This method is not intended to be referenced by clients.
    • getAllSubValues

      org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation[] getAllSubValues()
      If this value consists of sub-values, returns an array containing all of them. Otherwise, returns an array containing 1 element representing this value. Not all implementations implement this; some may return null.
      Restriction:
      This method is not intended to be referenced by clients.
    • getEvaluation

      org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation getEvaluation()
      Returns the evaluation object if this value cannot be represented as a single numerical value, or null otherwise. This can happen if the value is dependent, or it's a composite value. If numberValue() returns null, getEvaluation() returns not null and vice versa.
      Restriction:
      This method is not intended to be referenced by clients.
    • getSignature

      char[] getSignature()
      Returns a signature uniquely identifying the value. Two values with identical signatures are guaranteed to be equal.
    • getInternalExpression

      @Deprecated default char[] getInternalExpression()
      Deprecated.
      Returns an empty character array.
      Restriction:
      This method is not intended to be referenced by clients.
    • getUnknownBindings

      @Deprecated default IBinding[] getUnknownBindings()
      Deprecated.
      Returns an empty array.
      Restriction:
      This method is not intended to be referenced by clients.
    • setSubValue

      void setSubValue(int position, org.eclipse.cdt.internal.core.dom.parser.cpp.ICPPEvaluation newValue)
      If this value consists of sub-values, set the sub-value at the given position to the given new value. Otherwise, set this value to the given new value. Not all implementations implement this; for some, a call to this may have no effect.
      Restriction:
      This method is not intended to be referenced by clients.
    • clone

      IValue clone()
      Make a deep copy of this value.
      Since:
      6.2
    • marshal

      void marshal(org.eclipse.cdt.internal.core.dom.parser.ITypeMarshalBuffer buffer) throws org.eclipse.core.runtime.CoreException
      Serialize this value to the given type marshal buffer.
      Throws:
      org.eclipse.core.runtime.CoreException
      Restriction:
      This method is not intended to be referenced by clients.
    • isEquivalentTo

      boolean isEquivalentTo(IValue other)
      Returns true if this value is equivalent to 'other' for declaration matching purposes.
      Restriction:
      This method is not intended to be referenced by clients.