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

java.lang.Object
  extended by com.gridsystems.nextgrid.api.pom.ref.ReferenceSupport<E>
      extended by com.gridsystems.nextgrid.api.pom.ref.ObjectReference<E>
Type Parameters:
E - Class type
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, nextgrid.api.pom.Reference<E>

public class ObjectReference<E>
extends ReferenceSupport<E>

Reference to an arbitrary object. For being used only in specialised cases.

Author:
Rodrigo Ruiz
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.gridsystems.nextgrid.api.pom.ref.ReferenceSupport
LOG
 
Constructor Summary
ObjectReference(java.lang.Class<E> type)
          Creates a new instance.
ObjectReference(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

ObjectReference

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

Parameters:
type - Value type

ObjectReference

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

Parameters:
type - Value type
value - Value
Method Detail

canCastFrom

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


canCastTo

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


castTo

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


getValue

public E getValue()


getValueType

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


setValue

public void setValue(java.lang.Object value)



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