polyglot.types.reflect
Class Constant

java.lang.Object
  extended by polyglot.types.reflect.Constant

public class Constant
extends java.lang.Object

A Constant is used to represent an item in the constant pool of a class.

Author:
Nate Nystrom (nystrom@cs.purdue.edu)

Method Summary
 boolean equals(java.lang.Object other)
          Check if an object is equal to this constant.
 int hashCode()
          Hash the constant.
 java.lang.Object value()
          Get the value of the constant.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

value

public final java.lang.Object value()
Get the value of the constant.

Returns:
The value.

hashCode

public int hashCode()
Hash the constant.

Overrides:
hashCode in class java.lang.Object
Returns:
The hash code.

equals

public boolean equals(java.lang.Object other)
Check if an object is equal to this constant.

Overrides:
equals in class java.lang.Object
Parameters:
obj - The object to compare against.
Returns:
true if equal, false if not.