net.sf.saffron.core
Class SaffronTypeFactoryImpl.FieldImpl

java.lang.Object
  |
  +--net.sf.saffron.core.SaffronTypeFactoryImpl.FieldImpl
All Implemented Interfaces:
SaffronField
Enclosing class:
SaffronTypeFactoryImpl

protected static class SaffronTypeFactoryImpl.FieldImpl
extends Object
implements SaffronField

Simple implementation of SaffronField


Field Summary
private  int index
           
private  String name
           
private  SaffronType type
           
 
Constructor Summary
SaffronTypeFactoryImpl.FieldImpl(String name, int index, SaffronType type)
           
 
Method Summary
 Object get(Object o)
          Retrieves the value of this field in an instance of this type.
 int getIndex()
          Returns the index of this field within its record type.
 String getName()
          Returns the name of this field.
 SaffronType getType()
          Returns the type of this field.
 void set(Object o, Object value)
          Sets the value of this field in an instance of the type.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

type

private final SaffronType type

name

private final String name

index

private final int index
Constructor Detail

SaffronTypeFactoryImpl.FieldImpl

public SaffronTypeFactoryImpl.FieldImpl(String name,
                                        int index,
                                        SaffronType type)
Pre-condition:
name != null, type != null
Method Detail

getName

public String getName()
Description copied from interface: SaffronField
Returns the name of this field. The name is unique within the type.

Specified by:
getName in interface SaffronField

getIndex

public int getIndex()
Description copied from interface: SaffronField
Returns the index of this field within its record type.

Specified by:
getIndex in interface SaffronField

getType

public SaffronType getType()
Description copied from interface: SaffronField
Returns the type of this field.

Specified by:
getType in interface SaffronField

get

public Object get(Object o)
Description copied from interface: SaffronField
Retrieves the value of this field in an instance of this type.

Specified by:
get in interface SaffronField

set

public void set(Object o,
                Object value)
Description copied from interface: SaffronField
Sets the value of this field in an instance of the type.

Specified by:
set in interface SaffronField

SourceForge.net_Logo