| 
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.9.0) E52932-01  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
  
groovy.lang.GroovyObjectSupport
      
groovy.lang.Binding
          
oracle.jbo.AbstractCompileContext
public abstract class AbstractCompileContext
An abstract implementation of an ExprCompileContext. The abstract context implements a strategy patter for method and variable resolution that is based upon the strategy that is used at script execute time.
Many of the abstract methods defined by this class are designed to return information about the compile context source. This source object usually represents the BC4J owner of the script that is compiling. At execute time it is frequently implemented by an oracle.jbo.Row. At compile time it is exepcted that it will be represented by a BC4J def object or its DT equivalent.
Note that many of the typing methods deal with String types rather than the type classes. This is intentional. Type classes are not available in all compile contexts (DT).
| Constructor Summary | |
|---|---|
AbstractCompileContext() | 
|
| Method Summary | |
|---|---|
abstract  boolean | 
canTypeCheck()Returns whether this compile context can be used for type checking.  | 
protected  java.lang.Class[] | 
classesFor(java.lang.String[] types) | 
protected  java.lang.Class | 
classFor(java.lang.String type) | 
 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.  | 
abstract  ExprDef | 
getExprDef()Return the definition of the expressio that is compiling.  | 
 ExprTrustSupplier | 
getExprTrustSupplier()Return the security policiy that is associated with this context.  | 
abstract  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 receiver, java.lang.String name, java.lang.String... argtypes)Return the return type of the given method.  | 
abstract  java.lang.String | 
getNewValueType()In validator contexts this returns the type of the new attribute or row.  | 
abstract  java.lang.String | 
getOldValueType()In validator contexts this returns the type of the new attribute or row.  | 
 java.lang.String | 
getPropertyType(java.lang.String objectType, java.lang.String name)Return the type of the given property.  | 
protected  java.lang.String | 
getReturnType(java.lang.Class receiver, java.lang.String name, java.lang.Class... argtypes) | 
protected  java.lang.String | 
getReturnType(java.lang.String receiverType, java.lang.String name, java.lang.String... argtypes)Get the return type of the specified method on the specified receiver type.  | 
abstract  java.lang.String | 
getSourceAttributeType(java.lang.String name)Return the source attribute type.  | 
abstract  java.lang.String | 
getSourceMethodReturnType(java.lang.String name, java.lang.String... argtypes)Return the return type of a source method.  | 
abstract  java.lang.String | 
getSourceOperationReturnType(java.lang.String name, java.lang.String... argtypes)Return the return type of a source operation.  | 
abstract  java.lang.String | 
getSourcePropertyType(java.lang.String name)Return the source property type.  | 
abstract  java.lang.String | 
getSourceType()Return the source type of the current compile context.  | 
 java.lang.String | 
getVariableType(java.lang.String name)Return the type of the given variable.  | 
protected  boolean | 
isAssignableFrom(java.lang.Class intrf, java.lang.String type)Determines if the specified interface class is assignable from the type.  | 
 boolean | 
isRowAttribute(java.lang.String name)Returns whether the variable resolves to an row attribute.  | 
 void | 
setErrorCollector(org.codehaus.groovy.control.ErrorCollector errorCollector) | 
| Methods inherited from class groovy.lang.Binding | 
|---|
getProperty, getVariable, getVariables, hasVariable, setProperty, setVariable | 
| Methods inherited from class groovy.lang.GroovyObjectSupport | 
|---|
getMetaClass, invokeMethod, setMetaClass | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public AbstractCompileContext()
| Method Detail | 
|---|
public abstract ExprDef getExprDef()
ExprCompileContextgetExprDef in interface ExprCompileContextpublic abstract boolean canTypeCheck()
ExprCompileContextcanTypeCheck in interface ExprCompileContext
public java.lang.String getPropertyType(java.lang.String objectType,
                                        java.lang.String name)
ExprCompileContextInvoked by the type checker if it cannot resolve the specifid property.
getPropertyType in interface ExprCompileContextpublic java.lang.String getVariableType(java.lang.String name)
ExprCompileContextInvoked by the type checker if it cannot resolve the specified variable.
getVariableType in interface ExprCompileContextpublic boolean isRowAttribute(java.lang.String name)
ExprCompileContextInvoked by the type checker to perform additional validation of attribute variables.
isRowAttribute in interface ExprCompileContext
public java.lang.String getMethodReturnType(java.lang.String receiver,
                                            java.lang.String name,
                                            java.lang.String... argtypes)
ExprCompileContextInvoked by the type checker if it cannot resolve the specified method.
getMethodReturnType in interface ExprCompileContext
public abstract java.lang.String getGlobalOperationReturnType(java.lang.String name,
                                                              java.lang.String... argtypes)
ExprCompileContextgetGlobalOperationReturnType in interface ExprCompileContextpublic abstract java.lang.String getSourceType()
public abstract java.lang.String getSourceAttributeType(java.lang.String name)
public abstract java.lang.String getSourcePropertyType(java.lang.String name)
public abstract java.lang.String getSourceMethodReturnType(java.lang.String name,
                                                           java.lang.String... argtypes)
public abstract java.lang.String getSourceOperationReturnType(java.lang.String name,
                                                              java.lang.String... argtypes)
public abstract java.lang.String getNewValueType()
public abstract java.lang.String getOldValueType()
public ExprTrustSupplier getExprTrustSupplier()
ExprCompileContextgetExprTrustSupplier in interface ExprCompileContextpublic ExprCompileContext getEnclosingContext()
ExprCompileContextThis 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.
getEnclosingContext in interface ExprCompileContextpublic org.codehaus.groovy.control.ErrorCollector getErrorCollector()
ExprCompileContextApplications may use the ErrorCollector to get a list of errors/warnings that were discovered during type checking.
getErrorCollector in interface ExprCompileContextpublic void setErrorCollector(org.codehaus.groovy.control.ErrorCollector errorCollector)
setErrorCollector in interface ExprCompileContext
protected java.lang.String getReturnType(java.lang.String receiverType,
                                         java.lang.String name,
                                         java.lang.String... argtypes)
The default implementation uses the groovy MOP to find the method on the receiver class. Concrete implementations may override this method if the receiver class is not available.
receiverType - the type of the Object that will receive the method invocationname - the name of the method that will be invokedargtypes - the types of arguments that will be passed
protected java.lang.String getReturnType(java.lang.Class receiver,
                                         java.lang.String name,
                                         java.lang.Class... argtypes)
protected boolean isAssignableFrom(java.lang.Class intrf,
                                   java.lang.String type)
The assignable rules should be java.lang.Class. The default implementation looks up the Class to determine if it is assignable. Concrete implementations that may not have the type Class available may override this to perform there own checking.
intrf - the interface to check fortype - the type to be checkedprotected java.lang.Class classFor(java.lang.String type)
protected java.lang.Class[] classesFor(java.lang.String[] types)
  | 
Oracle Fusion Middleware Java API Reference for Oracle ADF Model 11g Release 1 (11.1.1.9.0) E52932-01  | 
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||