org.ow2.opensuit.cel.util
Class SimpleCompilationContext

java.lang.Object
  extended by org.ow2.opensuit.cel.util.SimpleCompilationContext
All Implemented Interfaces:
ICompilationContext

public class SimpleCompilationContext
extends java.lang.Object
implements ICompilationContext


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ow2.opensuit.cel.ICompilationContext
ICompilationContext.ICompilationLogger, ICompilationContext.IFunctionContext, ICompilationContext.UnresolvedVariableError
 
Constructor Summary
SimpleCompilationContext()
           
 
Method Summary
 void declareFunction(java.lang.String prefix, java.lang.String name, java.lang.reflect.Method function)
           
 void declareVariable(java.lang.String name, java.lang.Class<?> clazz)
           
 java.util.List<ICompilationContext.IFunctionContext> getFunctions(java.lang.String prefix, java.lang.String name)
          May return a list of compilable functions
 java.lang.reflect.Type getVariableGenericType(java.lang.String name)
          Allow to recover generic located into this context by providing a name of object.
 java.lang.Class<?> getVariableType(java.lang.String name)
          Allow to recover located into this context by providing a name of object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleCompilationContext

public SimpleCompilationContext()
Method Detail

declareVariable

public void declareVariable(java.lang.String name,
                            java.lang.Class<?> clazz)

declareFunction

public void declareFunction(java.lang.String prefix,
                            java.lang.String name,
                            java.lang.reflect.Method function)

getVariableGenericType

public java.lang.reflect.Type getVariableGenericType(java.lang.String name)
                                              throws ICompilationContext.UnresolvedVariableError
Description copied from interface: ICompilationContext
Allow to recover generic located into this context by providing a name of object. Example:

Specified by:
getVariableGenericType in interface ICompilationContext
Parameters:
name - The name of the object
Returns:
Return from the context, the of the requested object
Throws:
ICompilationContext.UnresolvedVariableError

getVariableType

public java.lang.Class<?> getVariableType(java.lang.String name)
                                   throws ICompilationContext.UnresolvedVariableError
Description copied from interface: ICompilationContext
Allow to recover located into this context by providing a name of object. Example: - request return HttpServletRequest - locale return Locale

Specified by:
getVariableType in interface ICompilationContext
Parameters:
name - The name of the object
Returns:
Return from the context, the type of the requested object
Throws:
ICompilationContext.UnresolvedVariableError

getFunctions

public java.util.List<ICompilationContext.IFunctionContext> getFunctions(java.lang.String prefix,
                                                                         java.lang.String name)
Description copied from interface: ICompilationContext
May return a list of compilable functions

Specified by:
getFunctions in interface ICompilationContext
Parameters:
prefix - The prefix of the functions
name - The name of the functions
Returns:
List


Copyright © 2008-2010 eBMWebsourcing. All Rights Reserved.