org.objectweb.asm.tree.analysis
Interface Value

All Known Implementing Classes:
BasicValue, DataflowValue

public interface Value

An immutable symbolic value for semantic interpretation of bytecode.

Author:
Eric Bruneton

Method Summary
 boolean equals(Value value)
          Compares this value with the given value.
 int getSize()
          Returns the size of this value in words.
 Value merge(Value value)
          Merges this value and the given value.
 

Method Detail

getSize

public int getSize()
Returns the size of this value in words.

Returns:
either 1 or 2.

merge

public Value merge(Value value)
Merges this value and the given value. The merge operation must return a value that represents both values (for instance, if the two values are two types, the merged value must be a common super type of the two types. If the two values are integer intervals, the merged value must be an interval that contains the previous ones. Likewise for other types of values).

Parameters:
value - a value.
Returns:
the merged value. If the merged value is equal to this value, this method must return this.

equals

public boolean equals(Value value)
Compares this value with the given value.

Parameters:
value - a value.
Returns:
true if the values are equals, false otherwise.