JET

edu.utep.cs.jet.rat
Interface Denotable

All Known Implementing Classes:
ArrayValue, BooleanValue, ByteValue, CharValue, CompositeValue, ConstructorCall, DoubleValue, FloatValue, IntValue, LongValue, MethodCall, NullValue, PrimitiveValue, ShortValue, StringValue

public interface Denotable

An interface to uniformly represent various kinds of Java values and objects that can be part of a test case. The contained value may be a primitive value (e.g., int), a reference (e.g., array and String), or a Java value or reference represented as a method or constructor call.

Version:
$Revision: 1.8 $
Author:
Yoonsik Cheon

Method Summary
 String code()
          Returns Java code that, if evaluated, gives the value represented by this denotable.
 boolean isEquivalentTo(Denotable other)
          Returns true if the represented value is equivalent to the argument's represented value.
 boolean isNull()
          Returns true if this value represents null.
 String toString()
          Returns a string representation of this denotable.
 Class<?> type()
          Returns the type of this denotable.
 Object value()
          Returns the represented value of this denotable.
 

Method Detail

value

Object value()
Returns the represented value of this denotable. If the represented value is a primitive value, the corresponding wrapper object is returned. If the represented value is a null, null is returned. If the represented value is a method or constructor call, the method or constructor is evaluated and the result is returned.


type

Class<?> type()
Returns the type of this denotable. For a method call, the return type of the method is returned.


toString

String toString()
Returns a string representation of this denotable.

Overrides:
toString in class Object

code

String code()
Returns Java code that, if evaluated, gives the value represented by this denotable.


isNull

boolean isNull()
Returns true if this value represents null.


isEquivalentTo

boolean isEquivalentTo(Denotable other)
Returns true if the represented value is equivalent to the argument's represented value.


JET

JET is Copyright (C) 2005-2008 by The University of Texas at El Paso and is distributed under the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.