net.sf.arise.gsf
Class Result

java.lang.Object
  |
  +--net.sf.arise.gsf.Result
All Implemented Interfaces:
java.io.Serializable

public final class Result
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Method Summary
static Result fail(java.lang.Object expression, java.lang.Throwable throwable, long time)
          Construct a failed result.
 long getEvalTime()
          The time taken to evaluate the result, in milliseconds.
 java.lang.Object getExpression()
          The expression that evaluated to this result.
 java.lang.Throwable getThrowable()
          The throwable of a failed result.
 java.lang.String getThrowableMessage()
           
 java.lang.String getThrowableType()
           
 java.lang.Class getType()
          The class object of the result.
 java.lang.Object getTypedValue()
          The holder object if wrapped, otherwise the object itself.
 java.lang.String getTypeName()
          The name of the class of the result.
 java.lang.Object getValue()
          The value.
 java.lang.Object getValueString()
          The toString of the value.
 Holder getWrappedValue()
          The Holder object if wrapped, otherwise null.
 boolean isOK()
          True iff the result was not a failure.
 boolean isPrimitive()
          True iff the result was a primitive value.
 boolean isWrapped()
          True iff the result is wrapped, in a Holder.
static Result ok(java.lang.Object expression, java.lang.Object object, long time)
          Construct an OK result.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

ok

public static Result ok(java.lang.Object expression,
                        java.lang.Object object,
                        long time)
Construct an OK result.


fail

public static Result fail(java.lang.Object expression,
                          java.lang.Throwable throwable,
                          long time)
Construct a failed result.


getWrappedValue

public final Holder getWrappedValue()
The Holder object if wrapped, otherwise null. Will not be serialized.


isWrapped

public final boolean isWrapped()
True iff the result is wrapped, in a Holder.


getValue

public final java.lang.Object getValue()
The value. If the result is a primitive, it returns an instance of the standard Java API wrapper class. Will not be serialized.


getValueString

public final java.lang.Object getValueString()
The toString of the value.


getTypedValue

public final java.lang.Object getTypedValue()
The holder object if wrapped, otherwise the object itself.


getType

public final java.lang.Class getType()
The class object of the result. Will not be serialized.


getTypeName

public final java.lang.String getTypeName()
The name of the class of the result.


isPrimitive

public boolean isPrimitive()
True iff the result was a primitive value.


getThrowable

public java.lang.Throwable getThrowable()
The throwable of a failed result. Will not be serialized.


getThrowableType

public java.lang.String getThrowableType()

getThrowableMessage

public java.lang.String getThrowableMessage()

getEvalTime

public final long getEvalTime()
The time taken to evaluate the result, in milliseconds.


isOK

public final boolean isOK()
True iff the result was not a failure.


getExpression

public java.lang.Object getExpression()
The expression that evaluated to this result. Will not be serialized.


toString

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


All code and documentation is

Copyright (c) : 2000-2003 Kjetil Valstadsve & Maja S. Bratseth