lights.adapters.tspaces201
Class FieldAdapter

java.lang.Object
  |
  +--lights.adapters.tspaces201.FieldAdapter

public class FieldAdapter
extends java.lang.Object
implements IField


Method Summary
 java.lang.Class getType()
          Returns the type of this field.
 java.io.Serializable getValue()
          Returns the value of this field.
 boolean isFormal()
          Returns true if the field is a formal, false otherwise.
 boolean matches(IField field)
          Determines the rule used for pattern matching between fields.
 IField set(IField field)
          Substitutes this field with the one passed as a parameter.
 IField setToActual(java.io.Serializable obj)
          Sets the value of this field to the object passed as a parameter.
 IField setToFormal(java.lang.Class classObj)
          Sets this field to be a formal whose type becomes the class passed as a parameter.
 IField setToNullActual(java.lang.Class classObj)
          Sets the value of this field to null.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

set

public IField set(IField field)
Description copied from interface: IField
Substitutes this field with the one passed as a parameter. If field is a formal, this field becomes a formal with field's type. If field is an actual, this fields becomes an actual with the type and value of field.
Specified by:
set in interface IField
Tags copied from interface: IField
Parameters:
field - the field to be assigned.
Returns:
the resulting field.

getValue

public java.io.Serializable getValue()
Description copied from interface: IField
Returns the value of this field.
Specified by:
getValue in interface IField

getType

public java.lang.Class getType()
Description copied from interface: IField
Returns the type of this field.
Specified by:
getType in interface IField

setToActual

public IField setToActual(java.io.Serializable obj)
Description copied from interface: IField
Sets the value of this field to the object passed as a parameter. The type of the field is set automatically to the one of the object.
Specified by:
setToActual in interface IField
Tags copied from interface: IField
Parameters:
obj - the new value of the field.
Returns:
the resulting field.

setToNullActual

public IField setToNullActual(java.lang.Class classObj)
Description copied from interface: IField
Sets the value of this field to null. The type of the field is set to the class passed as a parameter.
Specified by:
setToNullActual in interface IField
Tags copied from interface: IField
Parameters:
classObj - the class to be associated to the null actual.
Returns:
the resulting field.

setToFormal

public IField setToFormal(java.lang.Class classObj)
Description copied from interface: IField
Sets this field to be a formal whose type becomes the class passed as a parameter.
Specified by:
setToFormal in interface IField
Tags copied from interface: IField
Parameters:
classObj - the new type of this field.
Returns:
the resulting field.

isFormal

public boolean isFormal()
Description copied from interface: IField
Returns true if the field is a formal, false otherwise.
Specified by:
isFormal in interface IField

matches

public boolean matches(IField field)
Description copied from interface: IField
Determines the rule used for pattern matching between fields. Classes implementing this interface may specify different policies for matching.
Specified by:
matches in interface IField
Tags copied from interface: IField
Returns:
true if the field passed as a parameter matches this field, false otherwise.