net.sf.saffron.oj.util
Class OJUtil

java.lang.Object
  |
  +--net.sf.saffron.oj.util.OJUtil

public abstract class OJUtil
extends Object

Static utilities for manipulating OpenJava expressions.


Field Summary
static ThreadLocal threadDeclarers
          Each thread's enclosing OJClass.
 
Constructor Summary
OJUtil()
           
 
Method Summary
static Object literalValue(Literal literal)
           
static OJClass ojClassForExpression(SaffronRel rel, Expression exp)
           
static SaffronType ojToType(SaffronTypeFactory typeFactory, OJClass ojClass)
           
static TypeName toTypeName(SaffronType rowType)
          Converts a SaffronType to a TypeName.
static OJClass typeToOJClass(OJClass declarer, SaffronType rowType)
           
static OJClass typeToOJClass(SaffronType rowType)
          Converts a SaffronType to a OJClass.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

threadDeclarers

public static final ThreadLocal threadDeclarers
Each thread's enclosing OJClass. Synthetic classes are declared as inner classes of this.

Constructor Detail

OJUtil

public OJUtil()
Method Detail

ojClassForExpression

public static OJClass ojClassForExpression(SaffronRel rel,
                                           Expression exp)

ojToType

public static SaffronType ojToType(SaffronTypeFactory typeFactory,
                                   OJClass ojClass)

toTypeName

public static TypeName toTypeName(SaffronType rowType)
Converts a SaffronType to a TypeName.

Pre-condition:
threadDeclarers.get() != null

typeToOJClass

public static OJClass typeToOJClass(OJClass declarer,
                                    SaffronType rowType)

typeToOJClass

public static OJClass typeToOJClass(SaffronType rowType)
Converts a SaffronType to a OJClass.

Pre-condition:
threadDeclarers.get() != null

literalValue

public static Object literalValue(Literal literal)

SourceForge.net_Logo