com.gridsystems.nextgrid.api.pom.ref
Class ScalarReference<E>

java.lang.Object
  extended by com.gridsystems.nextgrid.api.pom.ref.ReferenceSupport<E>
      extended by com.gridsystems.nextgrid.api.pom.ref.ScalarReference<E>
Type Parameters:
E - The scalar type
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, nextgrid.api.pom.Reference<E>
Direct Known Subclasses:
BooleanReference, LongReference, NumberReference, StringReference

public class ScalarReference<E>
extends ReferenceSupport<E>

Scalar References are references to workflow local values (e.g. simple parameters).

The value is wrapped in an XML document with the following layout:

 <value>
   [value string representation]
 </value>
 

Author:
Rodrigo Ruiz
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.gridsystems.nextgrid.api.pom.ref.ReferenceSupport
LOG
 
Constructor Summary
ScalarReference(java.lang.Class<E> type)
          Creates a new instance.
ScalarReference(java.lang.Class<E> type, E value)
          Creates a new instance.
 
Method Summary
 boolean canCastFrom(java.lang.Class<?> type)
          
 boolean canCastTo(java.lang.Class<?> type)
          
 java.lang.Object castTo(java.lang.Class<?> type)
          
 E getValue()
          
 java.lang.Class<E> getValueType()
          
 void setValue(java.lang.Object value)
          
 
Methods inherited from class com.gridsystems.nextgrid.api.pom.ref.ReferenceSupport
addReader, addWriter, clearLinks, copy, dispose, getReaders, getWriters, isAvailable, readLock, removeReader, removeWriter, reset, setAvailable, waitAvailable, writeLock
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScalarReference

public ScalarReference(java.lang.Class<E> type)
Creates a new instance.

Parameters:
type - A class instance for returning value types

ScalarReference

public ScalarReference(java.lang.Class<E> type,
                       E value)
Creates a new instance.

Parameters:
type - A class instance for returning value types
value - An object instance
Method Detail

setValue

public final void setValue(java.lang.Object value)


getValue

public final E getValue()


getValueType

public final java.lang.Class<E> getValueType()


canCastTo

public boolean canCastTo(java.lang.Class<?> type)


canCastFrom

public boolean canCastFrom(java.lang.Class<?> type)


castTo

public java.lang.Object castTo(java.lang.Class<?> type)



Copyright © 2006-2008 Grid Systems, S.A.. All Rights Reserved.