SourceValue (ASM 5.0.4 Documentation)
Date: 2015-09-18

org.objectweb.asm.tree.analysis

## Class SourceValue

- java.lang.Object
- - org.objectweb.asm.tree.analysis.SourceValue

- All Implemented Interfaces:
    Value

      public class SourceValue
      extends Object
      implements Value

  A `Value` that is represented by its type in a two types type system. This type system distinguishes the ONEWORD and TWOWORDS types.
  Author:
    Eric Bruneton

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `Set<AbstractInsnNode>` | `insns` The instructions that can produce this value.
    `int` | `size` The size of this value.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `SourceValue(int size)`
    `SourceValue(int size, AbstractInsnNode insn)`
    `SourceValue(int size, Set<AbstractInsnNode> insns)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `equals(Object value)`
    `int` | `getSize()` Returns the size of this value in words.
    `int` | `hashCode()`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### size

          public final int size

      The size of this value.

    - #### insns

          public final Set<AbstractInsnNode> insns

      The instructions that can produce this value. For example, for the Java code below, the instructions that can produce the value of `i` at line 5 are the txo ISTORE instructions at line 1 and 3:

           1: i = 0;
           2: if (...) {
           3:   i = 1;
           4: }
           5: return i;

      This field is a set of `AbstractInsnNode` objects.

  - ### Constructor Detail

    - #### SourceValue

          public SourceValue(int size)

    - #### SourceValue

          public SourceValue(int size,
                     AbstractInsnNode insn)

    - #### SourceValue

          public SourceValue(int size,
                     Set<AbstractInsnNode> insns)

  - ### Method Detail

    - #### getSize

          public int getSize()

      Description copied from interface: `Value`
      Returns the size of this value in words.
      Specified by:
        `getSize` in interface `Value`
      Returns:
        either 1 or 2.

    - #### equals

          public boolean equals(Object value)

      Overrides:
        `equals` in class `Object`

    - #### hashCode

          public int hashCode()

      Overrides:
        `hashCode` in class `Object`