net.sf.saffron.oj
Class OJTypeFactoryImpl.OJScalarType

java.lang.Object
  |
  +--net.sf.saffron.core.SaffronTypeFactoryImpl.TypeImpl
        |
        +--net.sf.saffron.oj.OJTypeFactoryImpl.OJScalarType
All Implemented Interfaces:
SaffronType
Enclosing class:
OJTypeFactoryImpl

private class OJTypeFactoryImpl.OJScalarType
extends SaffronTypeFactoryImpl.TypeImpl

Type based upon an OJClass.

Use this class only if the class is a 'pure' OJClass:


Field Summary
private  OJClass ojClass
           
 
Fields inherited from class net.sf.saffron.core.SaffronTypeFactoryImpl.TypeImpl
digest, fields
 
Constructor Summary
(package private) OJTypeFactoryImpl.OJScalarType(OJClass ojClass)
          Creates an OJScalarType
 
Method Summary
protected  String computeDigest()
           
 SaffronType getArrayType()
          Returns an array type with this type as the component.
 SaffronType getComponentType()
          Returns the component type if type is a collection, otherwise null.
 SaffronField getField(String fieldName)
           
 int getFieldCount()
          Returns the number of columns.
 int getFieldOrdinal(String fieldName)
           
 SaffronField[] getFields()
          Returns the columns.
 
Methods inherited from class net.sf.saffron.core.SaffronTypeFactoryImpl.TypeImpl
equals, equalsSansNullability, format, getFactory, getJoinTypes, hashCode, isJoin, isProject, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

ojClass

private final OJClass ojClass
Constructor Detail

OJTypeFactoryImpl.OJScalarType

OJTypeFactoryImpl.OJScalarType(OJClass ojClass)
Creates an OJScalarType

Parameters:
ojClass - Equivalent OJClass
Pre-condition:
ojClass != null, !SyntheticClass.isJoinClass(ojClass), !SyntheticClass.isProjectClass(ojClass)
Method Detail

getArrayType

public SaffronType getArrayType()
Description copied from interface: SaffronType
Returns an array type with this type as the component.

Specified by:
getArrayType in interface SaffronType
Overrides:
getArrayType in class SaffronTypeFactoryImpl.TypeImpl

getField

public SaffronField getField(String fieldName)
Specified by:
getField in interface SaffronType
Overrides:
getField in class SaffronTypeFactoryImpl.TypeImpl

getFieldCount

public int getFieldCount()
Description copied from interface: SaffronType
Returns the number of columns.

Specified by:
getFieldCount in interface SaffronType
Overrides:
getFieldCount in class SaffronTypeFactoryImpl.TypeImpl

getFieldOrdinal

public int getFieldOrdinal(String fieldName)
Specified by:
getFieldOrdinal in interface SaffronType
Overrides:
getFieldOrdinal in class SaffronTypeFactoryImpl.TypeImpl

getFields

public SaffronField[] getFields()
Description copied from interface: SaffronType
Returns the columns.

Specified by:
getFields in interface SaffronType
Overrides:
getFields in class SaffronTypeFactoryImpl.TypeImpl

getComponentType

public SaffronType getComponentType()
Description copied from interface: SaffronType
Returns the component type if type is a collection, otherwise null.

Specified by:
getComponentType in interface SaffronType
Overrides:
getComponentType in class SaffronTypeFactoryImpl.TypeImpl

computeDigest

protected String computeDigest()
Specified by:
computeDigest in class SaffronTypeFactoryImpl.TypeImpl

SourceForge.net_Logo