org.eclipse.jdt.internal.compiler.lookup
Class ElementValuePair

java.lang.Object
  extended by org.eclipse.jdt.internal.compiler.lookup.ElementValuePair

public class ElementValuePair
extends java.lang.Object


Field Summary
 MethodBinding binding
           
 java.lang.Object value
           
 
Constructor Summary
ElementValuePair(char[] name, Expression expression, MethodBinding binding)
           
ElementValuePair(char[] name, java.lang.Object value, MethodBinding binding)
           
 
Method Summary
 MethodBinding getMethodBinding()
           
 char[] getName()
           
 java.lang.Object getValue()
          Return TypeBinding for member value of type Class Return Constant for member of primitive type or String Return FieldBinding for enum constant Return AnnotationBinding for annotation instance Return Object[] for member value of array type.
static java.lang.Object getValue(Expression expression)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

value

public java.lang.Object value

binding

public MethodBinding binding
Constructor Detail

ElementValuePair

public ElementValuePair(char[] name,
                        Expression expression,
                        MethodBinding binding)

ElementValuePair

public ElementValuePair(char[] name,
                        java.lang.Object value,
                        MethodBinding binding)
Method Detail

getValue

public static java.lang.Object getValue(Expression expression)

getName

public char[] getName()
Returns:
the name of the element value pair.

getMethodBinding

public MethodBinding getMethodBinding()
Returns:
the method binding that defined this member value pair or null if no such binding exists.

getValue

public java.lang.Object getValue()
Return TypeBinding for member value of type Class Return Constant for member of primitive type or String Return FieldBinding for enum constant Return AnnotationBinding for annotation instance Return Object[] for member value of array type.

Returns:
the value of this member value pair or null if the value is missing or is not a compile-time constant

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object