Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.9.0)

E52932-01


oracle.jbo
Interface ExprCompileContext

All Known Implementing Classes:
AbstractCompileContext, AbstractExprCompileContextImpl, EvaluateExprCompileContextImpl

public interface ExprCompileContext

Provides context about the groovy expression that is currently compiling. A compiler extension may acquire the ExprCompileContext from the ExprEval during compilation. Note that a compile context is not available when the compiler is not running. The compile context may be used to provide additional information to the compiler about the cpmpiling groovy expression/operation. For example, the ADF type checked extension uses the compiler context to provide more information about variables that are defined by the context.

Since:
release specific (what release of product did this appear in)

Method Summary
 boolean canTypeCheck()
          Returns whether this compile context can be used for type checking.
 ExprCompileContext getEnclosingContext()
          Returns a compile context that should be used to resolve any types that that are defined by the enclosing variable/property/method.
 org.codehaus.groovy.control.ErrorCollector getErrorCollector()
          Returns the error collector that was used during type checking.
 ExprDef getExprDef()
          Return the definition of the expressio that is compiling.
 ExprTrustSupplier getExprTrustSupplier()
          Return the security policiy that is associated with this context.
 java.lang.String getGlobalOperationReturnType(java.lang.String name, java.lang.String... argtypes)
          Return the type of the given global operations.
 java.lang.String getMethodReturnType(java.lang.String receiverType, java.lang.String name, java.lang.String... argtypes)
          Return the return type of the given method.
 java.lang.String getPropertyType(java.lang.String objectType, java.lang.String name)
          Return the type of the given property.
 java.lang.String getVariableType(java.lang.String name)
          Return the type of the given variable.
 boolean isRowAttribute(java.lang.String name)
          Returns whether the variable resolves to an row attribute.
 void setErrorCollector(org.codehaus.groovy.control.ErrorCollector errorCollector)
           

 

Method Detail

getExprDef

ExprDef getExprDef()
Return the definition of the expressio that is compiling.

canTypeCheck

boolean canTypeCheck()
Returns whether this compile context can be used for type checking.

getPropertyType

java.lang.String getPropertyType(java.lang.String objectType,
                                 java.lang.String name)
Return the type of the given property.

Invoked by the type checker if it cannot resolve the specifid property.


getVariableType

java.lang.String getVariableType(java.lang.String name)
Return the type of the given variable.

Invoked by the type checker if it cannot resolve the specified variable.


isRowAttribute

boolean isRowAttribute(java.lang.String name)
Returns whether the variable resolves to an row attribute.

Invoked by the type checker to perform additional validation of attribute variables.


getMethodReturnType

java.lang.String getMethodReturnType(java.lang.String receiverType,
                                     java.lang.String name,
                                     java.lang.String... argtypes)
Return the return type of the given method.

Invoked by the type checker if it cannot resolve the specified method.


getGlobalOperationReturnType

java.lang.String getGlobalOperationReturnType(java.lang.String name,
                                              java.lang.String... argtypes)
Return the type of the given global operations.

getExprTrustSupplier

ExprTrustSupplier getExprTrustSupplier()
Return the security policiy that is associated with this context.

getEnclosingContext

ExprCompileContext getEnclosingContext()
Returns a compile context that should be used to resolve any types that that are defined by the enclosing variable/property/method.

This will be invoked once by the type checker after it resolves an unbound variable/property/method. This method may be used to pass a compile context back to the compile context that will be later used to evaluate any other types in the enclosing context.


getErrorCollector

org.codehaus.groovy.control.ErrorCollector getErrorCollector()
Returns the error collector that was used during type checking. This is set by the type checker and will not be available until after the type checking phase is complete.

Applications may use the ErrorCollector to get a list of errors/warnings that were discovered during type checking.


setErrorCollector

void setErrorCollector(org.codehaus.groovy.control.ErrorCollector errorCollector)
For internal use only. Application developers should not use this

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle ADF Model
11g Release 1 (11.1.1.9.0)

E52932-01


Copyright © 1997, 2015, Oracle. All rights reserved.